$player_performance ):
- if ( !$player_id ) continue;
+ if ( $player_id <= 0 ) continue;
$number = get_post_meta( $player_id, 'sp_number', true );
$value = sp_array_value( $player_performance, 'number', '' );
?>
@@ -129,16 +164,19 @@ class SP_Meta_Box_Event_Performance {
|
'sp_position',
- 'name' => 'sp_players[' . $team_id . '][' . $player_id . '][position]',
+ 'name' => 'sp_players[' . $team_id . '][' . $player_id . '][position][]',
'values' => 'term_id',
'orderby' => 'slug',
'selected' => $selected,
+ 'class' => 'sp-position',
+ 'property' => 'multiple',
+ 'chosen' => true,
);
sp_dropdown_taxonomies( $args );
?>
diff --git a/includes/admin/settings/class-sp-settings-events.php b/includes/admin/settings/class-sp-settings-events.php
index 8d03c2bf..242cbe9b 100644
--- a/includes/admin/settings/class-sp-settings-events.php
+++ b/includes/admin/settings/class-sp-settings-events.php
@@ -40,7 +40,7 @@ class SP_Settings_Events extends SP_Settings_Page {
$settings = array_merge(
array(
- array( 'title' => __( 'Event Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'event_options' ),
+ array( 'title' => __( 'Event Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'event_options' ),
),
apply_filters( 'sportspress_event_options', array(
@@ -86,24 +86,8 @@ class SP_Settings_Events extends SP_Settings_Page {
),
array(
- 'desc' => __( 'Players', 'sportspress' ),
- 'id' => 'sportspress_event_show_players',
- 'default' => 'yes',
- 'type' => 'checkbox',
- 'checkboxgroup' => '',
- ),
-
- array(
- 'desc' => __( 'Staff', 'sportspress' ),
- 'id' => 'sportspress_event_show_staff',
- 'default' => 'yes',
- 'type' => 'checkbox',
- 'checkboxgroup' => '',
- ),
-
- array(
- 'desc' => __( 'Total', 'sportspress' ),
- 'id' => 'sportspress_event_show_total',
+ 'desc' => __( 'Player Performance', 'sportspress' ),
+ 'id' => 'sportspress_event_show_performance',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'end',
@@ -124,17 +108,6 @@ class SP_Settings_Events extends SP_Settings_Page {
array( 'type' => 'delimiter' ),
- array(
- 'title' => __( 'Player Performance', 'sportspress' ),
- 'id' => 'sportspress_event_performance_mode',
- 'default' => 'values',
- 'type' => 'radio',
- 'options' => array(
- 'values' => __( 'Values', 'sportspress' ),
- 'icons' => __( 'Icons', 'sportspress' ),
- ),
- ),
-
array(
'title' => __( 'Venues', 'sportspress' ),
'desc' => __( 'Display maps', 'sportspress' ),
@@ -185,10 +158,103 @@ class SP_Settings_Events extends SP_Settings_Page {
'default' => 'no',
'type' => 'checkbox',
),
- )),
+ ) ),
array(
array( 'type' => 'sectionend', 'id' => 'event_options' ),
+ ),
+
+ array(
+ array( 'title' => __( 'Player Performance', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'performance_options' ),
+ ),
+
+ apply_filters( 'sportspress_performance_options', array(
+ array(
+ 'title' => __( 'Rows', 'sportspress' ),
+ 'desc' => __( 'Staff', 'sportspress' ),
+ 'id' => 'sportspress_event_show_staff',
+ 'default' => 'yes',
+ 'type' => 'checkbox',
+ 'checkboxgroup' => 'start',
+ ),
+
+ array(
+ 'desc' => __( 'Players', 'sportspress' ),
+ 'id' => 'sportspress_event_show_players',
+ 'default' => 'yes',
+ 'type' => 'checkbox',
+ 'checkboxgroup' => '',
+ ),
+
+ array(
+ 'desc' => __( 'Extras', 'sportspress' ),
+ 'id' => 'sportspress_event_show_extras',
+ 'default' => 'no',
+ 'type' => 'checkbox',
+ 'checkboxgroup' => '',
+ ),
+
+ array(
+ 'desc' => __( 'Total', 'sportspress' ),
+ 'id' => 'sportspress_event_show_total',
+ 'default' => 'yes',
+ 'type' => 'checkbox',
+ 'checkboxgroup' => 'end',
+ ),
+
+ array(
+ 'title' => __( 'Columns', 'sportspress' ),
+ 'id' => 'sportspress_event_performance_columns',
+ 'default' => 'auto',
+ 'type' => 'radio',
+ 'options' => array(
+ 'auto' => __( 'Auto', 'sportspress' ),
+ 'manual' => __( 'Manual', 'sportspress' ),
+ ),
+ ),
+
+ array(
+ 'title' => __( 'Mode', 'sportspress' ),
+ 'id' => 'sportspress_event_performance_mode',
+ 'default' => 'values',
+ 'type' => 'radio',
+ 'options' => array(
+ 'values' => __( 'Values', 'sportspress' ),
+ 'icons' => __( 'Icons', 'sportspress' ),
+ ),
+ ),
+
+ array(
+ 'title' => __( 'Players', 'sportspress' ),
+ 'desc' => __( 'Display squad numbers', 'sportspress' ),
+ 'id' => 'sportspress_event_show_player_numbers',
+ 'default' => 'yes',
+ 'type' => 'checkbox',
+ 'checkboxgroup' => 'start',
+ ),
+
+ array(
+ 'desc' => __( 'Split players by position', 'sportspress' ),
+ 'id' => 'sportspress_event_split_players_by_position',
+ 'default' => 'false',
+ 'type' => 'checkbox',
+ 'checkboxgroup' => 'end',
+ ),
+
+ array(
+ 'title' => __( 'Total', 'sportspress' ),
+ 'id' => 'sportspress_event_total_performance',
+ 'default' => 'all',
+ 'type' => 'radio',
+ 'options' => array(
+ 'all' => __( 'All', 'sportspress' ),
+ 'primary' => __( 'Primary', 'sportspress' ),
+ ),
+ ),
+ ) ),
+
+ array(
+ array( 'type' => 'sectionend', 'id' => 'performance_options' ),
)
);
diff --git a/includes/admin/views/html-admin-config.php b/includes/admin/views/html-admin-config.php
index 97458a09..69739f99 100644
--- a/includes/admin/views/html-admin-config.php
+++ b/includes/admin/views/html-admin-config.php
@@ -77,7 +77,7 @@
|
|