[wp-trac] [WordPress Trac] #37061: Use `get_sites()` in `get_blogs_of_user()`

WordPress Trac noreply at wordpress.org
Tue Sep 27 17:50:01 UTC 2016


#37061: Use `get_sites()` in `get_blogs_of_user()`
--------------------------------+-------------------------
 Reporter:  flixos90            |       Owner:  jeremyfelt
     Type:  enhancement         |      Status:  reviewing
 Priority:  normal              |   Milestone:  4.7
Component:  Networks and Sites  |     Version:  4.6
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+-------------------------
Changes (by flixos90):

 * keywords:  has-patch needs-refresh => has-patch
 * owner:  flixos90 => jeremyfelt
 * status:  assigned => reviewing


Comment:

 [attachment:37061.2.diff] is an updated patch that preserves the original
 return types (raw objects including the property `userblog_id`). The
 function still uses `get_sites()` as proposed in this ticket.

 While I was at it, I adjusted some docs and variable names to properly
 reflect our current multisite naming conventions. Doing that, I noticed
 that the docs of the `pre_get_blogs_of_user` filter state that the
 returned value should be an array of `WP_Site` objects which is incorrect,
 so I changed it to simply "site objects" as well.

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


More information about the wp-trac mailing list