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

WordPress Trac noreply at wordpress.org
Fri May 20 04:40:42 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 has-unit-    |     Focuses:  multisite
  tests                                          |

Comment (by jeremyfelt):

 In [changeset:"37468"]:
 #!CommitTicketReference repository="" revision="37468"
 Multisite: Introduce `get_site()`

 Given a site ID or site object, `get_site()` retrieves site data in the
 same vein as `get_post()` or `get_comment()`. This will allow for clean
 retrieval of sites from a primed cache when `WP_Site_Query` is

 Adds a `WP_Site::to_array()` method to support multiple return types
 within `get_site()`.

 Props spacedmonkey.
 See #35791.

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

More information about the wp-trac mailing list