
A gated YouTube embed as a visitor sees it: a server-rendered placeholder with a named panel, a real "Load" button and a working fallback link. Nothing is requested from the provider until the visitor clicks.
When an editor pastes a YouTube URL, WordPress turns it into an iframe — and on every page view, before the visitor has been offered any choice, their browser contacts the provider. Measured on a plain GET to www.youtube.com/embed/… with no playback and no scripts run: five cookies, two of them ~18-month identifiers. The same request on www.youtube-nocookie.com sets zero.
Calucon Third-Party Embed Gate replaces third-party embeds with a server-rendered placeholder until the visitor clicks to load them — the two-click pattern (Zwei-Klick-Lösung). Nothing third-party is contacted before that click: no script, no iframe, no thumbnail, no preconnect. Nothing is stored on the visitor’s device before that click either — including by this plugin.
See it in action on the live demo, or read the details on the plugin page.
What it does
<embed>/<object> markup in post content, blocks, widgets, comments and archive descriptions — including HTML that has been minified by caching plugins, where most implementations silently fail, and lazy-loaded markup that parks the real URL in a data-src attribute.youtube-nocookie.com (measured: 0 cookies instead of 5), Vimeo with dnt=1.sandbox is preserved, autoplay never survives, inline styles and event handlers are never copied.preconnect/dns-prefetch/preload/prefetch resource hints pointing at gated providers and their CDN hosts (i.ytimg.com, pbs.twimg.com, …).[calucon_embed_gate_withdraw] shortcode.What it is not
Calucon Third-Party Embed Gate is a technical measure. It is not a consent management platform, it does not produce consent records for accountability purposes, it does not scan your site, and it does not make legal claims about your site. What it technically does: it prevents the embed providers’ requests until the visitor acts, and the click is scoped to the embed (or, if you enable memory, the scope you configure). You remain responsible for your privacy policy, which still has to name the providers you embed from, and for your legal bases. If you need a documented consent record, you need a consent management platform.
Customisation
templates/placeholder.php to {your-theme}/calucon-embed-gate/placeholder.php..cg-embed (--cg-bg, --cg-fg, --cg-accent, …) for restyling without specificity wars.wp calucon-embed-gate scan (is every embed gated? --format=json for CI and automation) and wp calucon-embed-gate providers; the shipped docs/customizing.md is a self-contained customization reference for developers and AI agents.calucon_embed_gate_providers, calucon_embed_gate_provider_for_url, calucon_embed_gate_should_gate, calucon_embed_gate_is_own_host, calucon_embed_gate_own_hosts, calucon_embed_gate_placeholder_html, calucon_embed_gate_payload, calucon_embed_gate_note_text, calucon_embed_gate_action_text, calucon_embed_gate_fallback_url, plus the calucon_embed_gate_before_render and calucon_embed_gate_embed_gated actions. Adding a provider is a ten-line filter in functions.php.This plugin makes no request to any external service, on any page, at any time. It contacts no API, loads no remote script, font, image or update check, and sends no telemetry. Its entire purpose is the opposite direction: it prevents your pages from contacting embed providers.
Third-party content enters the picture only after a visitor explicitly clicks the “Load” button on an embed placeholder. At that moment the visitor’s browser loads that one embed from its provider (for example YouTube, Vimeo, or Google Maps) — exactly as it would have without this plugin, except that it now happens on the visitor’s request instead of automatically. Each placeholder names the provider and links its privacy policy before the click, and the provider hostnames in the plugin’s source code exist solely so it can recognise and gate that content. No data is sent anywhere by the plugin itself.