gravityflow_form_ids_status

The gravityflow_form_ids_status filter is used to constrain which forms' entries are displayed via the status shortcode and admin view.

Parameters

$form_ids array
$search_Criteria array

Examples

Example 1: Prevent entries from form with the ID of 1 from being presented in the status page

add_filter( 'gravityflow_form_ids_status', 'sh_status_form_ids_limit', 10, 2 );
function sh_status_form_ids_limit( $form_ids, $search_criteria ) {

	unset( $form_ids[ array_search( 1, $form_ids ) ] );
	$form_ids = array_values( $form_ids );

	return $form_ids;
}

Example 2: Limit the status to only display entries from form with the ID of 1 or 6.

add_filter( 'gravityflow_form_ids_status', 'sh_status_form_ids_explicit', 10, 2 );
function sh_status_form_ids_explicit( $form_ids, $search_criteria ) {
	//Adjust array to your desired form IDs.
	$form_ids = array ( 1, 6 );
	return $form_ids;
}

Example 3: Limit the status to only display entries from a specific form for non-administrative users

add_filter( 'gravityflow_form_ids_status', 'sh_status_form_ids_explicit', 10, 2 );
function sh_status_form_ids_explicit( $form_ids, $search_criteria ) {
	$filtered_form_ids = array ( 14 );

	$current_user = wp_get_current_user();
	if ( ! ( $current_user instanceof WP_User ) ) {
		return $filtered_form_ids;
	}

	if (isset( $current_user->roles ) && ! empty( $current_user->roles && in_array( 'administrator', $current_user->roles ) ) ) {
		return $form_ids;
	}

	return $filtered_form_ids;
}

Placement

This code should be placed in the functions.php file of your active theme.