bookmark_bordergform_helpscout_process_body_shortcodes

Description

This filter can be used to enable shortcode processing in the Help Scout message body.

Usage

Applies to all forms:

add_filter( 'gform_helpscout_process_body_shortcodes', 'your_function_name', 10, 3 );

Applies to a specific form:

add_filter( 'gform_helpscout_process_body_shortcodes_4', 'your_function_name', 10, 3 );

Parameters

  • $process_shortcodes boolean

    Is shortcode processing enabled? Default is false.

  • $form

    The current form object.

  • $feed Feed Object

    The current feed object.

Examples

1. Enable for all forms

This example shows how you can enable shortcode processing for all forms.

add_filter( 'gform_helpscout_process_body_shortcodes', '__return_true' );

2. Enable for a specific feed name

add_filter( 'gform_helpscout_process_body_shortcodes', function( $process_shortcodes, $form, $feed ) {

    return rgars( $feed, 'meta/feed_name' ) == 'Help Scout Feed 1' ? true : $process_shortcodes;
}, 10, 3 );

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

gf_apply_filters( 'gform_helpscout_process_body_shortcodes', $form['id'], false, $form, $feed )

This filter is located in GFHelpScout::process_feed() in class-gf-helpscout.php

Since

This filter was added in Help Scout 1.1.1.