コード例 #1
0
 /**
  * Main Pootle Page Builder Pro Instance
  * Ensures only one instance of Storefront_Extension_Boilerplate is loaded or can be loaded.
  * @return Pootle_Page_Builder_Pro_Admin instance
  * @since 	1.0.0
  */
 public static function instance()
 {
     if (null == self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
コード例 #2
0
 /**
  * Initiates admin class and adds admin hooks
  * @since 1.0.0
  */
 private function _admin()
 {
     //Instantiating admin class
     $this->admin = Pootle_Page_Builder_Pro_Admin::instance();
     //Adding front end JS and CSS in /assets folder
     add_action('admin_enqueue_scripts', array($this->admin, 'enqueue'));
     //Adding front end JS and CSS in /assets folder
     add_action('admin_init', array($this->admin, 'init_settings'));
     //Admin settings tab
     add_filter('admin_menu', array($this->admin, 'admin_menu'), 25);
     //Make live templates work
     add_filter('pootlepb_live_page_template', array($this->admin, 'filter_template'), 10, 2);
     //Adds style field in row
     add_action('pootlepb_row_settings_fields', array($this->admin, 'row_fields'), 999);
     //Pro modules
     add_action('pootlepb_modules', array($this->admin, 'modules'), 25);
 }