=== CD Cookie Consent ===
Contributors: clarkedesign
Tags: cookies, cookie consent, gdpr, pecr, cookie banner
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Opt-in cookie consent for UK GDPR and PECR: equal Accept and Reject buttons, consent by category, and scripts blocked until visitors agree.

== Description ==

CD Cookie Consent asks visitors for permission before any non-essential cookies are set, as the UK GDPR,
PECR and the ICO's guidance require.

* A cookie banner with **Accept all** and **Reject all** buttons given equal prominence.
* A preferences panel where visitors choose by category: Necessary (always on), Analytics and Marketing.
* Tracking scripts are held back until the visitor accepts their category - nothing runs on page load.
* A small cookie settings button on every page, so visitors can change or withdraw their choice at any time.
  Withdrawing consent removes the tracking cookies the site set and reloads the page.
* A Cookie Policy page is created for you when the plugin is activated, ready for you to review.
* Works with page caching - the choice is read in the visitor's browser, not on the server.

= Blocking your scripts =

Paste tracking code (Google Analytics, Meta Pixel and so on) into Settings > Cookie Consent > Scripts, under
the right category. It is added to every page, but only runs once the visitor accepts that category.

Scripts already in your theme can be blocked by changing the script tag to:

`<script type="text/plain" data-cd-category="analytics"> ... </script>`

using `analytics` or `marketing` as the category.

= Changing the choice later =

As well as the floating button, you can add a button anywhere with the shortcode `[cd_cookie_settings]`,
link a menu item to `#cd-cookie-settings`, or give any element the class `cd-cookie-settings`.

= For developers =

* `window.cdCookieConsent.hasConsent( 'analytics' )`, `.getConsent()` and `.showPreferences()`.
* Document events `cd-cookie-consent:ready` and `cd-cookie-consent:change` (the choice is in `event.detail.consent`).
* Filters `cd_cookie_consent_categories` and `cd_cookie_consent_clear_cookies`.
* Colours can be changed with CSS variables such as `--cd-cc-accent` and `--cd-cc-bg`.

CD Cookie Consent Pro adds banner position and colour options, and holds back YouTube videos and Google Maps until visitors consent.

== Installation ==

1. Upload the plugin zip from Plugins > Add New > Upload Plugin.
2. Activate the plugin. A Cookie Policy page is created and linked from the banner.
3. Go to Settings > Cookie Consent to add your tracking scripts and adjust the wording.
4. Review the Cookie Policy page and list the cookies your website uses.

== Frequently Asked Questions ==

= Does this make my website compliant? =

It gives you the tools the ICO expects - opt-in consent, an equally easy way to refuse, and a way to change
your mind - but you still need to block every non-essential script and describe your cookies accurately.

= What happens to the Cookie Policy page if I delete the plugin? =

The page is kept, as it's your content. All of the plugin's settings are removed.

== Changelog ==

= 0.1.2 =
* Updates now come from WordPress.org: removed the Clarke Design update checker, which WordPress.org does not allow.
* Translations now load automatically from WordPress.org.

= 0.1.1 =
* The settings page shows the Clarke Website Design logo.

= 0.1.0 =
* First version.
