/** * Create the options page. * * @since 2.0.0 */ public function create_options_page() { add_submenu_page('options-general.php', 'TuffTuffTime', 'TuffTuffTime', 'manage_options', 'tufftufftime', function () { if (!current_user_can('manage_options')) { return; } // Get the stations and loop them in the options page $tuffTuffTime = new TuffTuffTime(); $TuffTuffTime_options = get_option('TuffTuffTime_options'); $stations = $tuffTuffTime->load_stations($TuffTuffTime_options); include plugin_dir_path(__FILE__) . 'partials/tufftufftime-admin-options.php'; }); }