[wp-trac] [WordPress Trac] #35791: WP_Site_Query class
WordPress Trac
noreply at wordpress.org
Mon Jun 6 17:36:24 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 flixos90):
Replying to [comment:63 jeremyfelt]:
> 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.
I agree that we rather shouldn't do it. Keeping it a regular object only
will be a more structured long-term solution even if that leaves us with a
little higher amount of functions that we need to adjust after
`wp_get_sites()` has been deprecated (use objects instead of arrays).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35791#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list