/** * Creates or returns an instance of this class. * * @return Auto_Menu_From_Pages_Public A single instance of this class. */ public static function get_instance($plugin) { if (null == self::$instance) { self::$instance = new self($plugin); } return self::$instance; }
/** * Register all of the hooks related to the public-facing functionality * of the plugin. * * @since 1.0.0 * @access private */ private function define_public_hooks() { $plugin_public = Auto_Menu_From_Pages_Public::get_instance($this); // Filter widget instance (used with Simple Section Navigation for excluded pages) $this->loader->add_filter('widget_display_callback', $plugin_public, 'filter_widget_instance', 10, 3); }