{name => '' active => true|false} } */ // todo generate this somehow // maybe with filters, similar as with the settings $submenu_options = array( 'general' => array( 'name' => 'General', 'active' => false ), 'events_manager' => array( 'name' => 'Events Manager', 'active' => false, ), 'gatherpress' => array( 'name' => 'Gatherpress', 'active' => false, ), 'the_events_calendar' => array( 'name' => 'The Events Calendar', 'active' => false, ), 'vsel' => array( 'name' => 'VS Event', 'active' => false, ), ); $submenu_options[$tab]['active'] = true; switch ( $tab ) { case 'general': \load_template( ACTIVITYPUB_EVENT_EXTENSIONS_PLUGIN_DIR . 'templates/settings-general.php' , true, $submenu_options ); break; default: \load_template( ACTIVITYPUB_EVENT_EXTENSIONS_PLUGIN_DIR . 'templates/settings-extractor.php', true, $submenu_options ); break; } } }