Add season and venue dropdowns to event edit page

This commit is contained in:
Brian Miyaji
2014-01-11 17:05:29 +11:00
parent 81a43185b8
commit 36a8e038b3
4 changed files with 46 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ function sportspress_season_term_init() {
$name = __( 'Seasons', 'sportspress' );
$singular_name = __( 'Season', 'sportspress' );
$lowercase_name = __( 'season', 'sportspress' );
$object_type = array( 'sp_event', 'sp_calendar', 'sp_team', 'sp_table', 'sp_player', 'sp_list', 'sp_staff' );
$object_type = array( 'sp_calendar', 'sp_team', 'sp_player', 'sp_staff' );
$labels = sportspress_get_term_labels( $name, $singular_name, $lowercase_name );
$args = array(
'label' => $name,
@@ -13,11 +13,9 @@ function sportspress_season_term_init() {
'rewrite' => array( 'slug' => 'season' )
);
register_taxonomy( 'sp_season', $object_type, $args );
register_taxonomy_for_object_type( 'sp_season', 'sp_event' );
register_taxonomy_for_object_type( 'sp_season', 'sp_calendar' );
register_taxonomy_for_object_type( 'sp_season', 'sp_team' );
register_taxonomy_for_object_type( 'sp_season', 'sp_player' );
register_taxonomy_for_object_type( 'sp_season', 'sp_list' );
register_taxonomy_for_object_type( 'sp_season', 'sp_staff' );
}
add_action( 'init', 'sportspress_season_term_init' );