Flatten meta query arrays
This commit is contained in:
@@ -389,21 +389,17 @@ class SP_Calendar extends SP_Secondary_Post {
|
|||||||
|
|
||||||
if ( ! empty( $teams ) ) {
|
if ( ! empty( $teams ) ) {
|
||||||
$args['meta_query'][] = array(
|
$args['meta_query'][] = array(
|
||||||
array(
|
'key' => 'sp_team',
|
||||||
'key' => 'sp_team',
|
'value' => $teams,
|
||||||
'value' => $teams,
|
'compare' => 'IN',
|
||||||
'compare' => 'IN',
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $players ) ) {
|
if ( ! empty( $players ) ) {
|
||||||
$args['meta_query'] = array(
|
$args['meta_query'][] = array(
|
||||||
array(
|
'key' => 'sp_player',
|
||||||
'key' => 'sp_player',
|
'value' => $players,
|
||||||
'value' => $players,
|
'compare' => 'IN',
|
||||||
'compare' => 'IN',
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user