-
-
Save gemmadlou/5f188207983339589e95eed14c9d30a0 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 hidden or 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