From d433a58eb00f6bf324d04b3b2918ab15de4e18bd Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sat, 22 Mar 2014 17:09:23 +1100 Subject: [PATCH] Add table options to event statistics and simplify localization --- admin/settings/options-event.php | 39 ++++++++++++++++++++++++++++++- admin/settings/options-player.php | 33 ++++++++------------------ admin/settings/options-team.php | 21 ++++------------- admin/settings/options-text.php | 2 +- 4 files changed, 53 insertions(+), 42 deletions(-) diff --git a/admin/settings/options-event.php b/admin/settings/options-event.php index 1997bdf3..f6cb5fe4 100644 --- a/admin/settings/options-event.php +++ b/admin/settings/options-event.php @@ -15,7 +15,7 @@ class SportsPressEventSettingsPage { add_settings_section( 'event', - __( 'Event Options', 'sportspress' ), + __( 'Events', 'sportspress' ), '', 'sportspress_events' ); @@ -28,6 +28,14 @@ class SportsPressEventSettingsPage { 'event' ); + add_settings_field( + 'statistics', + __( 'Statistics', 'sportspress' ), + array( $this, 'statistics_callback' ), + 'sportspress_events', + 'event' + ); + add_settings_field( 'results', __( 'Results', 'sportspress' ), @@ -60,6 +68,35 @@ class SportsPressEventSettingsPage { options, 'event_statistics_responsive', true ); + $sortable = sportspress_array_value( $this->options, 'event_statistics_sortable', true ); + $link_posts = sportspress_array_value( $this->options, 'event_statistics_link_posts', true ); + ?> +
+ +
+
+ +
+
+ +
+ options, 'main_result', 0 ); diff --git a/admin/settings/options-player.php b/admin/settings/options-player.php index 3aaf6bde..981aa260 100644 --- a/admin/settings/options-player.php +++ b/admin/settings/options-player.php @@ -15,14 +15,14 @@ class SportsPressPlayerSettingsPage { add_settings_section( 'player', - __( 'Player Options', 'sportspress' ), + __( 'Players', 'sportspress' ), '', 'sportspress_players' ); add_settings_section( 'list', - __( 'Player List Options', 'sportspress' ), + __( 'Player Lists', 'sportspress' ), '', 'sportspress_players' ); @@ -51,14 +51,6 @@ class SportsPressPlayerSettingsPage { 'list' ); - add_settings_field( - 'players', - __( 'Players', 'sportspress' ), - array( $this, 'players_callback' ), - 'sportspress_players', - 'list' - ); - add_settings_field( 'metrics', __( 'Metrics', 'sportspress' ), @@ -92,6 +84,7 @@ class SportsPressPlayerSettingsPage { function list_callback() { $responsive = sportspress_array_value( $this->options, 'player_list_responsive', true ); $sortable = sportspress_array_value( $this->options, 'player_list_sortable', true ); + $link_posts = sportspress_array_value( $this->options, 'player_list_link_posts', true ); ?>
+
+ +
options, 'player_list_link_posts', true ); - ?> -
- -
- 'sp_metric', diff --git a/admin/settings/options-team.php b/admin/settings/options-team.php index 8020f77c..31278874 100644 --- a/admin/settings/options-team.php +++ b/admin/settings/options-team.php @@ -15,7 +15,7 @@ class SportsPressTeamSettingsPage { add_settings_section( 'table', - __( 'League Table Options', 'sportspress' ), + __( 'League Tables', 'sportspress' ), '', 'sportspress_teams' ); @@ -28,14 +28,6 @@ class SportsPressTeamSettingsPage { 'table' ); - add_settings_field( - 'teams', - __( 'Teams', 'sportspress' ), - array( $this, 'teams_callback' ), - 'sportspress_teams', - 'table' - ); - add_settings_field( 'columns', __( 'Columns', 'sportspress' ), @@ -48,6 +40,8 @@ class SportsPressTeamSettingsPage { function table_callback() { $responsive = sportspress_array_value( $this->options, 'league_table_responsive', true ); $sortable = sportspress_array_value( $this->options, 'league_table_sortable', true ); + $show_team_logo = sportspress_array_value( $this->options, 'league_table_show_team_logo', false ); + $link_posts = sportspress_array_value( $this->options, 'league_table_link_posts', false ); ?>
- options, 'league_table_show_team_logo', false ); - $link_posts = sportspress_array_value( $this->options, 'league_table_link_posts', false ); - ?>