pretty delete animation, fix squashed icons and use 80x60 thumbs, add rel attrs to attachment links inserted from uploader. Props andy. see #5911

git-svn-id: https://develop.svn.wordpress.org/trunk@7466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-21 23:21:27 +00:00
parent db66d57993
commit e2145503bf
5 changed files with 18 additions and 12 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
case 'icon':
?>
<td class="media-icon"><?php echo wp_get_attachment_link($post->ID, array(60, 40), false, true); ?></td>
<td class="media-icon"><?php echo wp_get_attachment_link($post->ID, array(80, 60), false, true); ?></td>
<?php
// TODO
break;
+7 -4
View File
@@ -50,7 +50,7 @@ function the_media_upload_tabs() {
function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') {
$html = get_image_tag($id, $alt, $title, $align, $rel, $size);
$html = get_image_tag($id, $alt, $title, $align, $size);
$rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';
@@ -246,8 +246,11 @@ function media_upload_form_handler() {
$send_id = (int) array_shift($keys);
$attachment = $_POST['attachments'][$send_id];
$html = $attachment['post_title'];
if ( !empty($attachment['url']) )
$html = "<a href='{$attachment['url']}'>$html</a>";
if ( !empty($attachment['url']) ) {
if ( strpos($attachment['url'], 'attachment_id') || false !== strpos($attachment['url'], get_permalink($_POST['post_id'])) )
$rel = " rel='attachment wp-att-".attribute_escape($send_id)."'";
$html = "<a href='{$attachment['url']}'$rel>$html</a>";
}
$html = apply_filters('media_send_to_editor', $html, $send_id, $attachment);
return media_send_to_editor($html);
}
@@ -527,7 +530,7 @@ 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, $rel, $size);
return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, true, $size);
}
return $html;
+2 -2
View File
@@ -502,8 +502,8 @@ td.media-icon {
}
td.media-icon img {
max-width: 60px;
max-height: 40px;
max-width: 80px;
max-height: 60px;
}
#update-nag, .plugin-update {