[wp-trac] [WordPress Trac] #40511: get_blogs_of_user should return an array of WP_Site objects

WordPress Trac noreply at wordpress.org
Sat Apr 22 12:20:13 UTC 2017


#40511: get_blogs_of_user should return an array of WP_Site objects
--------------------------------+------------------------------
 Reporter:  spacedmonkey        |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------------

Comment (by spacedmonkey):

 In 40511.2.diff I forced the magic _get to run, fixing the get_object_vars
 issue.

 I agree with the point that it is a little weird to have two different
 results. The reason I opened this ticket was the following reason.

 In the admin bar, you have a list of your sites. To display a list of
 sites, switch_to_blog is used. Related to #40513 want to pass the WP_Site
 object where it is possible. Passing the WP_Site to  switch_to_blog gives
 much more context to the switching. I have ticket that explains it better
 [https://github.com/stuttter/wp-multi-network/issues/118 here].

 Also, when listing sites, we really should be using WP_site objects, it
 was really confusing to find out it didn't.

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


More information about the wp-trac mailing list