Created
July 18, 2022 10:29
-
-
Save webgurus/453a8693353da7634706520970f98e61 to your computer and use it in GitHub Desktop.
Add Wrapper to oEmbed to allow reframe.js to resize
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
/** | |
* Add wrapper to oEmbed | |
*/ | |
add_filter('embed_oembed_html', function($html, $url, $attr) { | |
return $html!=='' ? '<div class="embed-container">'.$html.'</div>' : ''; | |
}, 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment