mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 13:41:24 +01:00
Multisite: Provide $join
as a possible SQL clause to the sites_clauses
filter.
Previously, `compact()` provided a non existent `$join` and could cause confusion for anyone attempting to extend `WP_Site_Query` with their own tables. This aligns with the current behavior in `WP_Network_Query`. Props johnjamesjacoby. Fixes #37922. Built from https://develop.svn.wordpress.org/trunk@38631 git-svn-id: http://core.svn.wordpress.org/trunk@38574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1adca14cd7
commit
02c8bd1909
@ -514,6 +514,8 @@ class WP_Site_Query {
|
|||||||
$this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
|
$this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$join = '';
|
||||||
|
|
||||||
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
$where = implode( ' AND ', $this->sql_clauses['where'] );
|
||||||
|
|
||||||
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-alpha-38630';
|
$wp_version = '4.7-alpha-38631';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user