gform_cdata_open

The Gravity Forms gform cdata open hook.

Description

apply_filters( 'gform_cdata_open', (string) $var ); 

Parameters (1)

0. $var (string) => ''
''

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'gform_cdata_open', $var ); 
  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_cdata_open callback 
  2. function filter_gform_cdata_open( $var ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'gform_cdata_open', 'filter_gform_cdata_open', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'gform_cdata_open', 'filter_gform_cdata_open', 10, 1 ); 

Defined (6)

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

/includes/fields/class-gf-field-captcha.php  
  1. $options = "<script type='text/javascript'>" . apply_filters( 'gform_cdata_open', '' ) . " var RecaptchaOptions = {theme : '$theme'}; if(parseInt('{$tabindex}') > 0) {RecaptchaOptions.tabindex = {$tabindex2};}" . 
/form_display.php  
  1. <script type='text/javascript'>" . apply_filters( 'gform_cdata_open', '' ) . '' . 
  1. $form_string .= "<script type='text/javascript'>" . apply_filters( 'gform_cdata_open', '' ) . " jQuery(document).ready(function() {jQuery(document).trigger('gform_post_render', [{$form_id}, {$current_page}]) } ); " . apply_filters( 'gform_cdata_close', '' ) . '</script>'; 
  1. $form_string .= "<script type='text/javascript'>" . apply_filters( 'gform_cdata_open', '' ) . " jQuery(document).ready(function() {jQuery(document).trigger('gform_post_render', [{$form_id}, {$current_page}]) } ); " . apply_filters( 'gform_cdata_close', '' ) . '</script>'; 
  1. $confirmation = "<script type=\"text/javascript\">" . apply_filters( 'gform_cdata_open', '' ) . " function gformRedirect() {document.location.href='$url';}"; 
  1. "<script type='text/javascript'>" . apply_filters( 'gform_cdata_open', '' ) . ' ';