コード例 #1
0
 /**
  * Creates or returns an instance of this class.
  *
  * @return    MKP_Holacracy_Admin    A single instance of this class.
  */
 public static function get_instance($plugin)
 {
     if (null == self::$instance) {
         self::$instance = new self($plugin);
     }
     return self::$instance;
 }
コード例 #2
0
 /**
  * Register all of the hooks related to the dashboard functionality
  * of the plugin.
  *
  * @since    1.0.0
  * @access   private
  */
 private function define_admin_hooks()
 {
     $plugin_admin = MKP_Holacracy_Admin::get_instance($this);
     $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
     $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
     // Add settings page and fields.
     $this->loader->add_action('admin_menu', $plugin_admin, 'add_settings_page');
     $this->loader->add_action('admin_init', $plugin_admin, 'add_settings_fields');
     // Add and populate custom admin columns.
     $this->loader->add_action('manage_mkp-action-item_posts_columns', $plugin_admin, 'edit_admin_columns');
     $this->loader->add_action('manage_mkp-action-item_posts_custom_column', $plugin_admin, 'do_custom_column_output', 10, 2);
 }