This makes user entered embed elements in content not work responsively.
We should add something like this to functions/filters.php:
/**
* Wrap auto-generated embed elements in a div with a custom class
*/
function bolts_wp_wrap_auto_embed_elements($html)
{
return '<div class="embed-wrapper">' . $html . '</div>';
}
add_filter('embed_oembed_html', 'bolts_wp_wrap_auto_embed_elements', 10, 3);
add_filter('video_embed_html', 'bolts_wp_wrap_auto_embed_elements');
/**
* Wrap user entered embed elements in a div with a custom class
*/
function bolts_wp_wrap_user_embed_elements($content)
{
$pattern = '~<iframe.*</iframe>|<embed.*</embed>~';
preg_match_all($pattern, $content, $matches);
foreach ($matches[0] as $element) {
$wrapped_element = '<div class="embed-wrapper">' . $element . '</div>';
$content = str_replace($element, $wrapped_element, $content);
}
return $content;
}
add_filter('the_content', 'bolts_wp_wrap_user_embed_elements');
This makes user entered embed elements in content not work responsively.
We should add something like this to
functions/filters.php
: