diff --git src/wp-admin/includes/media.php src/wp-admin/includes/media.php
index d9dd1e6..5b04b7c0 100644
|
|
|
function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re |
| 121 | 121 | |
| 122 | 122 | $html = get_image_tag($id, $alt, '', $align, $size); |
| 123 | 123 | |
| 124 | | if ( ! $rel ) { |
| 125 | | $rel = ' rel="attachment wp-att-' . esc_attr( $id ) . '"'; |
| 126 | | } else { |
| 127 | | $rel = ' rel="' . esc_attr( $rel ) . '"'; |
| 128 | | } |
| | 124 | $rel = $rel ? ' rel="' . esc_attr( $rel ) . '"' : ''; |
| 129 | 125 | |
| 130 | 126 | if ( $url ) |
| 131 | 127 | $html = '<a href="' . esc_attr($url) . "\"$rel>$html</a>"; |
| … |
… |
function image_media_send_to_editor($html, $attachment_id, $attachment) { |
| 1166 | 1162 | $align = !empty($attachment['align']) ? $attachment['align'] : 'none'; |
| 1167 | 1163 | $size = !empty($attachment['image-size']) ? $attachment['image-size'] : 'medium'; |
| 1168 | 1164 | $alt = !empty($attachment['image_alt']) ? $attachment['image_alt'] : ''; |
| 1169 | | $rel = ( $url == get_attachment_link($attachment_id) ); |
| | 1165 | $rel = ''; |
| | 1166 | if ( strpos( $url, 'attachment_id') || $url == get_attachment_link($attachment_id) ) { |
| | 1167 | $rel = 'attachment wp-att-' . $id; |
| | 1168 | } |
| 1170 | 1169 | |
| 1171 | 1170 | return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size, $alt); |
| 1172 | 1171 | } |