wp_metadata_lazyloader() WordPress Function
The wp_metadata_lazyloader function is a utility function used to lazy load metadata for a given object type. It is useful for when you need to load metadata for objects but do not want to do so until they are actually needed. This function can be used with any object type that has metadata associated with it.
wp_metadata_lazyloader() #
Retrieves the queue for lazy-loading metadata.
Return
(WP_Metadata_Lazyloader) Metadata lazyloader queue.
Source
File: wp-includes/meta.php
function wp_metadata_lazyloader() { static $wp_metadata_lazyloader; if ( null === $wp_metadata_lazyloader ) { $wp_metadata_lazyloader = new WP_Metadata_Lazyloader(); } return $wp_metadata_lazyloader; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |