/** * Main Pootle Page Builder Addon Boilerplate Instance * Ensures only one instance of Storefront_Extension_Boilerplate is loaded or can be loaded. * @since 1.0.0 * @return Pootle_PB_Portfolios instance */ public static function instance() { if (null == self::$_instance) { self::$_instance = new self(); } return self::$_instance; }
/** * Adds the admin hooks * @since 1.0.0 */ protected function _admin() { //Instantiating admin class $this->admin = Pootle_PB_Portfolios_Admin::instance(); //Content block attributes apply add_filter('pootlepb_welcome_message', array($this->admin, 'welcome_message'), 10, 3); //Enqueue admin JS and CSS add_action('pootlepb_enqueue_admin_scripts', array($this->admin, 'admin_enqueue')); //Content block panel tab add_filter('pootlepb_content_block_tabs', array($this->admin, 'add_tab')); //Content block panel fields add_filter('pootlepb_content_block_fields', array($this->admin, 'content_block_fields')); //Row style panel tab add_filter('pootlepb_row_settings_tabs', array($this->admin, 'add_tab')); //Row style panel fields add_filter('pootlepb_row_settings_fields', array($this->admin, 'row_tab_fields')); //Row style panel js add_action('pootlepb_row_settings_portfolio_tab', array($this->admin, 'portfolio_row_js'), 70); //Add portfolio dialog add_action('pootlepb_metabox_end', array($this->admin, 'add_pofo_dialogs')); //Adding Button in add to panel pane add_filter('pootlepb_add_to_panel_buttons', array($this->admin, 'add_portfolio_button')); //Add bg color message add_action('pootlepb_content_block_portfolio_tab', array($this->admin, 'portfolio_style_message'), 70); //Custom pofo bg edit field add_action('pootlepb_row_settings_custom_field_pofo-bg', array($this->admin, 'portfolio_bg_edit_field_render'), 7, 2); }