Skip to content

Instantly share code, notes, and snippets.

@javiergbas
Created January 28, 2016 15:09
Embed
What would you like to do?
Automatic responsive videos with bootstrap
<?php
// responsive videos
function oembed_filter( $output, $data, $url ) {
$return = '<div class="video-wrapper"><div class="embed-responsive embed-responsive-16by9">'.$output.'</div></div>';
return $return;
}
add_filter('oembed_dataparse', 'oembed_filter', 90, 3 );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment