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

WordPress Trac noreply at wordpress.org
Thu Sep 12 20:52:42 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.4.diff] looks good. A few things:
  * Some basic unit tests would be stellar.
  * If get_results() returns no results, the response will be `array( 0 =>
 null )` — I imagine an empty array was desired.
  * If wp_is_large_network() is true, `null` is returned — I imagine an
 empty array was desired.
  * I would document public, deleted, etc., as "defaults". The trick is to
 set them to null, which is ! isset().
  * Some super basic unit tests would be fantastic. Probably just testing
 'public' => null, true, and false; and also the return value for when
 nothing matches (as in an empty array).

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


More information about the wp-trac mailing list