From 42dc93c3675cb600f86f7c8047a74634e2008653 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Mon, 13 Oct 2014 17:02:37 +1100 Subject: [PATCH] Add blank option in staff details --- .../post-types/meta-boxes/class-sp-meta-box-staff-details.php | 1 + includes/sp-core-functions.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php index c1b555c9..791ccc3c 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php @@ -59,6 +59,7 @@ class SP_Meta_Box_Staff_Details { 'name' => 'sp_role', 'selected' => $role, 'values' => 'term_id', + 'show_option_blank' => true, 'placeholder' => sprintf( __( 'Select %s', 'sportspress' ), __( 'Role', 'sportspress' ) ), 'class' => 'widefat', 'chosen' => true, diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 6a7229bc..1bc1c8b6 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -451,6 +451,7 @@ if ( !function_exists( 'sp_dropdown_dates' ) ) { if ( !function_exists( 'sp_dropdown_taxonomies' ) ) { function sp_dropdown_taxonomies( $args = array() ) { $defaults = array( + 'show_option_blank' => false, 'show_option_all' => false, 'show_option_none' => false, 'taxonomy' => null, @@ -495,6 +496,9 @@ if ( !function_exists( 'sp_dropdown_taxonomies' ) ) { printf( '