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.
- // run the action
- do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $instance );
- The following example is for adding a hook callback.
- // define the metadata_lazyloader_queued_objects callback
- function action_metadata_lazyloader_queued_objects( $object_ids, $object_type, $instance ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'metadata_lazyloader_queued_objects', 'action_metadata_lazyloader_queued_objects', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the action
- 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
- do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this );