[wp-trac] [WordPress Trac] #35791: WP_Site_Query class

WordPress Trac noreply at wordpress.org
Thu Jun 2 01:35:40 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 dd32):

 Replying to [comment:59 jeremyfelt]:
 > Replying to [comment:57 dd32]:
 > > Just wanted to quickly weigh in on the usage of `ARRAY_A` here.. is it
 really needed? and when would you ever want to do `ARRAY_N`?
 >
 > > It looks like it's being used for BC, but, it feels like that if the
 calling function is needing BC-data, it should be the one to massage the
 new API's return format into something it understands. (ie. in r37617, it
 should just be `$results[] = (array) get_site( $_site );`)
 >
 > I think the biggest reason right now is alignment with `get_post()`,
 `get_comment()`, and `get_term()`. I wouldn't be opposed to removing that
 argument and providing a proper `WP_Site` object.

 Yeah, I figured that was the main reason, but I don't think it's something
 we need/should carry forward to newer API's with the move towards proper
 objects.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35791#comment:60>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list