The gravityflow_form_ids_inbox filter is used to constrain which forms’ entries are displayed via the Inbox Page or admin view.
Parameters
Parameter | Type | Details |
---|---|---|
$form_ids | Array | The form ids that the current inbox is meant to display |
$search_criteria | Array | The search criteria that will be applied to entries for this inbox. |
Examples
Prevent entries from a specific form from being shown in the inbox
1 2 3 4 5 6 7 8 | add_filter( 'gravityflow_form_ids_inbox' , 'sh_inbox_form_ids_limit' , 10, 2 ); function sh_inbox_form_ids_limit( $form_ids , $search_criteria ) { unset( $form_ids [ array_search ( 1, $form_ids ) ] ); $form_ids = array_values ( $form_ids ); return $form_ids ; } |
Limit the inbox to only display entries from specific forms
1 2 3 4 5 6 | add_filter( 'gravityflow_form_ids_inbox' , 'sh_inbox_form_ids_explicit' , 10, 2 ); function sh_inbox_form_ids_explicit( $form_ids , $search_criteria ) { //Adjust array to your desired form IDs. $form_ids = array ( 1, 6 ); return $form_ids ; } |
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?