gravityflow_status_filter

The gravityflow_status_filter filter is used to constrain the entries on the status page.

Parameters

$filter_constraints array

Example

The following snippet will restrict user with the ID of 1 to the entries of form 2.

add_filter( 'gravityflow_status_filter', 'sh_gravityflow_status_filter' );
function sh_gravityflow_status_filter( $filter_constraints ) {
	$user = wp_get_current_user();
	if ( $user->ID == 1 ) {
		// The constraints are optional.
		$filter_constraints = array(
			'form_id'    => 2,
			// 'start_date' => '2016-01-01',
			// 'end_date'   => '2016-01-14',
		);
	}
	return $filter_constraints;
}

Placement

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

Still need help? Contact Support Contact Support