jetpack_tiled_gallery_template

Filters the Tiled Gallery template path.

Description

apply_filters( 'jetpack_tiled_gallery_template', (string) $dirname, (string) $name, (array) $context ); 

Parameters (3)

0. $dirname (string) => dirname( __FILE__ ) . "/templates/$name.php"
Template path.
1. $name (string)
Template name.
2. $context (array)
Context array passed to the template.

Usage

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

Defined (1)

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

/modules/tiled-gallery/tiled-gallery/tiled-gallery-layout.php  
  1. require apply_filters( 'jetpack_tiled_gallery_template', dirname( __FILE__ ) . "/templates/$name.php", $name, $context ) ;