gravityflowchecklists_checklists

The  gravityflowchecklists_checklists filter allows the checklist configurations to be filtered.

Parameters

$checklist_configs array The array of checklist configurations.
$user WP_User|Null The user

Examples

The following snippet will prevent entries from form with the ID of 1 from being presented in the status page

add_filter( 'gravityflowchecklists_checklists', 'sh_filter_gravityflowchecklists_checklistss', 10, 2 );
/**
 * Adds a checklist.
 *
 * @param array        $checklist_configs
 * @param WP_user|null $user
 *
 * @return array
 */
function sh_filter_gravityflowchecklists_checklists( $checklist_configs, $user ) {
	$checklist_configs[] = array(
		'id'          => 'admissions',
		'name'        => 'Admissions',
		'nodes'       => array(
			array(
				'id'                      => 'Syx2IrAKTW',
				'form_id'                 => '11',
				'custom_label'            => '',
				'waitForWorkflowComplete' => false,
				'linkToEntry'             => true,
			),
			array(
				'id'                      => 'HyKDSCF6Z',
				'form_id'                 => '12',
				'custom_label'            => '',
				'waitForWorkflowComplete' => false,
				'linkToEntry'             => true,
			),
			array(
				'id'                      => 'Symn6r96Z',
				'form_id'                 => '14',
				'custom_label'            => '',
				'waitForWorkflowComplete' => true,
				'linkToEntry'             => true,
			),
		),
		'sequential'  => true, // true, false
		'permissions' => 'all', // 'all' or 'select'. If 'select' then the 'assignees' element is required
		'assignees'   => array(
			'user_id|1',
		),
	);

	return $checklist_configs;
}

Placement

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