Make WordPress Core

Ticket #50523: 50523.diff

File 50523.diff, 4.9 KB (added by joedolson, 4 years ago)

Refresh patch from @nrqsnchz

  • src/wp-admin/css/media.css

     
    982982        float: left;
    983983}
    984984
    985 .imgedit-menu {
    986         margin: 0 0 12px;
    987 }
    988 
    989985.imgedit-menu .note-no-rotate {
    990986        clear: both;
    991987        margin: 0;
     
    993989}
    994990
    995991.image-editor .imgedit-menu .button {
    996         display: inline-block;
     992        display: block;
    997993        width: auto;
    998         min-height: 28px;
    999         font-size: 13px;
     994        height: 28px;
    1000995        line-height: 2;
    1001996        margin: 0 8px 8px 0;
    1002997        padding: 0 10px;
     998        background: #f7f7f7;
    1003999}
    10041000
     1001.imgedit-menu .button:first-of-type {
     1002        margin-top: 10px;
     1003}
     1004
    10051005.imgedit-menu .button:before {
    10061006        font: normal 16px/1 dashicons;
    10071007        margin-right: 8px;
    1008         speak: never;
     1008        position: relative;
     1009        top: -1px;
    10091010        vertical-align: middle;
    1010         position: relative;
    1011         top: -2px;
    1012         -webkit-font-smoothing: antialiased;
    1013         -moz-osx-font-smoothing: grayscale;
    10141011}
    10151012
    10161013.imgedit-menu .button.disabled {
  • src/wp-admin/includes/image-edit.php

     
    5050
    5151        <div class="imgedit-panel-content wp-clearfix">
    5252                <?php echo $note; ?>
    53                 <div class="imgedit-menu wp-clearfix">
     53
     54                <input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" />
     55                <input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" />
     56                <input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" />
     57                <input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" />
     58                <input type="hidden" id="imgedit-x-<?php echo $post_id; ?>" value="<?php echo isset( $meta['width'] ) ? $meta['width'] : 0; ?>" />
     59                <input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
     60
     61                <div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
     62                <img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')"
     63                        src="<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ) . '?action=imgedit-preview&amp;_ajax_nonce=' . $nonce . '&amp;postid=' . $post_id . '&amp;rand=' . rand( 1, 99999 ); ?>" alt="" />
     64                </div>
     65
     66                <div class="imgedit-submit">
     67                        <input type="button" onclick="imageEdit.close(<?php echo $post_id; ?>, 1)" class="button imgedit-cancel-btn" value="<?php esc_attr_e( 'Cancel' ); ?>" />
     68                        <input type="button" onclick="imageEdit.save(<?php echo "$post_id, '$nonce'"; ?>)" disabled="disabled" class="button button-primary imgedit-submit-btn" value="<?php esc_attr_e( 'Save' ); ?>" />
     69                </div>
     70        </div>
     71
     72        <div class="imgedit-settings">
     73        <div class="imgedit-group">
     74                <div class="imgedit-group-top imgedit-menu">
     75                        <h2><?php _e( 'Editing Tools' ); ?></h2>
    5476                        <button type="button" onclick="imageEdit.handleCropToolClick( <?php echo "$post_id, '$nonce'"; ?>, this )" class="imgedit-crop button disabled" disabled><?php esc_html_e( 'Crop' ); ?></button>
    5577                        <?php
    5678
     
    81103                        <button type="button" id="image-redo-<?php echo $post_id; ?>" onclick="imageEdit.redo(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-redo button disabled" disabled><?php esc_html_e( 'Redo' ); ?></button>
    82104                        <?php echo $note_no_rotate; ?>
    83105                </div>
    84 
    85                 <input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" />
    86                 <input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" />
    87                 <input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" />
    88                 <input type="hidden" id="imgedit-selection-<?php echo $post_id; ?>" value="" />
    89                 <input type="hidden" id="imgedit-x-<?php echo $post_id; ?>" value="<?php echo isset( $meta['width'] ) ? $meta['width'] : 0; ?>" />
    90                 <input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
    91 
    92                 <div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
    93                 <img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')"
    94                         src="<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ) . '?action=imgedit-preview&amp;_ajax_nonce=' . $nonce . '&amp;postid=' . $post_id . '&amp;rand=' . rand( 1, 99999 ); ?>" alt="" />
    95                 </div>
    96 
    97                 <div class="imgedit-submit">
    98                         <input type="button" onclick="imageEdit.close(<?php echo $post_id; ?>, 1)" class="button imgedit-cancel-btn" value="<?php esc_attr_e( 'Cancel' ); ?>" />
    99                         <input type="button" onclick="imageEdit.save(<?php echo "$post_id, '$nonce'"; ?>)" disabled="disabled" class="button button-primary imgedit-submit-btn" value="<?php esc_attr_e( 'Save' ); ?>" />
    100                 </div>
    101106        </div>
    102107
    103         <div class="imgedit-settings">
    104108        <div class="imgedit-group">
    105109        <div class="imgedit-group-top">
    106110                <h2><?php _e( 'Scale Image' ); ?></h2>