Created
January 28, 2016 15:09
-
-
Save javiergbas/51f5d63ac8c7b3f45caf to your computer and use it in GitHub Desktop.
Automatic responsive videos with bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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