public function __construct($handle) { Settings::$pagehook = add_submenu_page($handle, 'Import & Export', 'Import & Export', 'administrator', 'podlove_imexport_migration_handle', array($this, 'page')); if (defined('SAVEQUERIES') && SAVEQUERIES) { add_action('podlove_imexport_settings_head', function () { ?> <div class="error"> <p> <b><?php echo __('Heads up!', 'podlove'); ?> </b> <?php echo __('The WordPress debug option <code>SAVEQUERIES</code> is active. This might lead to memory issues when exporting or importing tracking data.<br>It is probably defined in <code>wp-config.php</code>. Please turn it off before using the export tool.', 'podlove'); ?> </p> </div> <?php }); } $tabs = new Tabs(__('Import & Export', 'podlove')); $tabs->addTab(new Tab\Export(__('Export', 'podlove'), true)); $tabs->addTab(new Tab\Import(__('Import', 'podlove'))); $tabs->initCurrentTab(); $this->tabs = $tabs; }
public function __construct($handle) { ContributorSettings::$pagehook = add_submenu_page($handle, 'Contributors', 'Contributors', 'administrator', 'podlove_contributor_settings', array($this, 'page')); $tabs = new Tabs(__('Contributors', 'podlove')); $tabs->addTab(new \Podlove\Modules\Contributors\Settings\Tab\Contributors(__('Contributors', 'podlove'), true)); $tabs->addTab(new \Podlove\Modules\Contributors\Settings\Tab\Groups(__('Groups', 'podlove'))); $tabs->addTab(new \Podlove\Modules\Contributors\Settings\Tab\Roles(__('Roles', 'podlove'))); $tabs->addTab(new \Podlove\Modules\Contributors\Settings\Tab\Defaults(__('Defaults', 'podlove'))); $this->tabs = $tabs; $this->tabs->initCurrentTab(); foreach ($this->tabs->getTabs() as $tab) { add_action('admin_init', array($tab->getObject(), 'process_form')); } }
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 function __construct($handle) { Podcast::$pagehook = add_submenu_page($handle, 'Podcast Settings', 'Podcast Settings', 'administrator', 'podlove_settings_podcast_handle', array($this, 'page')); $this->init_page_documentation(self::$pagehook); add_settings_section('podlove_podcast_general', __('Podcast Settings', 'podlove'), function () { /* section head html */ }, Podcast::$pagehook); register_setting(Podcast::$pagehook, 'podlove_podcast', function ($podcast) { if ($podcast['media_file_base_uri']) { $podcast['media_file_base_uri'] = trailingslashit($podcast['media_file_base_uri']); } return $podcast; }); $tabs = new Tabs(__('Podcast Settings', 'podlove')); $tabs->addTab(new Tab\Description(__('Description', 'podlove'), true)); $tabs->addTab(new Tab\Media(__('Media', 'podlove'))); $tabs->addTab(new Tab\License(__('License', 'podlove'))); $tabs->addTab(new Tab\Directory(__('Directory', 'podlove'))); $this->tabs = apply_filters('podlove_podcast_settings_tabs', $tabs); $this->tabs->initCurrentTab(); }