Home / Admin / Processing Smart Tags in HTML Field
Duplicate Snippet

Embed Snippet on Your Site

Processing Smart Tags in HTML Field

This snippet makes WPForms Smart Tags usable in the HTML field

10+
Code Preview
php
<?php
/**
 * Process Smart Tags inside HTML / Code Block form fields.
 *
 * @link   https://wpforms.com/developers/how-to-process-smart-tags-in-html-fields/
 */
function wpf_dev_html_process_smarttags( $properties, $field, $form_data ) {
    $properties[ 'inputs' ][ 'primary' ][ 'code' ] = apply_filters( 'wpforms_process_smart_tags', $properties[ 'inputs' ][ 'primary' ][ 'code' ], $form_data );
    return $properties;
}
add_filter( 'wpforms_field_properties_html', 'wpf_dev_html_process_smarttags', 10, 3 );

Comments

Add a Comment