[wp-trac] [WordPress Trac] #36717: Allow to access network and site properties using the current naming conventions
WordPress Trac
noreply at wordpress.org
Thu Jun 9 18:33:59 UTC 2016
#36717: Allow to access network and site properties using the current naming
conventions
-------------------------------------+------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.6
Component: Networks and Sites | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: multisite
-------------------------------------+------------------------
Comment (by jeremyfelt):
Some thoughts after pondering and discussing the cache conundrum over the
last couple days...
* It seems the right approach for 4.6 is to make `blog_id` and `site_id`
public again. Cached public properties via `get_blog_details()` is one
scenario, and we can probably do a bunch of work to get around that, but
it seems possible that others have serialized versions of `WP_Site` that
would break.
Separately:
* That we're storing `WP_Site` objects in cache is an issue in waiting
anyway. We should decide if it's worth upgrading (downgrading?) these to
`stdClass` when storing in cache. If so, that's a new ticket.
* It may be that we'll be ready to deprecate `get_blog_details()` in the
near future or at least stop relying on it. If we treat #36935 as
something entirely different—maybe with new cache keys—then `get_sites()`
/ `get_site()` could be used instead. Maybe a last modified needs to be
added to the key to help with future invalidation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36717#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list