[wp-trac] [WordPress Trac] #35791: WP_Site_Query class
WordPress Trac
noreply at wordpress.org
Thu Jun 2 22:16:58 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 needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by jeremyfelt):
[attachment:35791-get-site.diff] removes the output parameter from
`get_site()` and instead casts `(array)` on individual sites inside
`wp_get_sites()` to maintain back-compat.
I'm not sure we need to implement `ArrayAccess` for `WP_Site`. Most
developers using sites in this way should be aware of either `WP_Site` or
the `stdClass` objects that preceded it. `wp_get_sites()` is an outlier
because it queried the database directly and requested `ARRAY_A` to solve
a specific problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35791#comment:63>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list