This is a re-work of a plugin that I've made to log consents in WordPress. This repo serves the purpose of expanding and refactoring this until we see if we can/have to add it to core as an extra tool for #gdpr-compliance.
PRs / suggestions etc are welcome either here or on https://core.trac.wordpress.org/ticket/43797
$cl_consent = new Consent_Log();
$consent = $cl_consent->cl_add_consent( '[email protected]', 'form_1', 1 );
$consent = $cl_consent->cl_remove_consent( '[email protected]', 'form_1' );
$consent = $cl_consent->cl_update_consent( '[email protected]', 'form_1', 0 )
$consent = $cl_consent->cl_consent_exists( '[email protected]', 'form_1' );
$consent = $cl_consent->cl_has_consent( '[email protected]', 'form_1' );