When inserting an image via oEmbed, wrap it in a link. props MarkJaquith, fixes #14945.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-11-18 02:17:13 +00:00
parent 0902043f6d
commit d397326116

View File

@ -242,7 +242,7 @@ class WP_oEmbed {
return false; return false;
$title = ( !empty($data->title) ) ? $data->title : ''; $title = ( !empty($data->title) ) ? $data->title : '';
$return = '<img src="' . esc_url( $data->url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->width) . '" height="' . esc_attr($data->height) . '" />'; $return = '<a href="' . esc_url( $url ) . '"><img src="' . esc_url( $data->url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->width) . '" height="' . esc_attr($data->height) . '" /></a>';
break; break;
case 'video': case 'video':