ClassicPress logo
Skip to content
Filter by type:

Browse:

  • Home
  • Classes
  • WP_Metadata_Lazyloader
  • WP_Metadata_Lazyloader::lazyload_term_meta()

This method has been deprecated. Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead.

WP_Metadata_Lazyloader::lazyload_term_meta( mixed $check )

Lazy-loads term meta for queued terms.


Description

This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it directly.


Parameters

$check

(Required) The $check param passed from the 'get_term_metadata' hook.


Return

(mixed) In order not to short-circuit get_metadata(). Generally, this is null, but it could be another value if filtered by a plugin.


Source

File: wp-includes/class-wp-metadata-lazyloader.php

	public function lazyload_term_meta( $check ) {
		if ( ! empty( $this->pending_objects['term'] ) ) {
			update_termmeta_cache( array_keys( $this->pending_objects['term'] ) );

			// No need to run again for this set of terms.
			$this->reset_queue( 'term' );
		}

		return $check;
	}

Expand Source Code View on GitHub


Changelog

Changelog
Version Description
6.3.0 Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead.
4.5.0 Introduced. This method has been deprecated. Use WP_Metadata_Lazyloader::lazyload_meta_callback() instead.
ClassicPress Documentation • Made with ClassicPress
Privacy Policy