Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'embed_oembed_html', function ( $html, $url, $attr ) {
- if ((stripos($html,'<iframe') !== false || stripos($html,'<object') !== false || stripos($html,'<embed') !== false) && stripos($html,'flex-video') === false ) {
- $html = str_replace("<iframe","<iframe class='embed-responsive-item'",$html);
- return '<div class="embed-responsive embed-responsive-16by9">'.$html.'</div>';
- } else {
- return $html;
- }
- }, 9999, 3);
Add Comment
Please, Sign In to add comment