{"id":401640,"date":"2026-11-10T22:06:52","date_gmt":"2026-11-10T22:06:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mortar-consent\/"},"modified":"2026-11-10T22:06:29","modified_gmt":"2026-11-10T22:06:29","slug":"mortar-consent","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/mortar-consent\/","author":23602240,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1.0","stable_tag":"0.1.0","tested":"7.1.4","requires":"6.6","requires_php":"8.2","requires_plugins":null,"header_name":"Mortar Consent","header_author":"Mortar Digital","header_description":"Cookie consent that is opt-in, lets visitors choose and change their mind, and never calls third-party services.","last_updated":"2026-11-10 22:06:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/mortar.digital\/plugins\/consent\/","header_author_uri":"https:\/\/mortar.digital\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":67,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1.0":{"tag":"0.1.0","author":"mortardigital","date":"2026-11-10 22:06:29","revision":3795342}},"upgrade_notice":{"0.1.0":"<p>First public release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3795342,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3795342,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3795342,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3795342,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3795342,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"mortar-consent\/cookie-declaration":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"mortar-consent\/cookie-declaration","title":"Cookie declaration","category":"widgets","icon":"list-view","description":"Lists every cookie category and the cookies it sets, from the cookie consent settings.","keywords":["cookie","consent","privacy","policy"],"textdomain":"mortar-consent","attributes":{"showSettingsButton":{"type":"boolean","default":true}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true}},"editorScript":"mortar-consent-cookie-declaration-editor"},"mortar-consent\/settings-button":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"mortar-consent\/settings-button","title":"Cookie settings button","category":"widgets","icon":"privacy","description":"Lets visitors reopen their cookie preferences at any time.","keywords":["cookie","consent","privacy","gdpr"],"textdomain":"mortar-consent","attributes":{"label":{"type":"string","default":""}},"supports":{"html":false,"color":{"background":true,"text":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true}},"editorScript":"mortar-consent-settings-button-editor"}},"tagged_versions":["0.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3795342,"resolution":"1","location":"assets","locale":"","width":2560,"height":1600},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3795342,"resolution":"2","location":"assets","locale":"","width":2560,"height":1600},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3795342,"resolution":"3","location":"assets","locale":"","width":1584,"height":990},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3795342,"resolution":"4","location":"assets","locale":"","width":2560,"height":1600},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3795342,"resolution":"5","location":"assets","locale":"","width":2560,"height":1600},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3795342,"resolution":"6","location":"assets","locale":"","width":2560,"height":1600},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3795342,"resolution":"7","location":"assets","locale":"","width":1170,"height":2079}},"screenshots":{"1":"The consent banner: Accept all, Reject all and Manage preferences carry equal weight. Shown here styled by the Mortar Digital theme.","2":"The preferences dialog, with a switch per category.","3":"A YouTube embed held back until the visitor loads it or allows the category.","4":"Scripts: choose which registered scripts wait for consent, or mark up hand-written tags.","5":"Integrations: Google Consent Mode v2 signals mapped to your categories.","6":"The consent log: totals for the last 30 days, records by consent ID and a CSV export.","7":"The preferences dialog on a phone."}},"plugin_section":[],"plugin_tags":[223629,16626,389,131785,396],"plugin_category":[54],"plugin_contributors":[291938],"plugin_business_model":[],"class_list":["post-401640","plugin","type-plugin","status-publish","hentry","plugin_tags-consent-mode","plugin_tags-cookie-consent","plugin_tags-cookies","plugin_tags-gdpr","plugin_tags-privacy","plugin_category-security-and-spam-protection","plugin_contributors-mortardigital","plugin_committers-mortardigital"],"banners":{"banner":"https:\/\/ps.w.org\/mortar-consent\/assets\/banner-772x250.png?rev=3795342","banner_2x":"https:\/\/ps.w.org\/mortar-consent\/assets\/banner-1544x500.png?rev=3795342","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/mortar-consent\/assets\/icon.svg?rev=3795342","icon":"https:\/\/ps.w.org\/mortar-consent\/assets\/icon.svg?rev=3795342","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-1.png?rev=3795342","caption":"The consent banner: Accept all, Reject all and Manage preferences carry equal weight. Shown here styled by the Mortar Digital theme."},{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-2.png?rev=3795342","caption":"The preferences dialog, with a switch per category."},{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-3.png?rev=3795342","caption":"A YouTube embed held back until the visitor loads it or allows the category."},{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-4.png?rev=3795342","caption":"Scripts: choose which registered scripts wait for consent, or mark up hand-written tags."},{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-5.png?rev=3795342","caption":"Integrations: Google Consent Mode v2 signals mapped to your categories."},{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-6.png?rev=3795342","caption":"The consent log: totals for the last 30 days, records by consent ID and a CSV export."},{"src":"https:\/\/ps.w.org\/mortar-consent\/assets\/screenshot-7.png?rev=3795342","caption":"The preferences dialog on a phone."}],"raw_content":"<!--section=description-->\n<p>Mortar Consent asks visitors before your site sets optional cookies or loads third-party content, and keeps their choice. It runs entirely on your own WordPress site: no account, no external service and no telemetry.<\/p>\n\n<p><strong>Fair by design<\/strong><\/p>\n\n<ul>\n<li>\"Accept all\", \"Reject all\" and \"Manage preferences\" sit side by side with the same styling.<\/li>\n<li>Nothing optional is pre-ticked, and the page stays usable while the banner is open.<\/li>\n<li>Visitors choose per category (functional, analytics, marketing, or your own) and can change their mind at any time from a \"Cookie settings\" button or link.<\/li>\n<li>Visitors are asked again when your cookie policy version changes or their consent expires.<\/li>\n<\/ul>\n\n<p><strong>Blocks what needs consent<\/strong><\/p>\n\n<ul>\n<li>Scripts wait for consent: pick them by script handle in the settings, or mark hand-written tags with <code>type=\"text\/plain\" data-mortar-consent=\"analytics\"<\/code>. Scripts that depend on a blocked script wait too.<\/li>\n<li>YouTube, Vimeo, Google Maps, Spotify and other embeds become click-to-load placeholders. Embeds from unknown third-party hosts are held back as well.<\/li>\n<li>When a visitor withdraws consent, known cookies in that category are deleted.<\/li>\n<\/ul>\n\n<p><strong>Works with the rest of your stack<\/strong><\/p>\n\n<ul>\n<li>Google Consent Mode v2, with defaults set before any Google tag runs.<\/li>\n<li>Global Privacy Control: when the browser sends it, \"Accept all\" leaves marketing off.<\/li>\n<li>The WP Consent API, so other plugins can follow the visitor's choice.<\/li>\n<li>Safe with full-page caching: every visitor gets the same HTML.<\/li>\n<\/ul>\n\n<p><strong>Records and declares<\/strong><\/p>\n\n<ul>\n<li>A consent log stores each choice with a random consent ID, the policy version and the time, but no IP address, browser details or user account. Look up a consent ID or export the log as CSV.<\/li>\n<li>A Cookie declaration block lists every category and cookie for your cookie policy page.<\/li>\n<li>Suggested privacy policy text is added to Settings \u2192 Privacy \u2192 Policy Guide.<\/li>\n<\/ul>\n\n<p><strong>Accessible and light<\/strong><\/p>\n\n<ul>\n<li>Built on the native dialog element, keyboard operable and tested against WCAG 2.2 AA.<\/li>\n<li>The visitor script is under 5 KB gzipped, with no dependencies.<\/li>\n<li>Restyle it from your theme with CSS custom properties, or replace the styles entirely.<\/li>\n<\/ul>\n\n<p>Mortar Consent is a tool, not legal advice. It does not find trackers by itself, and you are responsible for configuring it to match the cookies and services your site uses.<\/p>\n\n<p>Mortar Consent is made by <a href=\"https:\/\/mortar.digital\/\">Mortar Digital<\/a>, a WordPress studio that designs, builds, hosts and looks after WordPress sites. It runs on every site we build.<\/p>\n\n<ul>\n<li><a href=\"https:\/\/mortar.digital\/plugins\/consent\/docs\/\">Documentation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Mortar-Digital\/consent\">Source code, build tools and developer hooks<\/a>: the minified scripts are built from <code>assets\/consent.js<\/code> and the <code>admin\/<\/code> folder, which ship with the plugin; the README explains the build.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install Mortar Consent from Plugins \u2192 Add New, or upload the zip under Plugins \u2192 Add New \u2192 Upload Plugin, then activate it.<\/li>\n<li>Go to Settings \u2192 Cookie consent.<\/li>\n<li>Under <strong>Categories &amp; cookies<\/strong>, list the cookies your site sets. Under <strong>Scripts<\/strong>, add the handles of the tracking scripts that need consent.<\/li>\n<li>Set your cookie policy link, and add the <strong>Cookie declaration<\/strong> block to your cookie policy page.<\/li>\n<li>Visit your site in a private window and test accepting, rejecting and changing your choice. Check your browser's developer tools to confirm that no optional cookies or requests happen before consent.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20find%20and%20block%20trackers%20automatically%3F\"><h3>Does it find and block trackers automatically?<\/h3><\/dt>\n<dd><p>No. You tell it which scripts need consent. Scripts added through WordPress (with <code>wp_enqueue_script<\/code>) are blocked by handle; in your page source their tag has an id of <code>handle-js<\/code>. Scripts pasted into your theme need <code>type=\"text\/plain\"<\/code> and a <code>data-mortar-consent<\/code> attribute. Trackers that another script inserts later need that script to be blocked.<\/p><\/dd>\n<dt id=\"does%20it%20make%20my%20site%20gdpr%20compliant%3F\"><h3>Does it make my site GDPR compliant?<\/h3><\/dt>\n<dd><p>No plugin can do that on its own. Mortar Consent gives visitors a fair choice and keeps a record of it, but compliance depends on your configuration, your content and the services you use. Test the cookies and requests your site actually makes.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20page%20caching%3F\"><h3>Does it work with page caching?<\/h3><\/dt>\n<dd><p>Yes. The banner markup is the same for every visitor, and the visitor's browser decides what to show and load. Plugins that combine or rewrite script tags can undo the blocking, so exclude blocked scripts from them.<\/p><\/dd>\n<dt id=\"how%20do%20visitors%20change%20their%20mind%3F\"><h3>How do visitors change their mind?<\/h3><\/dt>\n<dd><p>From the floating \"Cookie settings\" button (which you can turn off), the Cookie settings button block, the <code>[mortar_consent_settings]<\/code> shortcode, or any link to <code>#cookie-settings<\/code>, such as a menu item.<\/p><\/dd>\n<dt id=\"how%20does%20it%20work%20with%20google%20analytics%20and%20google%20ads%3F\"><h3>How does it work with Google Analytics and Google Ads?<\/h3><\/dt>\n<dd><p>Turn on Google Consent Mode v2 under Integrations. To load nothing until consent (basic mode), also add the Google tag's script handle under Scripts. To let Google send cookieless pings before consent (advanced mode), leave the tag unblocked.<\/p><\/dd>\n<dt id=\"what%20data%20does%20it%20store%3F\"><h3>What data does it store?<\/h3><\/dt>\n<dd><p>The <code>mortar_consent<\/code> cookie on the visitor's device holds a random consent ID, the policy version, the time of the choice and the allowed categories. When the consent log is on, the same details and how the choice was made are stored on your server. No IP address, browser details or WordPress user ID are stored. To limit abuse, the log endpoint briefly counts requests under a keyed hash of the IP address, which expires within about ten minutes. The plugin sends nothing to any outside service.<\/p><\/dd>\n<dt id=\"how%20long%20is%20data%20kept%3F\"><h3>How long is data kept?<\/h3><\/dt>\n<dd><p>Consent lasts 365 days by default, and log records 1095 days (three years). You can change both in the settings. Older records are deleted daily.<\/p><\/dd>\n<dt id=\"can%20visitors%20export%20or%20erase%20their%20consent%20record%3F\"><h3>Can visitors export or erase their consent record?<\/h3><\/dt>\n<dd><p>Consent records cannot be linked to a person, email address or user account, so WordPress's personal data export and erase tools have nothing to find. A visitor can quote the consent ID shown in their cookie preferences, and you can look it up in the Consent log tab.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens when I delete the plugin?<\/h3><\/dt>\n<dd><p>Its scheduled clean-up task is removed. Your settings and the consent log are kept, because you may need the log as evidence. To delete them as well, add <code>define('MORTAR_CONSENT_DELETE_DATA_ON_UNINSTALL', true);<\/code> to wp-config.php before deleting the plugin. On multisite this applies to every site.<\/p><\/dd>\n<dt id=\"does%20it%20support%20multisite%3F\"><h3>Does it support multisite?<\/h3><\/dt>\n<dd><p>Yes. Each site has its own settings and consent log.<\/p><\/dd>\n<dt id=\"can%20i%20change%20how%20it%20looks%3F\"><h3>Can I change how it looks?<\/h3><\/dt>\n<dd><p>Yes. Set the <code>--mortar-consent-*<\/code> CSS custom properties in your theme, for example <code>--mortar-consent-button-bg<\/code>, or turn off the built-in styles with the <code>mortar_consent_load_styles<\/code> filter. Keep the three choice buttons equally prominent.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>First public release.<\/li>\n<\/ul>","raw_excerpt":"Cookie consent that is opt-in, lets visitors choose and change their mind, and never calls third-party services.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/401640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=401640"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mortardigital"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=401640"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=401640"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=401640"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=401640"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=401640"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=401640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}