gform_custom_merge_tags

The Gravity Forms gform custom merge tags hook.

Description

apply_filters( 'gform_custom_merge_tags', (array) $array, (unknown) $form_id, (unknown) $fields, (unknown) $element_id ); 

Parameters (4)

0. $array (array) => array()
The array.
1. $form_id (unknown)
The form id.
2. $fields (unknown)
The fields.
3. $element_id (unknown)
The element id.

Usage

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

Defined (2)

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

/common.php  
  1. $custom_group = apply_filters( 'gform_custom_merge_tags', array(), $form_id, $fields, $element_id ); 
  1. $custom_merge_tags = apply_filters( 'gform_custom_merge_tags', array(), $form_id, $fields, $element_id );