/** * Initialize the class and set its properties. * * @since 1.0.0 * @var string $plugin_name The name of this plugin. */ public function __construct($plugin_name) { $this->plugin_name = $plugin_name; $this->options_tabs = Plugin_Name_Settings_Definition::get_tabs(); }
/** * Render the settings page for this plugin. * * @since 1.0.0 */ public function display_plugin_admin_page() { $tabs = Plugin_Name_Settings_Definition::get_tabs(); $default_tab = Plugin_Name_Settings_Definition::get_default_tab_slug(); $active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], $tabs) ? $_GET['tab'] : $default_tab; include_once 'partials/' . $this->plugin_name . '-admin-display.php'; }