wp_maybe_clean_new_site_cache_on_update

The timeline below displays how wordpress function wp_maybe_clean_new_site_cache_on_update has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Cleans the necessary caches after specific site data has been updated.
 *
 * @since 5.1.0
 *
 * @param WP_Site $new_site The site object after the update.
 * @param WP_Site $old_site The site object prior to the update.
 */
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);
    }
}

WordPress Version: 5.1

/**
 * Cleans the necessary caches after specific site data has been updated.
 *
 * @since 5.1.0
 *
 * @param WP_Site $new_site The site object after the update.
 * @param WP_Site $old_site The site obejct prior to the update.
 */
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);
    }
}