Last active
December 5, 2024 18:19
-
-
Save rafaehlers/87fbc31676ff2d72b9a97549c7a93fea to your computer and use it in GitHub Desktop.
Filtering entries by GravityView's Approval Statuses on Gravity Flow's Workflow Status page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'gravityflow_field_filters_status_table', 'field_filters_status_expired', 10, 1 ); | |
function field_filters_status_expired( $field_filters ) { | |
foreach ( $field_filters as $form => $filters ) { | |
if ( $form == '185' ) { // CHANGE 185 WITH YOUR FORM ID | |
$field_filters[ $form ][] = array( | |
'key' => 'is_approved', | |
'text' => 'View Approval Status', | |
'operators' => array ( 'is', 'isnot' ), | |
'values' => array( | |
array( 'value' => '1', 'text' => 'Approved' ), | |
array( 'value' => '2', 'text' => 'Disapproved' ), | |
array( 'value' => '3', 'text' => 'Unapproved' ) | |
), | |
); | |
} | |
} | |
return $field_filters; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment