wp_maybe_clean_new_site_cache_on_update( WP_Site $new_site, WP_Site $old_site )

In this article

Cleans the necessary caches after specific site data has been updated.

Parameters

$new_siteWP_Siterequired
The site object after the update.
$old_siteWP_Siterequired
The site object prior to the update.

Source

function wp_maybe_clean_new_site_cache_on_update( $new_site, $old_site ) {
	if ( $old_site->domain !== $new_site->domain || $old_site->path !== $new_site->path ) {
		clean_blog_cache( $new_site );
	}
}

Changelog

VersionDescription
5.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.