mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Networks and Sites: Lazy load site meta.
In [36566] a framework to lazily load metadata was introduced. This supported term and comment meta by default. In this commit, extends support for site ( blog ) meta. Site meta is not heavily used by core and is used by developers to extend multisite. In this change, `_prime_site_caches` and `WP_Site_Query` now call the new function `wp_lazyload_site_meta`. The function `wp_lazyload_site_meta` accepts an array of ids and adds them to the queue of metadata to be lazily loaded. The function `get_blogs_of_user` was updated to now lazily load site meta. Follow on from [55671]. Props spacedmonkey, johnjamesjacoby, peterwilsoncc, mukesh27. Fixes #58185. git-svn-id: https://develop.svn.wordpress.org/trunk@55747 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -281,6 +281,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase {
|
||||
$lazyloader = wp_metadata_lazyloader();
|
||||
$lazyloader->reset_queue( 'term' );
|
||||
$lazyloader->reset_queue( 'comment' );
|
||||
$lazyloader->reset_queue( 'blog' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user