jetpack_tiled_gallery_partial

Filters the Tiled Gallery partial path.

Description

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

Parameters (3)

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

Usage

To run the hook, copy the example below.
  1. $dirname = apply_filters( 'jetpack_tiled_gallery_partial', $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_partial callback 
  2. function filter_jetpack_tiled_gallery_partial( $dirname, $name, $context ) { 
  3. // make filter magic happen here... 
  4. return $dirname
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_tiled_gallery_partial', 'filter_jetpack_tiled_gallery_partial', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_tiled_gallery_partial', 'filter_jetpack_tiled_gallery_partial', 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_partial', dirname( __FILE__ ) . "/templates/partials/$name.php", $name, $context ) ;