diff --git a/src/js/_enqueues/lib/image-edit.js b/src/js/_enqueues/lib/image-edit.js index 100f26e7e0..9c7c841eba 100644 --- a/src/js/_enqueues/lib/image-edit.js +++ b/src/js/_enqueues/lib/image-edit.js @@ -503,7 +503,7 @@ // If a response is returned, close the editor and show an error. if ( ret.error ) { - $('#imgedit-response-' + postid).html('

' + ret.error + '

'); + $('#imgedit-response-' + postid).html(''); imageEdit.close(postid); return; } @@ -517,7 +517,7 @@ } if ( ret.msg ) { - $('#imgedit-response-' + postid).html('

' + ret.msg + '

'); + $('#imgedit-response-' + postid).html(''); } if ( self._view ) { diff --git a/src/js/media/views/frame/select.js b/src/js/media/views/frame/select.js index 5cb4a5402d..fd5a8512d2 100644 --- a/src/js/media/views/frame/select.js +++ b/src/js/media/views/frame/select.js @@ -62,6 +62,8 @@ Select = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Select.prototype * Create the default states on the frame. */ createStates: function() { + console.log("test"); + this.on( 'content:render:edit-image', this.editState, this ); var options = this.options; if ( this.options.states ) { @@ -76,7 +78,8 @@ Select = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Select.prototype multiple: options.multiple, title: options.title, priority: 20 - }) + }), + new wp.media.controller.EditImage( { model: this.options.editImage } ), ]); }, diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index 81eb38a585..bfe2ac8347 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -655,6 +655,12 @@ form#tags-filter { margin-bottom: 20px; } +.wp_attachment_details .attachment-content-description { + margin-top: 0.5385em; + display: inline-block; + min-height: 1.6923em; +} + /* Suggested text for privacy policy */ .wp-privacy-policy-guide { max-width: 1000px; diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index b2b640de9e..e567807169 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -800,6 +800,11 @@ border color while dragging a file over the uploader drop area */ margin-bottom: 5px; } +.attachment-details .setting + .description a:focus { + /* Only visible in Windows High Contrast mode */ + outline: 1px solid transparent; +} + .wp_attachment_details .attachment-alt-text-description { margin-top: 5px; } @@ -1114,10 +1119,14 @@ span.imgedit-scale-warn { padding: 10px; } +.imgedit-settings .imgedit-original-dimensions { + display: inline-block; +} + .imgedit-settings .imgedit-scale input[type="text"], .imgedit-settings .imgedit-crop-ratio input[type="text"], .imgedit-settings .imgedit-crop-sel input[type="text"] { - width: 50px; + width: 80px; font-size: 14px; padding: 5px 8px; } @@ -1130,6 +1139,11 @@ span.imgedit-scale-warn { color: #444; } +.imgedit-settings .imgedit-scale-button-wrapper { + margin-top: 0.3077em; + display: block; +} + .imgedit-settings .imgedit-scale .button { margin-bottom: 0; } diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php index d474f8498b..39bc44975a 100644 --- a/src/wp-admin/includes/image-edit.php +++ b/src/wp-admin/includes/image-edit.php @@ -38,9 +38,9 @@ function wp_image_editor( $post_id, $msg = false ) { if ( $msg ) { if ( isset( $msg->error ) ) { - $note = "

$msg->error

"; + $note = ""; } elseif ( isset( $msg->msg ) ) { - $note = "

$msg->msg

"; + $note = ""; } } @@ -62,7 +62,7 @@ function wp_image_editor( $post_id, $msg = false ) { printf( /* translators: %s: Image width and height in pixels. */ __( 'Original dimensions %s' ), - $meta['width'] . ' × ' . $meta['height'] + '' . $meta['width'] . ' × ' . $meta['height'] . '' ); ?>

@@ -78,7 +78,7 @@ function wp_image_editor( $post_id, $msg = false ) { ! - , 'scale')" class="button button-primary" value="" /> +
, 'scale')" class="button button-primary" value="" />
@@ -235,7 +235,7 @@ function wp_image_editor( $post_id, $msg = false ) {
- +
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 61c4dac627..6987acb166 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -3207,7 +3207,7 @@ function edit_form_image_editor( $post ) { ?> -