=== Kennedy Auto Legal Compliance ===
Contributors: anthonyacosta
Tags: privacy policy, terms of service, cookie consent, GDPR, CCPA
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 3.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate Privacy Policy, Terms of Service, and CCPA Do Not Sell pages instantly. Includes a GDPR/CCPA cookie banner with consent logging. By Kennedy Media Group.

== Description ==

Kennedy Auto Legal Compliance generates and publishes legally-structured documents from your WordPress dashboard in one click. A GDPR/CCPA-compliant cookie banner is injected sitewide with no shortcodes required.

= Free Features =

* 5-step setup wizard — business name, contact, location, data types, clauses
* Privacy Policy generator — CCPA & GDPR-ready, 13 sections
* Terms of Service generator — 17 sections with configurable clauses
* CCPA Do Not Sell page — opt-out form, emails admin and requester, sets DNS cookie
* Auto-creates and publishes WordPress pages on generation
* Sets WordPress native Privacy Policy page option automatically
* Cookie consent banner with Essential / Analytics / Marketing category toggles
* Google Consent Mode v2 + GTM dataLayer integration
* One-click regenerate from Documents tab
* Template update notifications (requires JSON feed at kennedymedia.com)

= Pro Features — upgrade at kennedymedia.com =

* Consent Log & CSV Export — every banner interaction logged with timestamp, hashed IP, and choices made; export anytime for compliance audits
* Geo-aware cookie banner — detects EU visitors (GDPR) and California visitors (CCPA) via ipapi.co; shows the correct banner, grants consent silently for unaffected regions
* GTM Consent Mode v2 — full Google Tag Manager integration
* Monthly compliance emails — checklist delivered to admin email every month
* Priority support — direct access to Kennedy Media Group

= Shortcodes =

* [kmg_dns_form] — CCPA Do Not Sell opt-out form (auto-embedded in Do Not Sell page)
* [kmg_privacy_policy] — renders stored Privacy Policy content
* [kmg_terms_of_service] — renders stored Terms of Service content
* [kmg_compliance_badge] — linked badge with Privacy Policy, Terms, and Do Not Sell links

= Legal Disclaimer =

Generated documents are templates only and do not constitute legal advice.
Always consult a qualified attorney licensed in your jurisdiction.

== Installation ==

1. Upload the plugin folder to /wp-content/plugins/
2. Activate via WP Admin > Plugins
3. Go to your WordPress Dashboard — fill in the 5-step Setup wizard
4. Click the Generate tab — publish all three pages
5. The cookie banner is live immediately

== Changelog ==

= 3.0.0 =
* NEW: 5-step setup wizard replaces single-form profile entry
* NEW: CCPA Do Not Sell page generator with opt-out form, admin email, and DNS cookie
* NEW: Consent Log — every banner interaction logged to a custom DB table (Pro: view in dashboard + CSV export)
* NEW: Template version check — weekly cron pings kennedymedia.com; admin notice + dashboard badge when update is available
* NEW: One-click document regenerate button in Documents tab
* FIXED: Cookie JS (kmgalc-cookie.js) now actually fires kmgalc_log_consent AJAX call on accept/reject/preferences
* FIXED: Admin JS (kmgalc-admin.js) fully rewritten — wizard navigation, consent log table renderer, correct generate handler for all three doc types (privacy/tos/dns)
* FIXED: CONSENT_VER bumped to '3' — existing v2 consent holders will be re-prompted once
* FIXED: Do Not Sell enforcement in cookie JS — sets marketing=false if kmgalc_dns=1 cookie is present
* FIXED: Generate button card lookup now matches by type not by DOM position (3 cards instead of 2)
* ADDED: CSS for wizard steps, check-card grid, consent log table, template update badge, DNS form styles
* ADDED: Do Not Sell link auto-appended to cookie banner message when DNS page exists
* ADDED: Consent log skips geo_auto silent grants — only logs explicit user choices

= 2.5.1 =
* Fixed Pro tab CTAs — purchase directs to kennedymedia.com; activation inline via key entry
* Fixed pricing display — $9/mo or $89/yr

= 2.5.0 =
* Renamed to Kennedy Auto Legal Compliance
* Added geo-aware cookie banner (Pro) using ipapi.co detection
* Added monthly compliance email cron (Pro)
* Added WordPress native privacy policy page auto-assignment
* Fixed slow meta_query — page IDs cached in kmgalc_page_map option
* Removed multi-site sync and white-label badge

= 2.1.0 =
* Fixed license activation (plugin_slug parameter)
* Replaced heredoc with string concatenation
* Fixed date() to gmdate(), added wp_unslash() throughout

= 2.0.0 =
* Complete rewrite with business profile, auto page creation, sitewide cookie banner
