/** * 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; }
/** * Initialize the class and set its properties. * * @since 1.0.0 * @var string $plugin_slug The name of this plugin. * @var string $version The version of this plugin. */ public function __construct($plugin) { $this->plugin = $plugin; $this->plugin_slug = $this->plugin->get('slug'); $this->plugin_name = $this->plugin->get('name'); $this->version = $this->plugin->get('version'); $this->options = $this->plugin->get('options'); // Set up new metaboxes class. $metaboxes = MKP_Holacracy_Metaboxes::get_instance($this->plugin); }