Created
April 27, 2015 08:05
-
-
Save ivandoric/25d62025a6824a7dff85 to your computer and use it in GitHub Desktop.
wordpress: Add container around video embeds (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 | |
/* Add container around videos */ | |
add_filter( 'embed_oembed_html', 'custom_oembed_filter', 10, 4 ) ; | |
function custom_oembed_filter($html, $url, $attr, $post_ID) { | |
$return = '<div class="video-container">'.$html.'</div>'; | |
return $return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment