=== NB Cookie Consent ===
Contributors: aviyo
Tags: cookie consent, gdpr, ccpa, script blocker, rtl
Requires at least: 5.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

GDPR, CCPA & Script Blocker – Simple cookie banner that blocks tracking scripts until consent. LTR & RTL support.

== Description ==

**NB Cookie Consent** provides cookie consent functionality for WordPress websites with script blocking capabilities.

**Features:**
* Accept & Decline cookie buttons (GDPR-friendly)
* WordPress script blocking until consent
* One-click Cookie Policy page generator
* Full RTL support (Arabic, Hebrew, Persian & more)
* Banner customization (colors, positioning, button text)
* Custom button text - translate to any language
* Admin testing tools to verify blocking
* Debug mode for developers
* Cookie consent revocation shortcode [nb_cookie_revocation]
* Accessibility Ready (WCAG) - ARIA support, keyboard navigation, screen-reader friendly
* Cache Plugin Compatible - Works with WP Rocket, LiteSpeed, W3 Total Cache & more

**Blocked Scripts:**
* **Google:** Analytics (GA4, UA), Tag Manager, Site Kit
* **Meta:** Facebook Pixel, Facebook Events
* **Analytics:** MonsterInsights, ExactMetrics, Yoast GA
* **Behavior:** Hotjar, FullStory, LogRocket, Heap
* **Marketing:** Mixpanel, Segment, Amplitude
* **Chat Widgets:** Intercom, Zendesk, Tawk.to, Crisp, Drift
* + Many more automatically detected via WordPress handles

**Pro Version Available:**
Upgrade to [NB Cookie Consent Pro](https://nbplugins.com/cookie-consent) for additional features:
* **Google Consent Mode v2** (Essential for Google Ads)
* **Smart Script Blocking** - blocks even hardcoded scripts
* **Multi-language Support** - Auto-detects 5 languages + WPML
* **Automatic Scanner** & Cookie Categorization
* **Consent Dashboard** (Analytics)
* **Premium Designs** - 6 layouts
* Priority support

**Use Cases:**
* WordPress sites needing cookie consent
* RTL language websites (Arabic, Hebrew, Persian)
* Basic privacy compliance requirements

**Design:**
LTR & RTL support ready out of the box.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/nb-cookie-consent/`
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Go to Settings → Cookie Consent to configure the banner
4. Test the blocking functionality using the admin testing tools

== Frequently Asked Questions ==

= Does this plugin actually block tracking scripts? =

Yes! Unlike cosmetic consent banners, this plugin uses WordPress's `script_loader_tag` filter to block tracking scripts until user consent is obtained.

= What's the difference between standard and Pro versions? =

The standard version includes Accept & Decline buttons and blocks WordPress-enqueued tracking scripts. The Pro version adds Google Consent Mode v2, smart script blocking (hardcoded scripts), multi-language support, cookie scanner, and consent analytics dashboard.

= Does this help with privacy regulations? =

This plugin blocks WordPress-enqueued tracking scripts until user consent. For specific legal compliance questions, consult with a qualified legal professional.

= Can I customize the banner appearance? =

Yes, you can customize colors, positioning, and display type (banner/modal) in the admin settings.

= Does it work with caching plugins? =

Yes, the plugin is compatible with popular caching solutions and includes cache-busting functionality.

= How can users revoke their cookie consent? =

Place the shortcode [nb_cookie_revocation] on your Privacy Policy page or any other page. When users click it, their consent is reset and the cookie banner will reappear.

Shortcode attributes:
* text - Custom button text (default: "Reset Cookie Consent")
* style - "button" or "link" (default: "button")
* class - Custom CSS class (default: "nb-cookie-revoke-btn")

Example: [nb_cookie_revocation text="Withdraw My Consent" style="link"]

== Screenshots ==

1. Clean & Unobtrusive Bottom Banner (Perfect for standard compliance).
2. Center Modal Design (Center popup for higher visibility).
3. Strict Overlay Mode (Ensures user attention before browsing).
4. Native RTL Support (Arabic, Hebrew, Persian & more).
5. Easy Admin Dashboard (Zero coding required).
6. Advanced Testing Tools to verify script blocking.

== Changelog ==

= 1.2.1 =
* Fixed: Cache plugin compatibility - banner now works correctly with WP Rocket, LiteSpeed, etc.
* Fixed: Escape key behavior respects overlay mode setting
* Improved: Accessibility - added ARIA attributes for screen readers
* Improved: Scanner messaging - clearer feedback for hardcoded scripts detection

= 1.2.0 =
* Added: One-click Cookie Policy page generator with auto-fill URL
* Improved: Better LTR & RTL support

= 1.1.9 =
* Fixed: Banner fallback now uses wp_footer for valid HTML compliance
* Added: "Restore Defaults" button for colors and font size settings
* Changed: Decline button enabled by default for GDPR compliance
* Improved: Cleaner description text (removed mixed language in English version)

= 1.1.8 =
* Added: Decline Cookies button - users can now accept OR decline (GDPR-friendly)
* Added: Custom "Decline Button Text" setting - translate to any language
* Added: Decline button color customization
* Updated: Premium features list

= 1.1.7 =
* Initial WordPress.org release
* Accept & Decline cookie buttons
* WordPress script blocking (35+ tracking services)
* Full RTL support (Arabic, Hebrew, Persian & more)
* Custom button text settings
* [nb_cookie_revocation] shortcode for consent withdrawal
* Admin testing tools

== Upgrade Notice ==

= 1.1.8 =
Now includes Decline button for free! Upgrade to Pro for Google Consent Mode v2, Smart Script Blocking, and more.

= 1.0.0 =
Initial release of the free version.

== Technical Details ==

**Script Blocking Method:**
Uses WordPress's `script_loader_tag` filter to block tracking scripts at the server level until user consent.

**Supported Scripts:**
* google-analytics
* googleanalytics
* gtag
* gtm
* google-tag-manager
* facebook-pixel
* fbpixel

**Browser Compatibility:**
* Chrome 70+
* Firefox 65+
* Safari 12+
* Edge 79+

**Performance:**
* Minimal impact on page load speed
* Efficient consent checking
* Clean, lightweight code

== Privacy Policy ==

This plugin stores user consent in a cookie named `nb_cookie_consent` for 365 days. No personal data is transmitted to external servers. The plugin only enables/disables tracking scripts based on user consent.

== Support ==

For support, please use the WordPress.org support forums.
For priority support and advanced features, consider upgrading to [NB Cookie Consent Pro](https://nbplugins.com/cookie-consent).

== Legal Notice ==

This plugin provides a technical tool for implementing cookie consent.
The author does not provide legal advice and bears no responsibility for any damage, fine, or claim arising from the use of this plugin.
It is strongly recommended to consult with a qualified legal expert to ensure compliance with applicable privacy and cookie regulations.
