Action hook 'metadata_lazyloader_queued_objects'

in WP Core File wp-includes/class-wp-metadata-lazyloader.php at line 109

View Source

metadata_lazyloader_queued_objects

Action Hook
Description
Fires after objects are added to the metadata lazy-load queue.

Hook Information

File Location wp-includes/class-wp-metadata-lazyloader.php View on GitHub
Hook Type Action
Line Number 109

Hook Parameters

Type Name Description
array $object_ids Array of object IDs.
string $object_type Type of object being queued.
WP_Metadata_Lazyloader $lazyloader The lazy-loader object.

Usage Examples

Basic Usage
<?php
// Hook into metadata_lazyloader_queued_objects
add_action('metadata_lazyloader_queued_objects', 'my_custom_function', 10, 3);

function my_custom_function($object_ids, $object_type, $lazyloader) {
    // Your custom code here
}

Source Code Context

wp-includes/class-wp-metadata-lazyloader.php:109 - How this hook is used in WordPress core
<?php
 104  		 *
 105  		 * @param array                  $object_ids  Array of object IDs.
 106  		 * @param string                 $object_type Type of object being queued.
 107  		 * @param WP_Metadata_Lazyloader $lazyloader  The lazy-loader object.
 108  		 */
 109  		do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this );
 110  	}
 111  
 112  	/**
 113  	 * Resets lazy-load queue for a given object type.
 114  	 *

PHP Documentation

<?php
/**
		 * Fires after objects are added to the metadata lazy-load queue.
		 *
		 * @since 4.5.0
		 *
		 * @param array                  $object_ids  Array of object IDs.
		 * @param string                 $object_type Type of object being queued.
		 * @param WP_Metadata_Lazyloader $lazyloader  The lazy-loader object.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 3
  • File: wp-includes/class-wp-metadata-lazyloader.php
Related Hooks

Related hooks will be displayed here in future updates.