diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php
index 321781f5..ba27b03b 100644
--- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php
+++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-list-details.php
@@ -28,11 +28,12 @@ class SP_Meta_Box_List_Details {
?>
-
+
'sp_league',
'name' => 'sp_league',
+ 'show_option_all' => __( 'All', 'sportspress' ),
'selected' => $league_id,
'values' => 'term_id',
);
@@ -47,6 +48,7 @@ class SP_Meta_Box_List_Details {
$args = array(
'taxonomy' => 'sp_season',
'name' => 'sp_season',
+ 'show_option_all' => __( 'All', 'sportspress' ),
'selected' => $season_id,
'values' => 'term_id',
);
@@ -102,7 +104,7 @@ class SP_Meta_Box_List_Details {
ID, 'sp_player', 'block', 'sp_current_team' );
+ sp_post_checklist( $post->ID, 'sp_player', 'block', array( 'sp_league', 'sp_season', 'sp_current_team' ) );
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
?>
diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php
index dc3ca402..cb4e5fad 100644
--- a/includes/sp-core-functions.php
+++ b/includes/sp-core-functions.php
@@ -718,21 +718,27 @@ if ( !function_exists( 'sp_post_checklist' ) ) {
if ( is_array( $filters ) ):
$filter_values = array();
foreach ( $filters as $filter ):
- $filter_values = array_merge( $filter_values, (array)get_post_meta( $post->ID, $filter, false ) );
+ if ( get_taxonomy( $filter ) ):
+ $terms = (array)get_the_terms( $post->ID, $filter );
+ foreach ( $terms as $term ):
+ if ( is_object( $term ) && property_exists( $term, 'term_id' ) )
+ $filter_values[] = $term->term_id;
+ endforeach;
+ else:
+ $filter_values = array_merge( $filter_values, (array)get_post_meta( $post->ID, $filter, false ) );
+ endif;
+ endforeach;
+ else:
+ $filter = $filters;
+ if ( get_taxonomy( $filter ) ):
$terms = (array)get_the_terms( $post->ID, $filter );
foreach ( $terms as $term ):
if ( is_object( $term ) && property_exists( $term, 'term_id' ) )
$filter_values[] = $term->term_id;
endforeach;
- endforeach;
- else:
- $filter = $filters;
- $filter_values = (array)get_post_meta( $post->ID, $filter, false );
- $terms = (array)get_the_terms( $post->ID, $filter );
- foreach ( $terms as $term ):
- if ( is_object( $term ) && property_exists( $term, 'term_id' ) )
- $filter_values[] = $term->term_id;
- endforeach;
+ else:
+ $filter_values = (array)get_post_meta( $post->ID, $filter, false );
+ endif;
endif;
endif;
?>