Media: Revert [46354] preventing bad clipping of text in image details page.

See #47115.

Built from https://develop.svn.wordpress.org/trunk@46355


git-svn-id: http://core.svn.wordpress.org/trunk@46154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
antpb
2019-09-30 17:12:59 +00:00
parent 7c8028febf
commit 247e7eb7d5
19 changed files with 25 additions and 68 deletions

View File

@@ -38,9 +38,9 @@ function wp_image_editor( $post_id, $msg = false ) {
if ( $msg ) {
if ( isset( $msg->error ) ) {
$note = "<div class='error' tabindex='-1' role='alert'><p>$msg->error</p></div>";
$note = "<div class='error'><p>$msg->error</p></div>";
} elseif ( isset( $msg->msg ) ) {
$note = "<div class='updated' tabindex='-1' role='alert'><p>$msg->msg</p></div>";
$note = "<div class='updated'><p>$msg->msg</p></div>";
}
}
@@ -62,7 +62,7 @@ function wp_image_editor( $post_id, $msg = false ) {
printf(
/* translators: %s: Image width and height in pixels. */
__( 'Original dimensions %s' ),
'<span class="imgedit-original-dimensions">' . $meta['width'] . ' &times; ' . $meta['height'] . '</span>'
$meta['width'] . ' &times; ' . $meta['height']
);
?>
</p>
@@ -78,7 +78,7 @@ function wp_image_editor( $post_id, $msg = false ) {
<label for="imgedit-scale-height-<?php echo $post_id; ?>" class="screen-reader-text"><?php _e( 'scale height' ); ?></label>
<input type="text" id="imgedit-scale-height-<?php echo $post_id; ?>" onkeyup="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" onblur="imageEdit.scaleChanged(<?php echo $post_id; ?>, 0, this)" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
<span class="imgedit-scale-warn" id="imgedit-scale-warn-<?php echo $post_id; ?>">!</span>
<div class="imgedit-scale-button-wrapper"><input id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" /></div>
<input id="imgedit-scale-button" type="button" onclick="imageEdit.action(<?php echo "$post_id, '$nonce'"; ?>, 'scale')" class="button button-primary" value="<?php esc_attr_e( 'Scale' ); ?>" />
</div>
</fieldset>
@@ -235,7 +235,7 @@ function wp_image_editor( $post_id, $msg = false ) {
<input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
<div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
<img id="image-preview-<?php echo $post_id; ?>" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand( 1, 99999 ); ?>" alt="" />
<img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand( 1, 99999 ); ?>" alt="" />
</div>
<div class="imgedit-submit">

View File

@@ -3207,7 +3207,7 @@ function edit_form_image_editor( $post ) {
?>
<label for="attachment_content" class="attachment-content-description"><strong><?php _e( 'Description' ); ?></strong>
<label for="attachment_content"><strong><?php _e( 'Description' ); ?></strong>
<?php
if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {