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:
Jeremy Felt 2016-09-20 17:49:28 +00:00
parent 1adca14cd7
commit 02c8bd1909
2 changed files with 3 additions and 1 deletions

View File

@ -514,6 +514,8 @@ class WP_Site_Query {
$this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
}
$join = '';
$where = implode( ' AND ', $this->sql_clauses['where'] );
$pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );

View File

@ -4,7 +4,7 @@
*
* @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.