Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/drift-creative-systems/drift-cookie-consent/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Drift: Cookie Consent
Free WordPress plugin by Drift Creative Systems. Blocks YouTube and Vimeo embeds until marketing consent is given through CookieScript or Cookiebot, and shows the video's thumbnail with a consent message in their place. Settings are under Settings → Drift: Cookie Consent.
- WordPress.org slug:
drift-cookie-consent(submission pending) - Licence: GPL-2.0-or-later
- Requires WordPress 6.4+, PHP 7.4+, and CookieScript or Cookiebot on the site
The user-facing documentation is readme.txt, which WordPress.org displays. This file is for developers.
Structure
drift-cookie-consent.php Bootstrap: duplicate-install guard, constants, requires
includes/
settings.php Defaults, option read + sanitise, Settings API fields
admin.php Settings → Drift: Cookie Consent screen, admin CSS, footer, Plugins-row link
iframe-blocker.php Full-page output buffer that rewrites YouTube/Vimeo iframes before the page is sent
frontend.php Enqueues front.css / front.js, passes settings as DRIFT_COOKIE_CONSENT
assets/
front.js Builds the placeholder; blocks iframes added after page load; reopens the consent popup
front.css Placeholder, overlay and ratio-container styles
admin.css Settings screen
uninstall.php Removes the option, on every site in a network
How blocking works
drift_cookie_consent_start_output_buffer()starts a buffer ontemplate_redirect(priority 0). It's skipped in wp-admin, AJAX, REST, cron, feeds, robots, trackbacks and page builder previews (elementor-preview,et_fb,fl_builder,bricks,ct_builder,vc_editable).- On output,
WP_HTML_Tag_Processorwalks every `