Avoid filtering if League AND Season arrays are empty
It makes more sense. That way you can filter a Player List by League and Team, or by Season and Team. Otherwise you have false positives!
This commit is contained in:
@@ -78,7 +78,7 @@ class SportsPress_Player_Assignments {
|
||||
if ( 'sp_season' === sp_array_value( $param, 'taxonomy' ) ) $season_ids = sp_array_value( $param, 'terms', array() );
|
||||
}
|
||||
|
||||
if ( empty( $league_ids ) || empty( $season_ids ) ) return $args;
|
||||
if ( empty( $league_ids ) && empty( $season_ids ) ) return $args;
|
||||
|
||||
$args['meta_query'][] = array(
|
||||
'key' => 'sp_assignments',
|
||||
|
||||
Reference in New Issue
Block a user