Last active
October 20, 2016 15:38
-
-
Save martinjohnyoung/45f7f18dbe779e20fba6 to your computer and use it in GitHub Desktop.
Add a wrapper around oembed objects in WordPress. Should be added to your theme's functions.php
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 | |
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); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment