[wp-trac] [WordPress Trac] #40201: Use get_site in clean_blog_cache
WordPress Trac
noreply at wordpress.org
Sun Mar 19 00:59:55 UTC 2017
#40201: Use get_site in clean_blog_cache
--------------------------------+-----------------------------
Reporter: spacedmonkey | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version:
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
The clean_blog_cache takes a generic object as a param. This is a little
strange as other clean_*_cache functions either take a list of ids or an
ID. Now that the WP_Site object is in core, we should make sure we use it
in this function. If we pass the $blog param through the get_site function
it would have the following benefits.
- All objects passed to function will be cast to WP_Site object. This
would mean that the object would always domain and path properties.
- Ability to pass a site id, as get_site allows for id lookup.
- Better error handling. This function doesn't handle not passing an
object very well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40201>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list