jp_carousel_add_data_to_container

Filter the data added to the Gallery container.

Description

apply_filters( 'jp_carousel_add_data_to_container', (array) $extra_data ); 

Parameters (1)

0. $extra_data (array)
Array of data about the site and the post.

Usage

To run the hook, copy the example below.
  1. $extra_data = apply_filters( 'jp_carousel_add_data_to_container', $extra_data ); 
  2.  
  3. if ( !empty( $extra_data ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jp_carousel_add_data_to_container callback 
  2. function filter_jp_carousel_add_data_to_container( $extra_data ) { 
  3. // make filter magic happen here... 
  4. return $extra_data
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jp_carousel_add_data_to_container', 'filter_jp_carousel_add_data_to_container', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jp_carousel_add_data_to_container', 'filter_jp_carousel_add_data_to_container', 10, 1 ); 

Defined (1)

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

/modules/carousel/jetpack-carousel.php  
  1. $extra_data = apply_filters( 'jp_carousel_add_data_to_container', $extra_data );