WP_Metadata_Lazyloader::__construct() WordPress Method
The WP_Metadata_Lazyloader::__construct() method is used to lazy load metadata for a WordPress object. This is useful for when you need to access metadata for an object, but don't want to load it until it's actually needed.
WP_Metadata_Lazyloader::__construct() #
Constructor.
Source
File: wp-includes/class-wp-metadata-lazyloader.php
public function __construct() {
$this->settings = array(
'term' => array(
'filter' => 'get_term_metadata',
'callback' => array( $this, 'lazyload_term_meta' ),
),
'comment' => array(
'filter' => 'get_comment_metadata',
'callback' => array( $this, 'lazyload_comment_meta' ),
),
);
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.5.0 | Introduced. |