<filter_name>

Filter value before returning.

Description

apply_filters( '<filter_name>', (mixed) $value, (Caldera_Forms_Object) $instance, (string) $get_class ); 

Parameters (3)

0. $value (mixed)
Property value
1. $instance (Caldera_Forms_Object)
Current class object
2. $get_class (string) => get_class( $this )
The get class.

Usage

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

Defined (1)

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

/classes/object.php  
  1. return apply_filters( $filter_name, $value, $this, get_class( $this ) );