Description
The gravityflow_auto_format_instructions filter allows disabling automatic formatting adding additional line breaks on ‘Display Instructions’ of a workflow step.
Parameters
Parameter | Type | Details |
---|---|---|
$enable_formatting | Boolean | The formatting of Display Instructions. Defaults to true. |
Usage
The filter can be applied via either a generic or form-specific function.
1 2 | add_filter( 'gravityflow_auto_format_instructions' , 'sh_gravityflow_auto_format_instructions' , 10, 1 ); add_filter( 'gravityflow_auto_format_instructions_12' , 'sh_gravityflow_auto_format_instructions_form_12' , 10, 1 ); |
Examples
Disable automatic formatting on all instructions
1 2 3 4 | add_filter( 'gravityflow_auto_format_instructions' , 'sh_gravityflow_auto_format_instructions' , 10, 1); function sh_gravityflow_auto_format_instructions( $enable_formatting ) { return false; } |
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?