gravityflow_approval_assignee_status_types

Description

The gravityflow_approval_assignee_status_types filter provides developers with the flexibility to modify the status types that are processed during the approval step. This filter can be used to customize the status handling based on different conditions, such as the assignee, the new status, or the form data.

Parameters

ParameterTypeDetails
$status_typesarrayThe status types the approval step will process.
$assigneeGravity_Flow_AssigneeThe assignee object.
$new_statusstringThe new status.
$formarrayThe current form array.
$stepGravity_Flow_StepThe current step.

Examples

Customizing Approval Step Status Types

1
2
3
4
5
add_filter( 'gravityflow_approval_assignee_status_types', 'jo_feedback_statuses', 10, 5 );
function jo_feedback_statuses( $potential_statuses, $assignee, $new_status, $form, $current_step ) {
    $potential_statuses[] = 'archived';
    return $potential_statuses;
}

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