Skip to content

Instantly share code, notes, and snippets.

View DvdGiessen's full-sized avatar

Daniël van de Giessen DvdGiessen

View GitHub Profile
<?php
/**
* Implementation for WP filter 'embed_oembed_html'.
* Modifies any iframes in the oEmbed's HTML to use a
* empty src-attribute, storing the original value in
* the data-src-attribute. A small piece of JavaScript
* can restore the src-attribute later.
* This is particularly useful for example to prevent
* external sites from setting cookies without the