Put things in folders and stuff

This commit is contained in:
Brian Miyaji
2014-01-06 22:32:15 +11:00
parent 4e53aa5424
commit 3ab4ea33bd
26 changed files with 574 additions and 528 deletions

View File

@@ -0,0 +1,37 @@
<?php
function sp_restrict_manage_posts() {
sp_highlight_admin_menu();
global $typenow, $wp_query;
if ( in_array( $typenow, array( 'sp_event', 'sp_player', 'sp_staff', 'sp_table', 'sp_list' ) ) ):
$selected = isset( $_REQUEST['sp_team'] ) ? $_REQUEST['sp_team'] : null;
$args = array(
'show_option_none' => sprintf( __( 'All %s', 'sportspress' ), __( 'Teams', 'sportspress' ) ),
'post_type' => 'sp_team',
'name' => 'sp_team',
'selected' => $selected
);
// wp_dropdown_pages( $args );
endif;
if ( in_array( $typenow, array( 'sp_player' ) ) ):
$selected = isset( $_REQUEST['sp_position'] ) ? $_REQUEST['sp_position'] : null;
$args = array(
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Positions', 'sportspress' ) ),
'taxonomy' => 'sp_position',
'name' => 'sp_position',
'selected' => $selected
);
sp_dropdown_taxonomies( $args );
endif;
if ( in_array( $typenow, array( 'sp_team', 'sp_event', 'sp_player', 'sp_staff', 'sp_table', 'sp_list' ) ) ):
$selected = isset( $_REQUEST['sp_season'] ) ? $_REQUEST['sp_season'] : null;
$args = array(
'show_option_all' => sprintf( __( 'All %s', 'sportspress' ), __( 'Seasons', 'sportspress' ) ),
'taxonomy' => 'sp_season',
'name' => 'sp_season',
'selected' => $selected
);
sp_dropdown_taxonomies( $args );
endif;
}
add_action( 'restrict_manage_posts', 'sp_restrict_manage_posts' );
?>