=== DevLab Cookiemark ===
Contributors: devlab33
Tags: cookies, cookie notice, cookie banner, lgpd, privacy
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A light cookie notice with an accept button. Informational only: it remembers that the notice was accepted and does not block or manage any scripts.

== Description ==

**DevLab Cookiemark** adds a simple, informational cookie notice to your site. A short message and an accept button appear at the bottom (or the top) of the page until the visitor accepts it, with the button or by pressing Escape while the notice has the focus. Then the notice goes away, without reloading the page, and the choice is remembered in the visitor's browser for about 180 days.

It is made for sites that only need to tell visitors that cookies are in use and point them to the Privacy Policy. It is ready to be translated through translate.wordpress.org, and the default texts follow your site language when a translation is available.

**What you can set**

* Turn the notice on or off with one switch.
* The notice text. You may use links, bold and italics; any other HTML is removed.
* The text of the accept button (default: "Accept", shown in your site language when a translation is available).
* A Privacy Policy link. Leave it empty to use the Privacy Policy page you picked in WordPress under Settings > Privacy, or to show no link when there is none.
* Position: bottom or top of the page.
* Colors for the background, the text and the button. The label on the button turns white or dark by itself, so it stays readable. A live preview and a contrast warning help you choose.

**Made to stay out of the way**

* One small CSS file and one small JavaScript file, both inside the plugin. No external requests, no libraries, no fonts, no icons from other sites.
* The banner is a bar. It does not lock the page, does not scroll-jack and does not cover the screen with an overlay.
* Keyboard and screen reader friendly: the banner is a labelled, non-modal dialog; the focus goes to the accept button when the banner appears (unless something else already has the focus); the button works with Enter and Space; Escape, while the focus is inside the banner, closes it and counts as accepting it (the same cookie is set).
* Works with page caching: the HTML is the same for every visitor, and the browser decides whether to show it.
* In the dashboard, its styles and scripts load only on the plugin's own settings screen.

**What it does NOT do**

This is an **informational notice**, not a consent management platform (CMP).

* It does not block, delay or manage scripts, pixels or cookies from other tools. Google Analytics, a Meta Pixel or a chat widget keep working exactly as before.
* There are no cookie categories, no "reject" or "preferences" buttons, no consent logs and no geolocation rules.
* It does **not** make your site compliant with the LGPD (Brazil's General Data Protection Law), the GDPR or any other law, and it is not legal advice. Whether you need a notice, a consent tool or neither depends on what your site does. Check your privacy policy and, if in doubt, ask a qualified professional.

**Privacy**

The plugin collects no visitor data, sends nothing to external services, needs no account or API key and has no telemetry. Its settings screen has two links to the DevLab Store (devlab.ia.br) with utm_ tags that name this plugin (one in the notice, one in the box); your browser contacts that site only if you click one.

It sets exactly one cookie in the visitor's browser, and only when the visitor accepts the notice, by clicking the accept button or by pressing Escape while the focus is on the notice:

* name: `devlab_lgpd_accepted`
* value: `1`
* lifetime: 180 days
* scope: your site only (a first-party cookie), with `SameSite=Lax`, and `Secure` on HTTPS sites.

It holds no personal data. Nothing is stored on your server about the visitor.

**About DevLab**

DevLab builds plugins and themes for WordPress. The plugin adds a DevLab menu with its settings screen. That screen has one dismissible notice and a small box, each with a link to the DevLab Store (devlab.ia.br/store), which lists our free and paid plugins and themes for WordPress. Nothing promotional is added anywhere else in your dashboard, and the plugin never adds a credit link to your site. On your public pages, the cookie notice is the plugin's function, and nothing promotional is added to it or to any other public page.

== Installation ==

1. Upload the `devlab-cookiemark` folder to the `/wp-content/plugins/` directory, or install the plugin from the Plugins screen in WordPress.
2. Activate the plugin through the Plugins screen. The notice starts working with its default text.
3. Go to **DevLab > Cookiemark** to change the text, the button, the position and the colors.
4. Open your site in a private window to see the notice as a new visitor sees it.

== Frequently Asked Questions ==

= Where do I find the settings? =

In the WordPress dashboard, under **DevLab > Cookiemark**. There is also a "Settings" link on the Plugins screen.

= Does this plugin make my site compliant with the LGPD or the GDPR? =

No. It only shows a notice and remembers that the visitor accepted it (with the button, or with Escape while the notice has the focus). Compliance depends on what your site collects, why, and what your privacy policy says. The plugin does not provide legal advice.

= Does it block Google Analytics, ads or other cookies until the visitor accepts? =

No. It does not touch other scripts or cookies. If you need to hold back scripts until the visitor consents, you need a consent management tool.

= Why don't I see the notice on my site? =

* You may have accepted the notice before (with the button or with Escape): the cookie lasts 180 days. Use a private window, or delete the `devlab_lgpd_accepted` cookie.
* Check that the switch under **DevLab > Cookiemark** is on.
* Your theme must call `wp_footer()`, as almost every theme does. The plugin prints the banner there.
* If you use a caching plugin, a server cache or a CDN, clear it after changing the settings.
* The notice needs JavaScript. Without it, nothing is shown.
* The notice does not appear on the dashboard, in the Customizer preview or in embeds.

= Does it work with page caching? =

Yes. The page HTML does not depend on the visitor. The visitor's browser checks the cookie and shows or hides the banner.

= Which cookie does it set, and when? =

`devlab_lgpd_accepted`, only when the visitor clicks the accept button (or presses Escape with the focus on the banner). It lasts 180 days and holds the value `1`. See the Privacy section above.

= Can visitors refuse? =

No. This is an informational notice with a single button. If you need a way to refuse or to choose categories, you need a consent management tool.

= Can I show the notice only on some pages? =

Not in this version.

= Is it accessible? =

It was built with keyboard and screen reader use in mind (see the Description). Accessibility also depends on your colors. The settings screen warns you when the contrast between the background, the text and the button is low.

= Does the plugin add a credit or a link to DevLab on my site? =

No. Nothing is added to your public pages except the notice itself.

= What happens when I delete the plugin? =

The plugin's option and the "notice dismissed" flag are removed from the database. The cookie already stored in visitors' browsers expires by itself.

== Screenshots ==

1. The settings screen with the text, button, position and color options, and the live preview.
2. The notice at the bottom of a page on a desktop screen.
3. The notice on a phone screen.
4. The "Meet DevLab" box on the settings screen.

== Changelog ==

= 0.1.0 =
* First public release.

== Upgrade Notice ==

= 0.1.0 =
First public release.
