[wp-trac] [WordPress Trac] #37061: Use `get_sites()` in `get_blogs_of_user()`
WordPress Trac
noreply at wordpress.org
Fri Sep 30 04:34:19 UTC 2016
#37061: Use `get_sites()` in `get_blogs_of_user()`
--------------------------------+-------------------------
Reporter: flixos90 | Owner: jeremyfelt
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.7
Component: Networks and Sites | Version: 4.6
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: multisite
--------------------------------+-------------------------
Changes (by jeremyfelt):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"38682"]:
{{{
#!CommitTicketReference repository="" revision="38682"
Multisite: Use `get_sites()` in `get_blogs_of_user()`.
Previously, we looped through all of the site IDs found via user meta and
ran `get_blog_details()` for each site. Now, we can pass all of the site
IDs at once to `get_sites()` and receive full `WP_Site` objects.
To avoid possible issues with return type, sites are still processed into
a standard object that also has a `userblog_id` property attached. Nothing
is changed for non-multisite configurations.
Props flixos90.
Fixes #37061.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37061#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list