public function __construct($handle) { Podcast::$pagehook = add_submenu_page($handle, 'Podcast', 'Podcast', 'administrator', 'podlove_settings_podcast_handle', array($this, 'page')); add_settings_section('podlove_podcast_general', __('Podcast Settings', 'podlove'), function () { /* section head html */ }, Podcast::$pagehook); register_setting(Podcast::$pagehook, 'podlove_podcast'); }
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(); }