Changeset 7466 for trunk/wp-admin/includes/media.php
- Timestamp:
- 03/21/2008 11:21:27 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r7446 r7466 51 51 function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') { 52 52 53 $html = get_image_tag($id, $alt, $title, $align, $ rel, $size);53 $html = get_image_tag($id, $alt, $title, $align, $size); 54 54 55 55 $rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : ''; … … 247 247 $attachment = $_POST['attachments'][$send_id]; 248 248 $html = $attachment['post_title']; 249 if ( !empty($attachment['url']) ) 250 $html = "<a href='{$attachment['url']}'>$html</a>"; 249 if ( !empty($attachment['url']) ) { 250 if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) ) 251 $rel = " rel='attachment wp-att-".attribute_escape($send_id)."'"; 252 $html = "<a href='{$attachment['url']}'$rel>$html</a>"; 253 } 251 254 $html = apply_filters('media_send_to_editor', $html, $send_id, $attachment); 252 255 return media_send_to_editor($html); … … 528 531 $size = 'medium'; 529 532 530 return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size);533 return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, true, $size); 531 534 } 532 535
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)