From 7725f13a7d681b94a59e3bed20ee48a36fb4aeb1 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 28 Mar 2008 03:53:05 +0000 Subject: [PATCH] do not add rel if link is not get_attachment_link. Props andy. fixes #6428 git-svn-id: https://develop.svn.wordpress.org/trunk@7557 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0f68d2394e..5803e3fea3 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -511,7 +511,9 @@ function image_media_send_to_editor($html, $attachment_id, $attachment) { else $size = 'medium'; - return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, true, $size); + $rel = ( $url == get_attachment_link($attachment_id) ); + + return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size); } return $html;