Skip to content

Instantly share code, notes, and snippets.

View martinjohnyoung's full-sized avatar

Martin Young martinjohnyoung

  • Mara Design
  • Blenheim, NZ
View GitHub Profile

Keybase proof

I hereby claim:

  • I am martinjohnyoung on github.
  • I am martinjohnyoung (https://keybase.io/martinjohnyoung) on keybase.
  • I have a public key ASAMrbHCcT0jpk5-1bQ7bL38v6SLE-9Ar67Ge2XgcrBT_Qo

To claim this, I am signing this object:

@martinjohnyoung
martinjohnyoung / oembed-filter.php
Last active October 20, 2016 15:38
Add a wrapper around oembed objects in WordPress. Should be added to your theme's functions.php
<?php
function funkshun_responsive_videos($html, $url, $attr, $post_id) {
return '<div class="video-wrapper">' . $html . '</div>';
}
add_filter('embed_oembed_html', 'funkshun_responsive_videos', 99, 4);
?>