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
Parameter | Type | Details |
---|---|---|
$status_types | array | The status types the approval step will process. |
$assignee | Gravity_Flow_Assignee | The assignee object. |
$ new_status | string | The new status. |
$form | array | The current form array. |
$step | Gravity_Flow_Step | The 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