gravityflow_feedback_approval_token

Description

Use the gravityflow_feedback_approval_token filter to change the text of the feedback message on the approval step specifically for uses using the one-click approval links.

Parameters

ParameterTypeDetails
$feedbackStringThe feedback to send to the browser.
$entryEntryThe current entry array.
$assigneeAssigneeThe assignee object.
$new_statusStringThe new status.
$formFormThe current form array.
$stepStepThe current step.

Examples

Change the message for all approval feedback tokens

1
2
3
4
add_filter( 'gravityflow_feedback_approval_token', 'sh_gravityflow_feedback_approval', 10, 6 ); 
function sh_gravityflow_feedback_approval( $feedback$entry, $assignee, $new_status, $form, $step ) {
    return "Thank you"
}

NOTE: This filter will only run when the approval link is clicked via email. If you want to modify the feedback by clicking on the workflow detail page, you need to use the gravityflow_feedback_approval filter, which takes the same arguments.

Since

  • Version 1.7.1 – Filter added
  • Version 2.0.2 – Parameter $current_step added.

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?