jp_carousel_enqueue_assets

Fires after carousel assets are enqueued for the first time.

Description

do_action( 'jp_carousel_enqueue_assets', (bool) $this_first_run, (array) $localize_strings ); 

Allows for adding additional assets to the carousel page.

Parameters (2)

0. $this_first_run (bool)
First load if Carousel on the page.
1. $localize_strings (array)
Array of strings passed to the Jetpack js file.

Usage

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

Defined (1)

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

/modules/carousel/jetpack-carousel.php  
  1. do_action( 'jp_carousel_enqueue_assets', $this->first_run, $localize_strings );