gform_card_type_<rgget>

The Gravity Forms gform card type rgget hook.

Description

apply_filters( 'gform_card_type_<rgget>', $var, $rgget ); 

Parameters (2)

0. $var
__( 'Card Type', 'gravityforms' )
1. $rgget
The rgget.

Usage

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

Defined (1)

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

/js.php  
  1. ccCardType = new Input(field.id + ".4", <?php echo json_encode( gf_apply_filters( array( 'gform_card_type', rgget( 'id' ) ), __( 'Card Type', 'gravityforms' ), rgget( 'id' ) ) ); ?>);