public function __construct($handle) { Settings::$pagehook = add_submenu_page($handle, 'Expert Settings', 'Expert Settings', 'administrator', 'podlove_settings_settings_handle', array($this, 'page')); $this->init_page_documentation(self::$pagehook); if (filter_input(INPUT_GET, 'page') !== 'podlove_settings_settings_handle' && !\Podlove\is_options_save_page()) { return; } $tabs = new Tabs(__('Expert Settings', 'podlove')); $tabs->addTab(new Tab\Website(__('Website', 'podlove'), true)); $tabs->addTab(new Tab\Metadata(__('Metadata', 'podlove'))); $tabs->addTab(new Tab\Redirects(__('Redirects', 'podlove'))); $tabs->addTab(new Tab\WebPlayer(__('Web Player', 'podlove'))); $tabs->addTab(new Tab\FileTypes(__('File Types', 'podlove'))); $tabs->addTab(new Tab\Tracking(__('Tracking', 'podlove'))); $this->tabs = $tabs; $this->tabs->initCurrentTab(); }
public static function is_module_settings_page() { // If I'm on the module page ... if (filter_input(INPUT_GET, 'page') == 'podlove_settings_modules_handle') { return true; } // ... or saving on the module page if (\Podlove\is_options_save_page()) { return true; } return false; }