WordPress filter hook

gform_cdata_open

Fired by 9 WordPress plugins, running on 2,690+ sites between them.

“Filter the immediate opening of the script block. Allows for CDATA opening tags if needed for XHTML/XML.”

How to use gform_cdata_open

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'gform_cdata_open', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from Pods Gravity Forms Add-On's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

9 plugins that fire gform_cdata_open

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Pods Gravity Forms Add-On icon Pods Gravity Forms Add-On1,000+ installs apply_filters( 'gform_cdata_open', "" ) includes/Pods_GF.php:2884
  2. YeeMail icon YeeMail700+ installs apply_filters( 'gform_cdata_open', '' ) includes-overwrite/gravityforms-common.php:4631
  3. PDF for Gravity Forms + Drag And Drop Template Builder icon PDF for Gravity Forms + Drag And Drop Template Builder400+ installs apply_filters( 'gform_cdata_open', '' ) gravityforms/gfcommon_style.php:4838
  4. Zibal Payment Gateway for Gravity Forms icon Zibal Payment Gateway for Gravity Forms300+ installs apply_filters( 'gform_cdata_open', '' ) zibal.php:412
  5. Gateway AqayePardakht for Gravity Forms icon Gateway AqayePardakht for Gravity Forms100+ installs apply_filters( 'gform_cdata_open', '' ) aqayepardakht.php:396
  6. Gravity Forms + Sprout Invoices icon Gravity Forms + Sprout Invoices70+ installs apply_filters( 'gform_cdata_open', '' ) inc/SI_GF_Integration_Addon.php:128
  7. IDPay For Wp Gravity Forms icon IDPay For Wp Gravity Forms60+ installs apply_filters( 'gform_cdata_open', '' ) lib/Helpers.php:125
  8. Email Customizer for Gravity Forms icon Email Customizer for Gravity Forms50+ installs apply_filters( 'gform_cdata_open', '' ) backend/gfcommon_style.php:4631
  9. Vandar.io Gravityform icon Vandar.io Gravityform10+ installs apply_filters( 'gform_cdata_open', '' ) vandar.php:375

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.