Add league taxonomy

This commit is contained in:
Brian Miyaji
2014-01-15 03:34:21 +11:00
parent 83508d138e
commit d198a2cea1
16 changed files with 853 additions and 406 deletions

View File

@@ -32,6 +32,9 @@ function sportspress_save_post( $post_id ) {
// Update staff array
sportspress_update_post_meta_recursive( $post_id, 'sp_staff', sportspress_array_value( $_POST, 'sp_staff', array() ) );
// Update league taxonomy
wp_set_post_terms( $post_id, sportspress_array_value( $_POST, 'sp_league', 0 ), 'sp_league' );
// Update season taxonomy
wp_set_post_terms( $post_id, sportspress_array_value( $_POST, 'sp_season', 0 ), 'sp_season' );
@@ -113,6 +116,9 @@ function sportspress_save_post( $post_id ) {
// Update teams array
update_post_meta( $post_id, 'sp_teams', sportspress_array_value( $_POST, 'sp_teams', array() ) );
// Update league taxonomy
wp_set_post_terms( $post_id, sportspress_array_value( $_POST, 'sp_league', 0 ), 'sp_league' );
// Update season taxonomy
wp_set_post_terms( $post_id, sportspress_array_value( $_POST, 'sp_season', 0 ), 'sp_season' );
@@ -129,6 +135,9 @@ function sportspress_save_post( $post_id ) {
// Update team array
update_post_meta( $post_id, 'sp_team', sportspress_array_value( $_POST, 'sp_team', array() ) );
// Update league taxonomy
wp_set_post_terms( $post_id, sportspress_array_value( $_POST, 'sp_league', 0 ), 'sp_league' );
// Update season taxonomy
wp_set_post_terms( $post_id, sportspress_array_value( $_POST, 'sp_season', 0 ), 'sp_season' );