Make WordPress Core


Ignore:
Timestamp:
03/29/2010 09:57:34 AM (14 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r13769 r13875  
    463463        if ( !empty($attachment['url']) ) {
    464464            $rel = '';
    465             if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) )
    466                 $rel = " rel='attachment wp-att-" . esc_attr($send_id)."'";
     465            if ( strpos($attachment['url'], 'attachment_id') || get_attachment_link($send_id) == $attachment['url'] )
     466                $rel = " rel='attachment wp-att-" . esc_attr($send_id) . "'";
    467467            $html = "<a href='{$attachment['url']}'$rel>$html</a>";
    468468        }
Note: See TracChangeset for help on using the changeset viewer.