mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Media: improve flows for cropping on attachment details screen.
On the "Attachment Details" screen: * The crop button is always 'enabled'. * Clicking the crop button with no selection selects the entire image. * Clicking the crop button with the entire image selected doesn't do anything. * Clicking the crop button with a selection crops as expected. Props sonjanyc, afercia, mikeschroder. Fixes #30155. git-svn-id: https://develop.svn.wordpress.org/trunk@42404 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -190,7 +190,7 @@ function wp_image_editor( $post_id, $msg = false ) {
|
||||
<div class="imgedit-panel-content wp-clearfix">
|
||||
<?php echo $note; ?>
|
||||
<div class="imgedit-menu wp-clearfix">
|
||||
<button type="button" onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-crop button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Crop' ); ?></span></button>
|
||||
<button type="button" onclick="imageEdit.handleCropToolClick( <?php echo "$post_id, '$nonce'"; ?>, this )" class="imgedit-crop button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Crop' ); ?></span></button>
|
||||
<?php
|
||||
|
||||
// On some setups GD library does not provide imagerotate() - Ticket #11536
|
||||
|
||||
Reference in New Issue
Block a user