コード例 #1
0
 private function __construct()
 {
     // Priority is hardcoded by filter documentation.
     add_filter('toolset_filter_register_menu_pages', array($this, 'on_admin_menu'), 10);
     // Load Dashboard
     Types_Page_Dashboard::get_instance();
 }
コード例 #2
0
 public static function get_instance()
 {
     if (null == self::$instance) {
         self::$instance = new self();
         add_filter('toolset_filter_register_menu_pages', array(Types_Page_Dashboard::$instance, 'register_page_dashboard_in_menu'), 1000);
         add_action('load-toplevel_page_toolset-dashboard', array(Types_Page_Dashboard::$instance, 'on_load_page'));
         add_filter('set-screen-option', array(Types_Page_Dashboard::$instance, 'screen_settings_save'), 11, 3);
     }
     return self::$instance;
 }