Query: Consistently include a space in parentheses in `WP_Meta_Query::get_sql_for_clause()`.
Props jillebehm, kaavyaiyer, hareesh-pillai. Fixes #49279. Built from https://develop.svn.wordpress.org/trunk@50576 git-svn-id: http://core.svn.wordpress.org/trunk@50189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a66cb4bb18
commit
d6cc4f1aec
|
@ -560,9 +560,9 @@ class WP_Meta_Query {
|
||||||
$join .= $i ? " AS $alias" : '';
|
$join .= $i ? " AS $alias" : '';
|
||||||
|
|
||||||
if ( 'LIKE' === $meta_compare_key ) {
|
if ( 'LIKE' === $meta_compare_key ) {
|
||||||
$join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key LIKE %s )", '%' . $wpdb->esc_like( $clause['key'] ) . '%' );
|
$join .= $wpdb->prepare( " ON ( $this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key LIKE %s )", '%' . $wpdb->esc_like( $clause['key'] ) . '%' );
|
||||||
} else {
|
} else {
|
||||||
$join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key'] );
|
$join .= $wpdb->prepare( " ON ( $this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// All other JOIN clauses.
|
// All other JOIN clauses.
|
||||||
|
|
|
@ -2598,7 +2598,7 @@ class WP_Query {
|
||||||
// Comments feeds.
|
// Comments feeds.
|
||||||
if ( $this->is_comment_feed && ! $this->is_singular ) {
|
if ( $this->is_comment_feed && ! $this->is_singular ) {
|
||||||
if ( $this->is_archive || $this->is_search ) {
|
if ( $this->is_archive || $this->is_search ) {
|
||||||
$cjoin = "JOIN {$wpdb->posts} ON ({$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID) $join ";
|
$cjoin = "JOIN {$wpdb->posts} ON ( {$wpdb->comments}.comment_post_ID = {$wpdb->posts}.ID ) $join ";
|
||||||
$cwhere = "WHERE comment_approved = '1' $where";
|
$cwhere = "WHERE comment_approved = '1' $where";
|
||||||
$cgroupby = "{$wpdb->comments}.comment_id";
|
$cgroupby = "{$wpdb->comments}.comment_id";
|
||||||
} else { // Other non-singular, e.g. front.
|
} else { // Other non-singular, e.g. front.
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-alpha-50575';
|
$wp_version = '5.8-alpha-50576';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue