FIX: Avoid overriding relation operator of query_vars if already set
This commit is contained in:
@@ -306,6 +306,8 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
global $typenow, $wp_query;
|
global $typenow, $wp_query;
|
||||||
|
|
||||||
if ( $typenow == 'sp_event' ) {
|
if ( $typenow == 'sp_event' ) {
|
||||||
|
//Avoid overriding relation operator if already set
|
||||||
|
if ( !isset( $query->query_vars['meta_query']['relation'] ) )
|
||||||
$query->query_vars['meta_query']['relation'] = 'AND';
|
$query->query_vars['meta_query']['relation'] = 'AND';
|
||||||
|
|
||||||
if ( ! empty( $_GET['team'] ) ) {
|
if ( ! empty( $_GET['team'] ) ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user