From 0da34463e73efe8388b62ab941e973f0706a7b5a Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sat, 6 Mar 2010 08:00:42 +0000 Subject: [PATCH] Display an Attachment Icon if an Attachment thumbnail is not available. Fixes display of Upload edit fields. Fixes #12328 git-svn-id: https://develop.svn.wordpress.org/trunk@13600 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index f3e52d4018..1935caba4d 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1148,10 +1148,10 @@ function get_media_items( $post_id, $errors ) { function get_media_item( $attachment_id, $args = null ) { global $redir_tab; - if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id ) ) + if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) ) $thumb_url = $thumb_url[0]; else - return false; + $thumb_url = false; $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true ); $args = wp_parse_args( $args, $default_args ); @@ -1474,7 +1474,7 @@ SWFUpload.onload = function() {
- +

@@ -2034,11 +2034,11 @@ function type_url_form_image() { - + - + - + @@ -2049,15 +2049,15 @@ function type_url_form_image() {
- - + +

' . __('Enter a link URL or click above for presets.') . '

- +