[wp-trac] [WordPress Trac] #36935: Implement lazy-loading blog details in `WP_Site`

WordPress Trac noreply at wordpress.org
Wed Jun 29 12:21:03 UTC 2016


#36935: Implement lazy-loading blog details in `WP_Site`
--------------------------------+-------------------------
 Reporter:  flixos90            |       Owner:  jeremyfelt
     Type:  enhancement         |      Status:  reviewing
 Priority:  normal              |   Milestone:  4.6
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+-------------------------

Comment (by flixos90):

 I thought about an a little different approach in
 [attachment:36935.9.diff]. Considering we had several cases where certain
 data is not available in `sunrise.php` (can't recall where exactly, but it
 was in more tickets than just here), I think we should add a new action
 `ms_loaded` that is run at the end of `ms-settings.php`, after site and
 network have been detected and WPDB and cache have been setup.

 This gives us a more simple means to check whether site details are
 available or not, and it actually allows us to provide an accurate result
 for the isset-er.

 I also changed the approach for the foreach according to my above
 proposal. I actually think it's not even required with the new `ms_loaded`
 check, but we might still leave it in there to make sure.

 Although adding a new action this close before Beta is generally not
 preferable, I hope we can get away with it as I think it is
 straightforward and we're so close before the finish line with this
 ticket. What do you think @jeremyfelt? If you agree with this approach,
 maybe we should deal with the action in a quick separate ticket for
 organization.

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


More information about the wp-trac mailing list