[wp-trac] [WordPress Trac] #36935: Implement lazy-loading blog details in `WP_Site`
WordPress Trac
noreply at wordpress.org
Tue May 24 16:33:39 UTC 2016
#36935: Implement lazy-loading blog details in `WP_Site`
--------------------------------+-----------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version:
Severity: normal | Keywords: needs-patch
Focuses: |
--------------------------------+-----------------------------
Let's move the functionality from `get_blog_details()` that sets the
additional properties into the `WP_Site` class. However this should not
happen when instantiating a site object, but only when one of these
additional parameters is requested (magic getters).
This will bring a minor performance improvement, but more importantly it
ensures that these values are available at all times. At the current
state, it is hard to tell whether a site object has or hasn't these
properties available.
An important point to consider for the implementation is that we need to
keep the filter `blog_details` in place.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36935>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list