Do not add rel="attachment" for direct(File URL, not Post URL) links to non-media files in "Insert into Post". Fixes #7040

git-svn-id: http://svn.automattic.com/wordpress/trunk@13875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-03-29 09:57:34 +00:00
parent 1c0c3bdbc2
commit 949d9a0362
1 changed files with 2 additions and 2 deletions

View File

@ -462,8 +462,8 @@ function media_upload_form_handler() {
$html = $attachment['post_title']; $html = $attachment['post_title'];
if ( !empty($attachment['url']) ) { if ( !empty($attachment['url']) ) {
$rel = ''; $rel = '';
if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) ) if ( strpos($attachment['url'], 'attachment_id') || get_attachment_link($send_id) == $attachment['url'] )
$rel = " rel='attachment wp-att-" . esc_attr($send_id)."'"; $rel = " rel='attachment wp-att-" . esc_attr($send_id) . "'";
$html = "<a href='{$attachment['url']}'$rel>$html</a>"; $html = "<a href='{$attachment['url']}'$rel>$html</a>";
} }