From 92fc095456caf9f3a5ff9d4de620fa2fe4ca203c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 12 Feb 2008 04:47:31 +0000 Subject: [PATCH] Multimedia uploader styling from andy. see #5824 git-svn-id: https://develop.svn.wordpress.org/trunk@6795 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/css/media.css | 16 ++++++++++------ wp-admin/includes/media.php | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index 7313b91976..91530a30d8 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -139,14 +139,15 @@ span.filename { border-right: 3px solid #99d; } .multimedia-item .thumbnail { - + max-width: 128px; + max-height: 128px; } .multimedia-item .pinkynail { position: absolute; - top: 3px; - left: 3px; + top: 2px; + left: 2px; + height: 32px; max-width: 40px; - max-height: 40px; } .describe { display: none; @@ -166,9 +167,12 @@ span.filename { .describe label { padding-right: 1em; } - -a.delete { +p.delete { clear: both; + margin: 0; +} +p.delete a { + padding: 4px; } .describe-toggle-on, .describe-toggle-off { line-height: 36px; diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0a4effa009..0a91d3a81c 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -444,6 +444,8 @@ function get_multimedia_item( $attachment_id ) { $thumb_url = wp_get_attachment_thumb_url( $attachment_id ); if ( empty($thumb_url) ) $thumb_url = wp_mime_type_icon( $attachment_id ); + if ( empty($thumb_url) && ( $post =& get_post( $attachment_id ) ) && substr($post->post_mime_type, 0, 5) == 'image' ) + $thumb_url = wp_get_attachment_url( $attachment_id ); $title_label = __('Title'); $description_label = __('Description'); @@ -493,7 +495,7 @@ function get_multimedia_item( $attachment_id ) { $item .= " -

$delete

+

$delete

";