[wp-trac] [WordPress Trac] #14511: new function - wp_get_sites($args)

WordPress Trac noreply at wordpress.org
Tue Aug 27 14:29:00 UTC 2013


#14511: new function - wp_get_sites($args)
-------------------------------------+------------------
 Reporter:  transom                  |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  3.7
Component:  Multisite                |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------

Comment (by nacin):

 [attachment:14511.diff] is simple and definitely an improvement over
 get_blog_list(), [http://lists.automattic.com/pipermail/wp-
 hackers/2013-July/046419.html which I've previously ranted about].

 I'd argue that $network_id should be a default argument in $args, and that
 setting it to null, bool, or 'all' should allow all network IDs to be
 queried; it should probably also take an array of network IDs to query.
 What about querying regardless of the value of `public` or other flags?
 (As in, you want any sites whether it is public or not.) What about
 querying by domain and by path? What about wp_is_large_network()? Is it
 worth looking into a proper WP_Site_Query class?

 Not suggesting this should get out of hand, but just tossing out some
 ideas. I'm fine with [attachment:14511.diff], with minor modifications,
 for 3.7.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/14511#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list