[wp-trac] [WordPress Trac] #37948: Use `WP_Site` class globally

WordPress Trac noreply at wordpress.org
Fri Sep 16 06:05:02 UTC 2016


#37948: Use `WP_Site` class globally
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Networks and Sites                   |  Review
 Severity:  normal                               |     Version:
 Keywords:  has-patch needs-unit-tests 2nd-      |  Resolution:
  opinion                                        |     Focuses:  multisite
-------------------------------------------------+-------------------------

Comment (by jeremyfelt):

 Thanks for exploring this, @flixos90.

 > However, there are several functions that return a "site-like" object on
 non-multisite installs as well.

 Can you highlight some others beyond `get_blogs_of_user()`? I can somewhat
 see some of the benefits there, but can also see reasons/ways around them
 (I think). I didn't look too closely elsewhere, but it would be helpful to
 have other examples for context.

 In general - I'm wary of pushing for `WP_Site` to exist outside of
 multisite in the near future due to its close relationship with the
 `wp_blogs` table as well as a handful of its properties that only
 multisite understands. Of course, it's always possible that this changes
 in the future. :)

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


More information about the wp-trac mailing list