[wp-trac] [WordPress Trac] #35791: WP_Site_Query class
WordPress Trac
noreply at wordpress.org
Mon Apr 18 16:04:11 UTC 2016
#35791: WP_Site_Query class
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner:
Type: task (blessed) | Status: new
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 spacedmonkey):
This one was a smaller patch. Changes include.
- Fixed wp_get_sites so it now returns ARRAY_A.
- Also added new orderby params of domain_length and path_length. I am not
a massive fan of the naming, so willing to change.
- Fixed formatting in http.php
When I get some more time I will generate two patches. I think that unit
tests and comments are the last things we should look at once the api has
been locked in and the class is unlikely to change. It would be extremely
helpful if someone could make a start of the tests for this.
Last thing, was thinking we should add a new function called get_sites.
This will work the same as get_posts and get_comments, as a wrapper to the
query objects. We should deprecate wp_get_sites, as the naming of the
function does not fit in with WP standards and the return value is
ARRAY_A.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35791#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list