gform_allowable_tags_<form_id>
The Gravity Forms gform allowable tags form id hook.
Description
Parameters (3)
- 0. $allow_html (unknown)
- The allow html.
- 1. $instance
- The this.
- 2. $form_id
- The form id.
Usage
- To run the hook, copy the example below.
- $allow_html = apply_filters( 'gform_allowable_tags_{$form_id}', $allow_html, $instance, $form_id );
- if ( !empty( $allow_html ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the gform_allowable_tags_<form_id> callback
- function filter_gform_allowable_tags_form_id( $allow_html, $instance, $form_id ) {
- // make filter magic happen here...
- return $allow_html;
- };
- // add the filter
- add_filter( "gform_allowable_tags_{$form_id}", 'filter_gform_allowable_tags_form_id', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "gform_allowable_tags_{$form_id}", 'filter_gform_allowable_tags_form_id', 10, 3 );
Defined (1)
The filter is defined in the following location(s).
- /includes/fields/class-gf-field.php
- $allowable_tags = gf_apply_filters( array( 'gform_allowable_tags', $form_id ), $allow_html, $this, $form_id );