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. git-svn-id: https://develop.svn.wordpress.org/trunk@38631 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9bb6bd0f89
commit
e0ef4132fe
@ -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' );
|
||||||
|
Loading…
Reference in New Issue
Block a user