);
// Clauses connected by OR can share joins as long as they have "positive" operators.
if ( 'OR' === $parent_query['relation'] ) {
$compatible_compares = array( '=', 'IN', 'BETWEEN', 'LIKE', 'REGEXP', 'RLIKE', '>', '>=', '<', '<=' );
// Clauses joined by AND with "negative" operators share a join only if they also share a key.
} elseif ( isset( $sibling['key'] ) && isset( $clause['key'] ) && $sibling['key'] === $clause['key'] ) {
$compatible_compares = array( '!=', 'NOT IN', 'NOT LIKE' );
}
$clause_compare = strtoupper( $clause['compare'] );
$sibling_compare = strtoupper( $sibling['compare'] );
if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) {
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
break;
}
}
/**
* Filters the table alias identified as compatible with the current clause.
*
* @since 4.1.0
*
* @param string|false $alias Table alias, or false if none was found.
* @param array $clause First-order query clause.
* @param array $parent_query Parent of $clause.
* @param WP_Meta_Query $query WP_Meta_Query object.
*/
return apply_filters( 'meta_query_find_compatible_table_alias', $alias, $clause, $parent_query, $this );
}
/**
* Checks whether the current query has any OR relations.
*
* In some cases, the presence of an OR relation somewhere in the query will require
* the use of a `DISTINCT` or `GROUP BY` keyword in the `SELECT` clause. The current
* method can be used in these cases to determine whether such a clause is necessary.
*
* @since 4.3.0
*
* @return bool True if the query contains any `OR` relations, otherwise false.
*/
public function has_or_relation() {
return $this->has_or_relation;
}
}
Fatal error: require_once(): Failed opening required '/home/ocb/public_html/wp-includes/blocks/query.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /home/ocb/public_html/wp-includes/blocks/require-dynamic-blocks.php on line 53
Fatal error: Uncaught Error: Call to a member function set() on null in /home/ocb/public_html/wp-includes/l10n.php:856
Stack trace:
#0 /home/ocb/public_html/wp-includes/l10n.php(959): load_textdomain('default', '/home/ocb/publi...', 'lv')
#1 /home/ocb/public_html/wp-includes/class-wp-fatal-error-handler.php(49): load_default_textdomain()
#2 [internal function]: WP_Fatal_Error_Handler->handle()
#3 {main}
thrown in /home/ocb/public_html/wp-includes/l10n.php on line 856