Created
June 9, 2014 19:39
-
-
Save JustinChristensen/bf682448672d6f975efd 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
function wrap_youtube_autoembed_in_flexbox($html, $url) { | |
if (stripos($url, "youtube") !== false) { | |
$html = '<div class="flex-video widescreen">' . $html . '</div>'; | |
} | |
return $html; | |
} | |
add_filter("oembed_result", "wrap_youtube_autoembed_in_flexbox", 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment