[wp-trac] [WordPress Trac] #40229: Add meta_query to wp_site_query
WordPress Trac
noreply at wordpress.org
Tue Apr 3 16:46:52 UTC 2018
#40229: Add meta_query to wp_site_query
-------------------------------------------------+------------------------
Reporter: spacedmonkey | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.0
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: ms-roadmap has-patch has-unit-tests | Focuses: multisite
-------------------------------------------------+------------------------
Changes (by flixos90):
* keywords: needs-patch needs-unit-tests ms-roadmap => ms-roadmap has-
patch has-unit-tests
* owner: spacedmonkey => flixos90
Comment:
[attachment:40229.diff] implements meta query functionality in
`WP_Site_Query`:
* The implementation itself is trivial and straightforward. It follows
mostly how other query classes do it. The orderby-meta functionality
deserves an extra look because it's the most complicated part, but the
provided tests confirm it works as expected.
* `class-wp-meta-query.php` is loaded earlier in `wp-settings.php` to
allow this functionality early during the multisite bootstrap process.
This will fix #40948.
* Comprehensive tests have been added for the meta query functionality,
i.e. one parameterized test with 10 datasets, each testing different
behavior.
* Three additional tests have been added to verify that
adding/updating/deleting site meta busts the site query cache.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40229#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list