if ( isset( $parent_query[ $dkey ] ) ) { $queries[ $dkey ] =
$parent_query[ $dkey ];
} else { $queries[ $dkey ] =
$dvalue;
} } // Validate the dates passed in the query.
if ( $this->
is_first_order_clause( $queries ) ) { $this->
validate_date_values( $queries );
} // Sanitize the relation parameter.
$queries['relation'
] =
$this->
sanitize_relation( $queries['relation'
] );
foreach ( $queries as $key =>
$q ) { if ( !
is_array( $q ) ||
in_array( $key,
$this->time_keys, true
) ) { // This is a first-order query. Trust the values and sanitize when building SQL.
$cleaned_query[ $key ] =
$q;
} else { // Any array without a time key is another query, so we recurse.