From 0c044ba8d978fed02c86cca6036879dc3cd75266 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Sun, 13 Nov 2016 16:38:06 +0000 Subject: [PATCH] Media: Clearly indicate that PDF thumbnails are just document previews. This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area. props folletto, helen. fixes #38717. git-svn-id: https://develop.svn.wordpress.org/trunk@39213 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/media.css | 6 +++++- src/wp-includes/media-template.php | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 72625bca34..65d396612c 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -769,13 +769,17 @@ border color while dragging a file over the uploader drop area */ .edit-attachment-frame .attachment-media-view .details-image { display: block; - margin-bottom: 16px; + margin: 0 auto 16px; max-width: 100%; max-height: 90%; max-height: -webkit-calc( 100% - 42px ); max-height: calc( 100% - 42px ); /* leave space for actions underneath */ } +.edit-attachment-frame .attachment-media-view .attachment-actions { + text-align: center; +} + .edit-attachment-frame .wp-media-wrapper { margin-bottom: 12px; } diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 95fbb9ab4b..f12b11cff3 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -325,6 +325,8 @@ function wp_print_media_templates() {
<# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #> + <# } else if ( 'pdf' === data.subtype && data.sizes ) { #> + <# } #>