=== Aucor Cookie Consent === Contributors: Teemu Suoranta Tags: wordpress, aucor, cookie consent Requires at least: 4.7 Tested up to: 5.2.2 Requires PHP: 7.0 Stable tag: trunk License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html A simple plugin for displaying a cookie consent notification. == Description == When activated, the plugin displays a notification at the bottom of the screen. By default it displays a "This website operates using cookies." message and an "OK" confirmation button in a simple box. == Features == = Privacy policy page = The notification can be modified to include a link to a privacy policy page (or anything really). Using the following filter you can include a link to a page using it's ID or a direct URL: `// Set page id for a read more link. You can also use direct URL add_filter('aucor-cookie-consent-page-id', function($value) { return 123; // or 'https://example.url' });` If you absolutely want to, you can also set this in wp-config.php: `define('AUCOR_COOKIE_PAGE_ID', 123);` By default the link text is "Read more". = Polylang support = This plugin supports translations and custom texts through [Polylang](https://wordpress.org/plugins/polylang/). If string translations are given, the plugin will recognise the active language and display the texts in the correct language. = Custom message = If you don't use Polylang, you can customize the message with the following filter: `// Custom message add_filter('aucor-cookie-consent-msg', function($value){ return 'New custom message'; });` = Custom confirmation button text = If you don't use Polylang, you can customize the confirmation button text with the following filter: `// Custom button text add_filter('aucor-cookie-consent-btn', function($value) { return 'New custom button text'; });` = Custom link text = If you don't use Polylang, you can customize the link text with the following filter: `// Custom read more text add_filter('aucor-cookie-consent-read-more', function($value){ return 'New custom link text'; });` = Color scheme = The displayed notification has black text with a white background by default. This can be changed to a dark version (white text with a black background) with the following filter: `// Change color scheme, defaults to 'light'. Can be 'light', 'dark' or 'none' add_filter('aucor-cookie-consent-theme', function($value) { return 'dark'; });` = Styles = If you aren't satisfied with just a light or dark color scheme, below is the structure of classes (in SASS) of the different components in the notification. The button uses a `.btn` class that your theme might style correctly. Tweak other styles as you need. You can disable all styles with the previous filter and returning 'none'. `/********************* Cookie Consent *********************/ /* Simple */ .cc-banner { .cc-message { .cc-more-info { } } .cc-btn-wrap { .btn { } } } /* All */ .cc-banner{ &.cc-container { } &.cc-container--open { } .cc-container-inner { .cc-message-wrap { .cc-message { .cc-more-info { } } } .cc-btn-wrap { .btn { } } } }` **Protip:** While the cookie consent notification is visible, the body tag has a "cc-is-visible" class. This can be used to add extra room to the footer etc. if needed. == Installation == 1. Install the plugin from the WordPress plugin screen. 2. Activate the plugin through the "Plugins" menu in WordPress.