jp_carousel_widths

Filter the array of default prebuilt widths used in Carousel.

Description

apply_filters( 'jp_carousel_widths', (array) $this_prebuilt_widths ); 

Parameters (1)

0. $this_prebuilt_widths (array)
The this prebuilt widths.

Usage

To run the hook, copy the example below.
  1. $this_prebuilt_widths = apply_filters( 'jp_carousel_widths', $this_prebuilt_widths ); 
  2.  
  3. if ( !empty( $this_prebuilt_widths ) ) { 
  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_widths callback 
  2. function filter_jp_carousel_widths( $this_prebuilt_widths ) { 
  3. // make filter magic happen here... 
  4. return $this_prebuilt_widths
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jp_carousel_widths', 'filter_jp_carousel_widths', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jp_carousel_widths', 'filter_jp_carousel_widths', 10, 1 ); 

Defined (1)

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

/modules/carousel/jetpack-carousel.php  
  1. $this->prebuilt_widths = apply_filters( 'jp_carousel_widths', $this->prebuilt_widths );