When inserting an image via oEmbed, wrap it in a link. props MarkJaquith, fixes #14945.
git-svn-id: https://develop.svn.wordpress.org/trunk@16444 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1612e23e86
commit
892760ad7a
@ -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':
|
||||||
|
Loading…
Reference in New Issue
Block a user