Fix permissions, add post filters

This commit is contained in:
Brian Miyaji
2014-02-01 22:28:49 +11:00
parent b3270a06b1
commit bd8561cdba
15 changed files with 290 additions and 203 deletions

View File

@@ -32,5 +32,16 @@ function sportspress_restrict_manage_posts() {
);
sportspress_dropdown_taxonomies( $args );
endif;
if ( in_array( $typenow, array( 'sp_event', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' ) ) ):
$selected = isset( $_REQUEST['team'] ) ? $_REQUEST['team'] : null;
$args = array(
'post_type' => 'sp_team',
'name' => 'team',
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
'selected' => $selected,
'values' => 'ID',
);
sportspress_dropdown_pages( $args );
endif;
}
add_action( 'restrict_manage_posts', 'sportspress_restrict_manage_posts' );