diff --git a/includes/admin/class-sp-admin-welcome.php b/includes/admin/class-sp-admin-welcome.php index cadfe2a8..c3cf1def 100644 --- a/includes/admin/class-sp-admin-welcome.php +++ b/includes/admin/class-sp-admin-welcome.php @@ -166,9 +166,6 @@ class SP_Admin_Welcome { -

- - -

$class, 'options' => $sport_options, ), - - array( - 'title' => __( 'Mode', 'sportspress' ), - 'id' => 'sportspress_load_individual_mode_module', - 'default' => 'no', - 'type' => 'radio', - 'options' => array( - 'no' => __( 'Team vs team', 'sportspress' ), - 'yes' => __( 'Player vs player', 'sportspress' ), - ), - 'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ), - ), ); SP_Admin_Settings::output_fields( $settings ); ?> diff --git a/includes/admin/settings/class-sp-settings-events.php b/includes/admin/settings/class-sp-settings-events.php index a6226958..cde2792b 100644 --- a/includes/admin/settings/class-sp-settings-events.php +++ b/includes/admin/settings/class-sp-settings-events.php @@ -26,6 +26,7 @@ class SP_Settings_Events extends SP_Settings_Page { add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 20 ); add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) ); + add_action( 'sportspress_admin_field_current_mode', array( $this, 'current_mode_setting' ) ); add_action( 'sportspress_admin_field_delimiter', array( $this, 'delimiter_setting' ) ); add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) ); } @@ -86,13 +87,27 @@ class SP_Settings_Events extends SP_Settings_Page { ), array( - 'desc' => __( 'Player Performance', 'sportspress' ), + 'desc' => __( 'Box Score', 'sportspress' ), 'id' => 'sportspress_event_show_performance', 'default' => 'yes', 'type' => 'checkbox', 'checkboxgroup' => 'end', ), + array( + 'title' => __( 'Mode', 'sportspress' ), + 'id' => 'sportspress_load_individual_mode_module', + 'default' => 'no', + 'type' => 'radio', + 'options' => array( + 'no' => __( 'Team vs team', 'sportspress' ), + 'yes' => __( 'Player vs player', 'sportspress' ), + ), + 'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ), + ), + + array( 'type' => 'current_mode' ), + array( 'title' => __( 'Limit', 'sportspress' ), 'id' => 'sportspress_event_teams', @@ -108,6 +123,23 @@ class SP_Settings_Events extends SP_Settings_Page { array( 'type' => 'delimiter' ), + array( + 'title' => __( 'Teams', 'sportspress' ), + 'desc' => __( 'Filter by competition', 'sportspress' ), + 'id' => 'sportspress_event_filter_teams_by_league', + 'default' => 'no', + 'type' => 'checkbox', + 'checkboxgroup' => 'start', + ), + + array( + 'desc' => __( 'Filter by season', 'sportspress' ), + 'id' => 'sportspress_event_filter_teams_by_season', + 'default' => 'no', + 'type' => 'checkbox', + 'checkboxgroup' => 'end', + ), + array( 'title' => __( 'Venues', 'sportspress' ), 'desc' => __( 'Display maps', 'sportspress' ), @@ -202,7 +234,7 @@ class SP_Settings_Events extends SP_Settings_Page { ), array( - array( 'title' => __( 'Player Performance', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'performance_options' ), + array( 'title' => __( 'Box Score', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'performance_options' ), ), apply_filters( 'sportspress_performance_options', array( @@ -364,6 +396,21 @@ class SP_Settings_Events extends SP_Settings_Page { + + + + id, array( $this, 'output' ) ); add_action( 'sportspress_admin_field_timezone', array( $this, 'timezone_setting' ) ); add_action( 'sportspress_admin_field_frontend_styles', array( $this, 'frontend_styles_setting' ) ); - add_action( 'sportspress_admin_field_current_mode', array( $this, 'current_mode_setting' ) ); add_action( 'sportspress_settings_save_' . $this->id, array( $this, 'save' ) ); } @@ -57,20 +56,6 @@ class SP_Settings_General extends SP_Settings_Page { 'type' => 'sport', 'options' => $presets, ), - - array( - 'title' => __( 'Mode', 'sportspress' ), - 'id' => 'sportspress_load_individual_mode_module', - 'default' => 'no', - 'type' => 'radio', - 'options' => array( - 'no' => __( 'Team vs team', 'sportspress' ), - 'yes' => __( 'Player vs player', 'sportspress' ), - ), - 'desc_tip' => _x( 'Who competes in events?', 'mode setting description', 'sportspress' ), - ), - - array( 'type' => 'current_mode' ), )), array( @@ -363,21 +348,6 @@ class SP_Settings_General extends SP_Settings_Page {
'; } - - /** - * Output script to refresh page when mode is changed. - */ - function current_mode_setting() { - ?> - - - -