Description
The gravityflowchecklists_post_add_exemption action fires after an admin has clicked on the checkbox to exempt a user from completing the form.
Parameters
Parameter | Type | Details |
---|---|---|
$user_id | Integer | The user for which the exemption added. |
$form_id | Integer | The ID of the form for which the exemption was added. |
$checklist_id | String | The details |
$exemption | Array | The details of the exemption including the user ID of the user who added the exemption and the timestamp. |
Examples
Prevent entries from form with the ID of 1 from being presented in the status page.
add_action( 'gravityflowchecklists_post_add_exemption', 'sh_gravityflowchecklists_post_add_exemption', 10, 4 );
/**
* Fires after an exemption has been added.
*
* @param int $user_id The user for which the exemption removed.
* @param int $form_id The ID of the form for which the exemption was removed.
* @param string $checklist_id The ID of the checklist for which the exemption was removed.
* @param array $exemption The details of the exemption including the user ID of the user who added the exemption and the timestamp.
*/
function sh_gravityflowchecklists_post_add_exemption( $user_id, $form_id, $checklist_id, $exemption ) {
// Do something after an exemption has been triggered.
if ($form_id == 1){
gravity_flow()->log_debug( 'Added to logs.. );
}
}
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?