Created
April 20, 2015 11:56
-
-
Save schilke/247cdde4c300244d6d7d to your computer and use it in GitHub Desktop.
Make embedded videos fully responsive
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
/* Add responsive container to embeds */ | |
function jsc_embed_html( $html ) { | |
return '<div class="video-container">' . $html . '</div>'; | |
} | |
add_filter( 'embed_oembed_html', 'jsc_embed_html', 10, 3 ); | |
add_filter( 'video_embed_html', 'jsc_embed_html' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, simple and useful :)