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

WordPress Trac noreply at wordpress.org
Wed Jun 29 09:21:27 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 jeremyfelt):

 [attachment:36935.7.diff] introduces the `get_details()` method to
 `WP_Site`. This allows for lazy loading of extended site details without
 deprecating `get_blog_details()`.

 A couple notes:

 * I changed the filter from `blog_details` to `site_details` to avoid any
 conflict with the filter that we would have needed to maintain back-compat
 with. This may help make a cleaner break if we keep `get_blog_details()`
 available and suggest that everyone move to `get_site()`.
 * Details aren't available when `get_site()` is used in `sunrise.php`.
 Should `isset()` return `false` when an option is not available?

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


More information about the wp-trac mailing list