pods_template_redirect

The Pods - Custom Content Types and Fields pods template redirect hook.

Description

apply_filters( 'pods_template_redirect', (null) $null, (unknown) $template, $self_exists ); 

Parameters (3)

0. $null (null)
The null.
1. $template (unknown)
The template.
2. $self_exists
The self exists.

Usage

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

Defined (1)

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

/components/Pages.php  
  1. $render_function = apply_filters( 'pods_template_redirect', null, $template, self::$exists );