Functions & Shortcodes

You are here:

Functions

GDPR::save_consent( $user_id, $consent_id )
Save a user consent to the database.

GDPR::remove_consent( $user_id, $consent_id )
Remove a user consent from the database.

GDPR::consent_checkboxes()
Print a set of checkboxes for all registered consent options.

GDPR::get_consent_checkboxes()
Return a set of checkboxes for all registered consent options.

GDPR::save_user_consent_on_registration( $user_id )
Saves all the checked consent options to the user database and logs the registration to the audit log. This should be used in conjunction with GDPR::consent_checkboxes(). This functions should be called right after the user has been saved to the database.

has_consent( $consent_id )
Checks if a user has given a specific consent. Works for logged in users or visitors.

is_allowed_cookie( $cookie )
Checks if a cookie is allowed or not. Works for logged in users or visitors.

gdpr_request_form( $type )
Renders one of the request forms.
Possible types are: delete, rectify, complaint or export-data.

gdpr_preferences( $text )
Renders a button that opens the privacy preference center.

Shortcodes

[gdpr_preferences text="Privacy Preferences"]
Renders a button that opens the privacy preference center. The text attribute is optional. By default, it is “Privacy Policy”.

[gdpr_request_form type="delete"]
Renders the user deletion request form.

[gdpr_request_form type="rectify"]
Renders the data rectification request form.

[gdpr_request_form type="complaint"]
Renders the complaint form.

[gdpr_request_form type="export-data"]
Renders the user data export request form.