Plugins / Pantry Consent
Pantry Consent
v1.0.0Contents: A cookie banner with categories that holds tags until consent.
27 KB, no external requests
A plain consent bar with accept, reject and a choice of categories. Scripts marked for a category stay inert until the visitor allows it, Google Consent Mode is updated for tags that use it, and the choice is remembered in a first-party cookie. Nothing is logged and nothing is sent anywhere.

What it does
- A bar at the bottom of the page with headline, text, a link to the privacy page, and three buttons: accept all, reject non-essential, save choices
- Categories necessary, analytics, marketing and preferences, each switchable on the settings screen
- Scripts marked with type text/plain and a data-pantry-consent category attribute run only once that category is allowed
- Dispatches a pantry-consent event with the allowed categories on every page load and on every change, for other plugins and tags
- Updates Google Consent Mode v2 when gtag is present
- Remembers the choice for six months in a first-party cookie and offers a Cookie settings link via shortcode, block or footer option to change it
- Keyboard accessible, inline CSS with colour settings, no external requests
What it does not do
- No consent log or proof of consent
- No region or country detection
- No automatic cookie or script scanner
- No blocking of scripts that are not marked for a category
- No multi-language texts beyond the ones you enter
Measured footprint
- Zip size
- 27 KB
- Lines of PHP
- 1,618
- Options
- pantry_consent_settings, pantry_consent_version
- Post meta
- none
- Custom tables
- none
- Post types
- none
- Cron events
- none
- Transients
- none
- Admin assets
- includes/core/assets/pantry-admin.css on the settings screen only, includes/core/assets/pantry-admin.js on the settings screen only, src/block/editor.js in the block editor only
- Front-end assets
- assets/consent.js on every front-end page: it reads the cookie, runs the scripts the visitor allowed and dispatches the event, 1,884 bytes of CSS printed inline with the bar, only on pages that print the bar
- External requests
- none
- Cookies
- pantry_consent, first party, 180 days, SameSite=Lax, Secure over https, written only when the visitor chooses
- Measured on
- 2026-09-12
Compatibility
- WordPress
- 6.4 or newer, tested to 7.1
- PHP
- 8.1 or newer
- Where it lives
- Plugin Pantry > Consent
- Licence
- GPLv2 or later
Documentation
Read the documentationEvery setting on the Pantry Consent screen and what each one does, with the hooks it publishes: the same text that ships in the plugin README.
Pro add-on (planned)
See Pantry Pro pricing- Consent log for audits with export
- Per-script and per-plugin blocking rules without editing markup
- Region-based defaults
None of this is in the free plugin, and none of it is switched off inside it. Pro would be a separate plugin.
Changelog
All notable changes to Pantry Consent are recorded here. The format follows Keep a Changelog, and the project uses Semantic Versioning.
1.0.0 - 2026-09-12
Added
- A consent bar at the bottom of the page with a headline, a message, a privacy link and three buttons: accept all, reject non-essential and save choices.
- Categories necessary, analytics, marketing and preferences, each offered or not from the settings screen, with wording you set.
- Scripts marked
type="text/plain"anddata-pantry-consent="<category>"are held until that category is allowed, then run once. - A
pantry-consentevent ondocumenton every page load and every change, carrying the allowed categories and the Google Consent Mode map. gtag( 'consent', 'update', ... )for Consent Mode v2 when a tag has putgtagon the page.- The choice kept for 180 days in one first-party cookie, stamped with a consent version that goes up when the categories change.
- A Cookie settings link that brings the bar back, as the shortcode
[pantry_consent_settings], the Cookie settings link block, or a footer link. - Colour settings and about a kilobyte of CSS printed with the bar. No stylesheet to load, no external request, nothing logged.
- Filters
pantry_consent_categories,pantry_consent_show_barandpantry_consent_config.