/** * Initialize the plugin by requiring/recommending plugins and adding a * settings page and menu. * * @since 0.1.0 */ private function __construct() { $plugin = NerveTask::get_instance(); $this->plugin_slug = $plugin->get_plugin_slug(); // Register required/recommended plugins add_action('tgmpa_register', array($this, 'register_required_plugins')); // Add the options page and menu item. add_action('admin_menu', array($this, 'add_plugin_admin_menu')); }
/** * Return an instance of this class. * * @since 0.1.0 * * @return object A single instance of this class. */ public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }