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' ),
			),
		);
	}


Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.