Make hiding child positions an option

This commit is contained in:
Brian Miyaji
2015-04-15 12:24:55 +10:00
parent fed700c3cb
commit 7297728289
3 changed files with 10 additions and 1 deletions

View File

@@ -170,7 +170,7 @@ class SP_Meta_Box_Event_Performance {
'class' => 'sp-position',
'property' => 'multiple',
'chosen' => true,
'include_children' => false,
'include_children' => ( 'no' == get_option( 'sportspress_event_hide_child_positions', 'no' ) ),
);
sp_dropdown_taxonomies( $args );
?>

View File

@@ -301,6 +301,14 @@ class SP_Settings_Events extends SP_Settings_Page {
'type' => 'checkbox',
),
array(
'title' => __( 'Positions', 'sportspress' ),
'desc' => __( 'Top-level only', 'sportspress' ),
'id' => 'sportspress_event_hide_child_positions',
'default' => 'no',
'type' => 'checkbox',
),
array(
'title' => __( 'Players', 'sportspress' ),
'desc' => __( 'Display squad numbers', 'sportspress' ),

View File

@@ -77,6 +77,7 @@
],
"options": {
"event_teams" : "2",
"sportspress_event_hide_child_positions" : "yes",
"event_show_players" : "yes",
"event_show_extras" : "no",
"event_show_total" : "yes",