gravityflow_approval_assignee_status_feedback

Description

The gravityflow_approval_assignee_status_feedback filter allows you to modify the feedback message displayed when an assignee updates their status in a Gravity Flow approval step.

This can be useful to customize the feedback message based on a unique status type, defined in gravityflow_approval_assignee_status_types, before an approval decision (approved/rejected) status update is made. This is similar to how revert status is handled when a user input step is associated to the step.

Parameters

ParameterTypeDetails
$status_feedbackbool | stringThe status feedback for the assignee process.
$assigneeGravity_Flow_AssigneeThe assignee object.
$new_statusstringThe new status.
$formarrayThe current form array.
$stepGravity_Flow_StepThe current step.

Examples

Customizing Assignee Status Feedback for a custom step status

1
2
3
4
5
6
7
8
9
10
11
12
add_filter( 'gravityflow_approval_assignee_status_feedback', array( $this, 'jo_feedback_process'), 10, 5 );
function jo_feedback_process( $feedback, $assignee, $new_status, $form, $current_step ) {
 
        if ( $new_status != 'archived' ) {
            return false;
        }
 
        //Do any custom logic related to a custom assignee status defined in gravityflow_approval_assignee_status_types
 
                $feedback = $current_step->get_name() . ': Archival of entry before approval decision was made';
                return $feedback;
}

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?

Since

This filter was added in Gravity Flow 2.9.8.

Source Code

This filter is located in includes/steps/class-step-approval.php