Make WordPress Core

Changeset 16444


Ignore:
Timestamp:
11/18/2010 02:17:13 AM (13 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-oembed.php

    r15741 r16444  
    243243
    244244                $title = ( !empty($data->title) ) ? $data->title : '';
    245                 $return = '<img src="' . esc_url( $data->url ) . '" alt="' . esc_attr($title) . '" width="' . esc_attr($data->width) . '" height="' . esc_attr($data->height) . '" />';
     245                $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>';
    246246                break;
    247247
Note: See TracChangeset for help on using the changeset viewer.