[wp-trac] [WordPress Trac] #35791: WP_Site_Query class

WordPress Trac noreply at wordpress.org
Fri Apr 29 00:19:33 UTC 2016


#35791: WP_Site_Query class
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:  jeremyfelt
     Type:  task (blessed)                       |      Status:  reviewing
 Priority:  normal                               |   Milestone:  4.6
Component:  Networks and Sites                   |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:  multisite
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by flixos90):

 [attachment:35791-class.2.patch] fixes some bugs/inconsistencies and
 includes minor improvements.

 * use `sites` as cache group, similar to `WP_Site`
 * pass site IDs to `_prime_site_caches()` instead of network IDs
 * `$orderby` support for `site__in` and `network__in`
 * removed `$found_orderby_blog_id` variable (unused)
 * removed `$filtered_where_clause` property (unused)
 * simplified search clause SQL process (AND is no longer prepended, so we
 don't need to remove it afterwards)
 * sort ascending by default (since default sort is by site ID)
 * use class property `$date_query` to store `WP_Date_Query` object
 * fixed docs for `$orderby` argument and `$order` argument
 * added docs for `parse_site_query` action

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35791#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list