WordPress filter hook

gform_cdata_close

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

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

How to use gform_cdata_close

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_close', 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_close

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_close', "" ) includes/Pods_GF.php:2890
  2. YeeMail icon YeeMail700+ installs apply_filters( 'gform_cdata_close', '' ) includes-overwrite/gravityforms-common.php:4638
  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_close', '' ) gravityforms/gfcommon_style.php:4845
  4. Zibal Payment Gateway for Gravity Forms icon Zibal Payment Gateway for Gravity Forms300+ installs apply_filters( 'gform_cdata_close', '' ) zibal.php:416
  5. Gateway AqayePardakht for Gravity Forms icon Gateway AqayePardakht for Gravity Forms100+ installs apply_filters( 'gform_cdata_close', '' ) aqayepardakht.php:400
  6. Gravity Forms + Sprout Invoices icon Gravity Forms + Sprout Invoices70+ installs apply_filters( 'gform_cdata_close', '' ) inc/SI_GF_Integration_Addon.php:133
  7. IDPay For Wp Gravity Forms icon IDPay For Wp Gravity Forms60+ installs apply_filters( 'gform_cdata_close', '' ) lib/Helpers.php:132
  8. Email Customizer for Gravity Forms icon Email Customizer for Gravity Forms50+ installs apply_filters( 'gform_cdata_close', '' ) backend/gfcommon_style.php:4638
  9. Vandar.io Gravityform icon Vandar.io Gravityform10+ installs apply_filters( 'gform_cdata_close', '' ) vandar.php:379

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.