Ticket #40201: 40201.3.patch
File 40201.3.patch, 1018 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/ms-blogs.php
445 445 * 446 446 * @global bool $_wp_suspend_cache_invalidation 447 447 * 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. 449 * @return bool True if caches clear succeeds, false otherwise. 449 450 */ 450 451 function clean_blog_cache( $blog ) { 451 452 global $_wp_suspend_cache_invalidation; … … 454 455 return; 455 456 } 456 457 458 if ( is_object( $blog ) || is_int( $blog ) ) { 459 $blog = get_site( $blog ); 460 } 461 462 if ( ! ( $blog instanceof WP_Site ) ) { 463 return false; 464 } 465 457 466 $blog_id = $blog->blog_id; 458 467 $domain_path_key = md5( $blog->domain . $blog->path ); 459 468 … … 478 487 do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key ); 479 488 480 489 wp_cache_set( 'last_changed', microtime(), 'sites' ); 490 491 return true; 481 492 } 482 493 483 494 /**