Description
The gravityflow_approval_confirm_prompt_messages filter allows users to modify the messages for approval/rejection confirmation.
Parameters
Parameter | Type | Details |
---|---|---|
$messages | Array | The details |
$form_id | Integer | The details |
$entry | Entry Object | The details |
$step | Form Object | The details |
$step | Gravity_Flow_Step | The details |
Examples
Set a custom approval/confirmation message.
add_filter( 'gravityflow_approval_confirm_prompt_messages', 'sh_gravityflow_approval_confirm_prompt_messages', 10, 4 );
function sh_gravityflow_approval_confirm_prompt_messages( $messages, $form_id, $entry, $step) {
//Customize the $messages parameter for approve/reject confirmation prompt messaging
$messages['approveMessage'] = 'This is my custom approval message';
$messages['rejectMessage'] = 'This is my custom rejection message';
return $messages;
}
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?