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

WordPress Trac noreply at wordpress.org
Tue Sep 6 05:11:30 UTC 2016


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

Comment (by DrewAPicture):

 Replying to [comment:3 flixos90]:
 > Replying to [comment:2 jorbin]:
 > > I don't think having something different returned under MS from single
 site is a good decision. Seems like something that could cause plugins to
 have bugs only under one or the other. Or for code originally written for
 MS to not work and cause confusion when run on single site installs.
 >
 > I think the real problem is that we are loading the `WP_Site` class on
 Multisite only. I think we should made it compatible with non-multisite
 installs and load it on every setup which would allow us to fix this issue
 consistently. After all, every setup has a site - only in a Multisite
 there is a `WP_Network`, but I think the `WP_Site` class can be useful on
 a regular setup as well. Let's think about this and maybe open a ticket.

 +1 for exploring global use of `WP_Site`. Care to open a ticket?

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


More information about the wp-trac mailing list