Fix team filtering and add taxonomy links

This commit is contained in:
Brian Miyaji
2014-02-13 17:58:47 +11:00
parent 76ee8413b3
commit c886b143bc
5 changed files with 30 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ function sportspress_parse_query( $query ) {
if ( is_admin() && $pagenow == 'edit.php' ):
if( in_array( $typenow, array( 'sp_event', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) && isset( $_GET['team'] ) ):
if( in_array( $typenow, array( 'sp_event', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) && isset( $_GET['team'] ) && $_GET['team'] != null ):
$query->query_vars['meta_key'] = 'sp_team';
$query->query_vars['meta_value'] = $_GET['team'];
endif;

View File

@@ -37,11 +37,11 @@ function sportspress_restrict_manage_posts() {
$args = array(
'post_type' => 'sp_team',
'name' => 'team',
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
'show_option_none' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
'selected' => $selected,
'values' => 'ID',
);
sportspress_dropdown_pages( $args );
wp_dropdown_pages( $args );
endif;
}
add_action( 'restrict_manage_posts', 'sportspress_restrict_manage_posts' );