ElliotSowersby / simple-cloudflare-turnstile

WordPress Plugin: Easily add Cloudflare Turnstile to all your WordPress website forms to protect them from spam!
38 stars 12 forks source link

Add comply option for turnstile #12

Closed Severino closed 3 months ago

Severino commented 1 year ago

Motivation

I want to stay GDPR conform by giving my visitors the option to only enable Turnstile when they 'opt-in' to do so without having to use another blocker plugin or cookie banner.

Changes

I added two options:

  1. cfturnstile_compliance: allows users to enable the compliance option
  2. cfturnstile_compliance_message_html: Users can input their compliance message as HTML, which may contain links (e.g. to Cloudflare's Data Protection Guidelines)

As I needed to add some styling to the confirmation box, I renamed the cfturnstile.css to cf_wpduscuz.css (as it is specific to that plugin only and only loaded when that plugin is present) and created a cf_turnstile.css with some styling for the compliance box.

Additionally there are some whitespace changes, that I kept in the commits, as they improved the consistency of the codebase.

Severino commented 1 year ago

Just found an error will commit fix tomorrow.