Make WordPress Core

Ticket #40201: 40201.patch

File 40201.patch, 716 bytes (added by spacedmonkey, 8 years ago)
  • src/wp-includes/ms-blogs.php

     
    445445 *
    446446 * @global bool $_wp_suspend_cache_invalidation
    447447 *
    448  * @param WP_Site $blog The site object to be cleared from cache.
     448 * @param WP_Site|int $blog The site object to be cleared from cache.
    449449 */
    450450function clean_blog_cache( $blog ) {
    451451        global $_wp_suspend_cache_invalidation;
     
    454454                return;
    455455        }
    456456
     457        if( is_object( $blog ) || is_numeric( $blog ) ) {
     458                $blog = get_site( $blog );
     459        }
     460
    457461        $blog_id = $blog->blog_id;
    458462        $domain_path_key = md5( $blog->domain . $blog->path );
    459463