Вопрос

My posts have YouTube embedded videos in the form of:

<object width="600" height="400" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/zN9mdItmoBs&amp;vq=hd720" /><embed width="600" height="400" type="application/x-shockwave-flash" src="http://www.youtube.com/v/zN9mdItmoBs&amp;vq=hd720" /></object>

How do I wrap a <div> around it?

I've tried adding the following to the functions.php file:

add_filter('embed_oembed_html', 'my_embed_oembed_html', 99, 4);
function my_embed_oembed_html($html, $url, $attr, $post_id) {
  return '<div id="video">' . $html . '</div>';
}

It doesn't work. What do I do?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с wordpress.stackexchange
scroll top