Use term_id where appropriate

This commit is contained in:
Brian Miyaji
2016-07-30 02:25:02 +10:00
parent 963bbe15e2
commit 0d0c4dde3a
7 changed files with 22 additions and 22 deletions

View File

@@ -167,12 +167,12 @@ class SP_Meta_Box_Player_Statistics {
array( array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'terms' => $league_id, 'terms' => $league_id,
'field' => 'id', 'field' => 'term_id',
), ),
array( array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'terms' => $div_id, 'terms' => $div_id,
'field' => 'id', 'field' => 'term_id',
), ),
), ),
); );

View File

@@ -183,7 +183,7 @@ class SP_Calendar extends SP_Custom_Post {
if ( isset( $league_ids ) ) { if ( isset( $league_ids ) ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_ids 'terms' => $league_ids
); );
} }
@@ -191,7 +191,7 @@ class SP_Calendar extends SP_Custom_Post {
if ( isset( $season_ids ) ) { if ( isset( $season_ids ) ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $season_ids 'terms' => $season_ids
); );
} }
@@ -199,7 +199,7 @@ class SP_Calendar extends SP_Custom_Post {
if ( isset( $venue_ids ) ) { if ( isset( $venue_ids ) ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_venue', 'taxonomy' => 'sp_venue',
'field' => 'id', 'field' => 'term_id',
'terms' => $venue_ids 'terms' => $venue_ids
); );
} }

View File

@@ -60,7 +60,7 @@ class SP_League_Table extends SP_Custom_Post{
if ( $league_ids ): if ( $league_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_ids 'terms' => $league_ids
); );
endif; endif;
@@ -68,7 +68,7 @@ class SP_League_Table extends SP_Custom_Post{
if ( $season_ids ): if ( $season_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $season_ids 'terms' => $season_ids
); );
endif; endif;
@@ -202,7 +202,7 @@ class SP_League_Table extends SP_Custom_Post{
if ( $league_ids ): if ( $league_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_ids 'terms' => $league_ids
); );
endif; endif;
@@ -210,7 +210,7 @@ class SP_League_Table extends SP_Custom_Post{
if ( $season_ids ): if ( $season_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $season_ids 'terms' => $season_ids
); );
endif; endif;

View File

@@ -73,7 +73,7 @@ class SP_Player_List extends SP_Custom_Post {
if ( $league_ids ): if ( $league_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_ids 'terms' => $league_ids
); );
endif; endif;
@@ -81,7 +81,7 @@ class SP_Player_List extends SP_Custom_Post {
if ( $season_ids ): if ( $season_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $season_ids 'terms' => $season_ids
); );
endif; endif;
@@ -89,7 +89,7 @@ class SP_Player_List extends SP_Custom_Post {
if ( $position_ids ): if ( $position_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_position', 'taxonomy' => 'sp_position',
'field' => 'id', 'field' => 'term_id',
'terms' => $position_ids 'terms' => $position_ids
); );
endif; endif;
@@ -219,7 +219,7 @@ class SP_Player_List extends SP_Custom_Post {
if ( $league_ids ): if ( $league_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_ids 'terms' => $league_ids
); );
endif; endif;
@@ -227,7 +227,7 @@ class SP_Player_List extends SP_Custom_Post {
if ( $season_ids ): if ( $season_ids ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $season_ids 'terms' => $season_ids
); );
endif; endif;

View File

@@ -274,7 +274,7 @@ class SP_Player extends SP_Custom_Post {
if ( $league_id ): if ( $league_id ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_id 'terms' => $league_id
); );
endif; endif;
@@ -282,7 +282,7 @@ class SP_Player extends SP_Custom_Post {
if ( $div_id ): if ( $div_id ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $div_id 'terms' => $div_id
); );
endif; endif;

View File

@@ -160,7 +160,7 @@ class SP_Team extends SP_Custom_Post {
if ( $league_id ): if ( $league_id ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league_id 'terms' => $league_id
); );
endif; endif;
@@ -168,7 +168,7 @@ class SP_Team extends SP_Custom_Post {
if ( $div_id ): if ( $div_id ):
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $div_id 'terms' => $div_id
); );
endif; endif;

View File

@@ -72,7 +72,7 @@ class SportsPress_Lazy_Loading {
if ( $league ) { if ( $league ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => $league, 'terms' => $league,
); );
} }
@@ -80,7 +80,7 @@ class SportsPress_Lazy_Loading {
if ( $season ) { if ( $season ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => $season, 'terms' => $season,
); );
} }
@@ -156,7 +156,7 @@ class SportsPress_Lazy_Loading {
if ( $leagues ) { if ( $leagues ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_league', 'taxonomy' => 'sp_league',
'field' => 'id', 'field' => 'term_id',
'terms' => wp_list_pluck( $leagues, 'term_id' ), 'terms' => wp_list_pluck( $leagues, 'term_id' ),
); );
} }
@@ -164,7 +164,7 @@ class SportsPress_Lazy_Loading {
if ( $seasons ) { if ( $seasons ) {
$args['tax_query'][] = array( $args['tax_query'][] = array(
'taxonomy' => 'sp_season', 'taxonomy' => 'sp_season',
'field' => 'id', 'field' => 'term_id',
'terms' => wp_list_pluck( $seasons, 'term_id' ), 'terms' => wp_list_pluck( $seasons, 'term_id' ),
); );
} }