Created
October 17, 2018 12:06
-
-
Save annelyse/1385c8d760037b6660561b260657af6a to your computer and use it in GitHub Desktop.
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 | |
/* ------------------------------------ */ | |
add_filter( 'embed_oembed_html', 'wrap_oembed_html', 99, 4 ); | |
function wrap_oembed_html( $cached_html, $url, $attr, $post_id ) { | |
return '<div class="embed-responsive embed-responsive-16by9">' . $cached_html . '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment