Description
The gravityflow_assignee_status_workflow_detail filter allows the assignee status label to be modified before rendering. Currently only supported for the Approval Step.
Parameters
Parameter | Type | Details |
---|---|---|
$assignee_status_label | String | The status label for the current assignee. |
$assignee | Assignee | The current assignee. |
$current_step | Step | The current step. |
Examples
Modify the status label to include an assignee specific value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | add_filter( 'gravityflow_assignee_status_workflow_detail' , 'sh_filter_gravityflow_assignee_status_workflow_detail' , 10, 3 ); function sh_filter_gravityflow_assignee_status_workflow_detail( $assignee_status_label , $assignee , $current_step ) { switch ( $assignee ->get_id() ) { case 1: $assignee_status_label = 'Mr Admin: ' . $assignee ->get_status(); break ; case 2: $assignee_status_label = 'Mrs Admin: ' . $assignee ->get_status(); break ; default : $assignee_status_label = 'Mrs Admin: ' . $assignee ->get_status(); } return $assignee_status_label ; } |
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?