diff --git a/assets/js/admin/sportspress-admin.js b/assets/js/admin/sportspress-admin.js index 87b44db2..07aaa7a7 100644 --- a/assets/js/admin/sportspress-admin.js +++ b/assets/js/admin/sportspress-admin.js @@ -54,7 +54,7 @@ jQuery(document).ready(function($){ }); // Tab filter - $(".sp-tab-panel").siblings(".sp-tab-select").find("select").change(function() { + $(".sp-tab-filter-panel").siblings(".sp-tab-select").find("select").change(function() { var val = $(this).val(); var filter = ".sp-filter-"+val; var $filters = $(this).closest(".sp-tab-select").siblings(".sp-tab-select"); @@ -86,7 +86,7 @@ jQuery(document).ready(function($){ }); // Trigger tab filter - $(".sp-tab-panel").siblings(".sp-tab-select").find("select").change(); + $(".sp-tab-filter-panel").siblings(".sp-tab-select").find("select").change(); // Dropdown filter $(".sp-dropdown-target").siblings(".sp-dropdown-filter").find("select").change(function() { diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php index e31a7d40..b37e1826 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-details.php @@ -33,7 +33,7 @@ class SP_Meta_Box_Event_Details {
diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php index aacad8ae..23991dd4 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-teams.php @@ -71,7 +71,10 @@ class SP_Meta_Box_Event_Teams { $post_type ) { - sp_post_checklist( $post->ID, $post_type, ( 0 == $index ? 'block' : 'none' ), array( 'sp_league', 'sp_season', 'sp_current_team' ), $i ); + do_action( 'sportspress_event_teams_meta_box_checklist', $post->ID, $post_type, ( 0 == $index ? 'block' : 'none' ), $team, $i ); + if ( apply_filters( 'sportspress_event_teams_meta_box_default_checklist', true ) ) { + sp_post_checklist( $post->ID, $post_type, ( 0 == $index ? 'block' : 'none' ), array( 'sp_league', 'sp_season', 'sp_current_team' ), $i ); + } } ?> @@ -96,6 +99,7 @@ class SP_Meta_Box_Event_Teams { sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) ); endif; } + wp_nonce_field( 'sp-get-players', 'sp-get-players-nonce', false ); } /** diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 802606fb..8eb95410 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -783,7 +783,7 @@ if ( !function_exists( 'sp_post_checklist' ) ) { if ( ! isset( $post_id ) ) global $post_id; ?> -
+
  • @@ -1201,7 +1201,7 @@ if ( !function_exists( 'sp_get_next_event' ) ) { } if ( !function_exists( 'sp_taxonomy_field' ) ) { - function sp_taxonomy_field( $taxonomy = 'category', $post = null, $multiple = false ) { + function sp_taxonomy_field( $taxonomy = 'category', $post = null, $multiple = false, $trigger = false ) { $obj = get_taxonomy( $taxonomy ); if ( $obj ) { $post_type = get_post_type( $post ); @@ -1222,7 +1222,7 @@ if ( !function_exists( 'sp_taxonomy_field' ) ) { 'name' => 'tax_input[' . $taxonomy . '][]', 'selected' => $term_ids, 'values' => 'term_id', - 'class' => 'sp-has-dummy widefat', + 'class' => 'sp-has-dummy widefat' . ( $trigger ? ' sp-ajax-trigger' : '' ), 'chosen' => true, 'placeholder' => __( 'All', 'sportspress' ), );