diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php
index e9d59e2258..64514c64e5 100644
--- a/wp-admin/async-upload.php
+++ b/wp-admin/async-upload.php
@@ -37,12 +37,22 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
if ( ! current_user_can( $post_type_object->cap->edit_post, $id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
- if ( 2 == $_REQUEST['fetch'] ) {
- add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
- echo get_media_item($id, array( 'send' => false, 'delete' => true ));
- } else {
- add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
- echo get_media_item($id);
+ switch ( $_REQUEST['fetch'] ) {
+ case 3 :
+ if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) )
+ echo '';
+ echo '' . _x( 'Edit', 'media item' ) . '';
+ $title = $post->post_title ? $post->post_title : wp_basename( $post->guid ); // title shouldn't ever be empty, but use filename just in cas.e
+ echo '
' . esc_html( wp_html_excerpt( $title, 60 ) ) . '
';
+ break;
+ case 2 :
+ add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
+ echo get_media_item($id, array( 'send' => false, 'delete' => true ));
+ break;
+ default:
+ add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
+ echo get_media_item($id);
+ break;
}
exit;
}
diff --git a/wp-admin/css/wp-admin-rtl.css b/wp-admin/css/wp-admin-rtl.css
index 233705d9ed..a85a288560 100644
--- a/wp-admin/css/wp-admin-rtl.css
+++ b/wp-admin/css/wp-admin-rtl.css
@@ -1049,6 +1049,7 @@ span.description,
padding: 0 5px 0 0;
}
+.media-item .edit-attachment,
.media-item .error-div a.dismiss,
.describe-toggle-on,
.describe-toggle-off {
diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css
index 629c1294fc..ffb344fffb 100644
--- a/wp-admin/css/wp-admin.css
+++ b/wp-admin/css/wp-admin.css
@@ -3817,6 +3817,7 @@ abbr.required {
padding: 0 0 0 5px;
}
+.media-item .edit-attachment,
.describe-toggle-on,
.describe-toggle-off {
display: block;
@@ -3848,6 +3849,10 @@ abbr.required {
width: 623px;
}
+.media-new-php #media-items {
+ margin: 1em 0;
+}
+
#media-items:empty {
border: 0 none;
}
@@ -5533,10 +5538,10 @@ body.full-overlay-active {
margin: 0;
}
-.wp-full-overlay-sidebar .wp-full-overlay-header {
- border-top: 0;
- border-bottom: 1px solid #fff;
- box-shadow: inset 0 -1px 0 0px #dfdfdf;
+.wp-full-overlay-sidebar .wp-full-overlay-header {
+ border-top: 0;
+ border-bottom: 1px solid #fff;
+ box-shadow: inset 0 -1px 0 0px #dfdfdf;
}
.wp-full-overlay-sidebar .wp-full-overlay-footer {
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 45f408932e..b38e280fa5 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -1055,11 +1055,18 @@ function get_media_items( $post_id, $errors ) {
function get_media_item( $attachment_id, $args = null ) {
global $redir_tab;
+ echo "$toggle_on";
+
if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) )
$thumb_url = $thumb_url[0];
else
$thumb_url = false;
+ $display_title = ( !empty( $title ) ) ? $title : $filename; // $title shouldn't ever be empty, but just in case
+ $display_title = $show_title ? "" . wp_html_excerpt( $display_title, 60 ) . "
" : '';
+
+ echo "
";
+
$post = get_post( $attachment_id );
$current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0;
diff --git a/wp-admin/media-new.php b/wp-admin/media-new.php
index d3739e8099..356adc84de 100644
--- a/wp-admin/media-new.php
+++ b/wp-admin/media-new.php
@@ -90,7 +90,7 @@ if ( $_POST ) {
}
updateMediaForm();
post_id = 0;
- shortform = 1;
+ shortform = 3;
});
diff --git a/wp-includes/js/plupload/handlers.js b/wp-includes/js/plupload/handlers.js
index 0145ece649..e903f5709e 100644
--- a/wp-includes/js/plupload/handlers.js
+++ b/wp-includes/js/plupload/handlers.js
@@ -112,6 +112,8 @@ function setResize(arg) {
function prepareMediaItem(fileObj, serverData) {
var f = ( typeof shortform == 'undefined' ) ? 1 : 2, item = jQuery('#media-item-' + fileObj.id);
+ if ( f == 2 && shortform > 2 )
+ f = shortform;
try {
if ( typeof topWin.tb_remove != 'undefined' )
@@ -429,7 +431,7 @@ jQuery(document).ready(function($){
$('#drag-drop-area').unbind('.wp-uploader');
}
- if ( up.runtime == 'html4' )
+ if ( up.runtime == 'html4' )
$('.upload-flash-bypass').hide();
});