{
  "$schema": "https://playground.wordpress.net/blueprint-schema.json",
  "meta": {
    "title": "RoyalComply — Live Demo",
    "description": "Try the GDPR / CCPA cookie consent banner live in your browser. Script blocking, Google Consent Mode v2, and regional banner behavior all pre-activated.",
    "author": "royalplugins",
    "categories": ["Privacy & Compliance"]
  },
  "landingPage": "/?p=1",
  "preferredVersions": { "php": "8.2", "wp": "latest" },
  "phpExtensionBundles": ["kitchen-sink"],
  "features": { "networking": true },
  "login": { "username": "admin", "password": "password" },
  "steps": [
    {
      "step": "setSiteOptions",
      "options": {
        "blogname": "RoyalComply Demo",
        "blogdescription": "A sample site showing the cookie consent banner in action."
      }
    },
    {
      "step": "installPlugin",
      "pluginData": { "resource": "wordpress.org/plugins", "slug": "royalcomply" },
      "options": { "activate": true }
    },
    {
      "step": "runPHP",
      "code": "<?php\nrequire_once '/wordpress/wp-load.php';\n\n$body = <<<HTML\n<h2>Cookie consent banner &mdash; live</h2>\n<p>The banner is visible at the bottom of this page. Click <strong>Accept All</strong>, <strong>Reject All</strong>, or <strong>Cookie Settings</strong> to try the three consent paths.</p>\n<p>Behind the scenes, RoyalComply blocks analytics and marketing scripts until you consent by rewriting their <code>type</code> attribute to <code>text/plain</code>. After consent, it fires <code>gtag('consent', 'update', {...})</code> via Google Consent Mode v2 so Google Tag Manager, Google Analytics, and Google Ads respect the choice.</p>\n<h3>What to explore in the demo</h3>\n<ul>\n  <li><strong>Banner &mdash; accept / reject / settings:</strong> open the settings modal to toggle Analytics, Marketing, and Preferences categories independently.</li>\n  <li><strong>Consent Log:</strong> every choice is stored with a SHA-256 hashed visitor ID, timestamp, and category selections &mdash; no IPs or PII.</li>\n  <li><strong>Banner Design:</strong> change colors, position (6 options), and layout (bar or box).</li>\n  <li><strong>Cookie Scanner:</strong> scans rendered HTML for known third-party script patterns and matches against 50+ known cookies.</li>\n</ul>\n<h3>Admin tour</h3>\n<p>Log in with <code>admin</code> / <code>password</code> and visit <a href=\"/wp-admin/admin.php?page=royalcomply\">RoyalComply &rarr; Dashboard</a>. Submenu: <strong>Cookies</strong>, <strong>Banner Design</strong>, <strong>Consent Log</strong>, <strong>Settings</strong>.</p>\n<h3>Compliance coverage</h3>\n<p>GDPR (EU/EEA), CCPA (California), and 19 other US state privacy laws (VCDPA, CPA, CTDPA, UCPA, TIPA, ICDPA, MTCDPA, TDPSA, OCPA, DPDPA, FDBR, NJDPA, NHDPA, KCDPA, NEBDPA, ICDPA, MCDPA, MNDPA). Region detection runs server-side from CDN headers (Cloudflare <code>CF-IPCountry</code>) with a browser-timezone fallback &mdash; no external IP lookup.</p>\nHTML;\n\n// Overwrite the default 'Hello world!' post (ID 1) so the landing URL is stable.\nwp_update_post( [\n  'ID'           => 1,\n  'post_title'   => 'RoyalComply — Live Demo',\n  'post_content' => $body,\n  'post_status'  => 'publish',\n  'post_author'  => 1,\n] );\n"
    }
  ]
}
