metadata_lazyloader_queued_objects

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

Description

do_action( 'metadata_lazyloader_queued_objects', (array) $object_ids, (string) $object_type, (WP_Metadata_Lazyloader) $instance ); 

Parameters (3)

0. $object_ids (array)
The object ids.
1. $object_type (string)
Type of object being queued.
2. $instance (WP_Metadata_Lazyloader)
The lazy-loader object.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $instance ); 
The following example is for adding a hook callback.
  1. // define the metadata_lazyloader_queued_objects callback 
  2. function action_metadata_lazyloader_queued_objects( $object_ids, $object_type, $instance ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'metadata_lazyloader_queued_objects', 'action_metadata_lazyloader_queued_objects', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'metadata_lazyloader_queued_objects', 'action_metadata_lazyloader_queued_objects', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/class-wp-metadata-lazyloader.php  
  1. do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this );