#37922 closed defect (bug) (fixed)
WP_Site_Query does not have a $join query clause to compact
Reported by: | johnjamesjacoby | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch commit |
Focuses: | multisite | Cc: |
Description
The new WP_Site_Query
class tries to compact()
the join
variable, which will never exist because there are no related tables to join against.
Recommend we either:
- Add
join
clause &$join = '';
toget_site_ids()
- Remove
join
fromcompact()
statement
Attachments (2)
Change History (9)
#2
@
8 years ago
I would say we add it in as empty as developers filtering the clauses may expect the key to exist. It also looks a bit more future-proof that way.
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
8 years ago
#4
@
8 years ago
- Keywords commit added; 2nd-opinion removed
- Milestone changed from Awaiting Review to 4.7
This can be committed, using the first patch.
#5
@
8 years ago
I think we can follow what we're doing in WP_Network_Query
and make $join
available to the sites_clauses
filter (where it could be used) but not yet add it to the sql_clauses
property (where it wouldn't yet be used).
Note: See
TracTickets for help on using
tickets.
Add