From fa747f15750c728eec8c5424d442b6452ac5c1de Mon Sep 17 00:00:00 2001
From: Django Doucet <doucet.django@uqam.ca>
Date: Mon, 14 Aug 2017 14:12:38 -0400
Subject: [PATCH] git svn patch for wp core
diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php
index db11b56..07c2845 100755
|
a
|
b
|
function wp_image_editor($post_id, $msg = false) {
|
| 182 | 182 | <div class="imgedit-panel-content wp-clearfix"> |
| 183 | 183 | <?php echo $note; ?> |
| 184 | 184 | <div class="imgedit-menu wp-clearfix"> |
| 185 | | <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><?php |
| | 185 | <button type="button" onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_html_e( 'Crop' ); ?>" class="imgedit-crop button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Crop' ); ?></span></button><?php |
| 186 | 186 | |
| 187 | 187 | // On some setups GD library does not provide imagerotate() - Ticket #11536 |
| 188 | 188 | if ( wp_image_editor_supports( array( 'mime_type' => get_post_mime_type( $post_id ), 'methods' => array( 'rotate' ) ) ) ) { |
| 189 | 189 | $note_no_rotate = ''; |
| 190 | 190 | ?> |
| 191 | | <button type="button" class="imgedit-rleft button" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate counter-clockwise' ); ?></span></button> |
| 192 | | <button type="button" class="imgedit-rright button" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate clockwise' ); ?></span></button> |
| | 191 | <button type="button" class="imgedit-rleft button" title="<?php esc_html_e( 'Rotate counter-clockwise' ); ?>" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate counter-clockwise' ); ?></span></button> |
| | 192 | <button type="button" class="imgedit-rright button" title="<?php esc_html_e( 'Rotate clockwise' ); ?>" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate clockwise' ); ?></span></button> |
| 193 | 193 | <?php } else { |
| 194 | 194 | $note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>'; |
| 195 | 195 | ?> |
| … |
… |
function wp_image_editor($post_id, $msg = false) {
|
| 197 | 197 | <button type="button" class="imgedit-rright button disabled" disabled></button> |
| 198 | 198 | <?php } ?> |
| 199 | 199 | |
| 200 | | <button type="button" onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-flipv button"><span class="screen-reader-text"><?php esc_html_e( 'Flip vertically' ); ?></span></button> |
| 201 | | <button type="button" onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-fliph button"><span class="screen-reader-text"><?php esc_html_e( 'Flip horizontally' ); ?></span></button> |
| | 200 | <button type="button" onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-flipv button" title="<?php esc_html_e( 'Flip vertically' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Flip vertically' ); ?></span></button> |
| | 201 | <button type="button" onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-fliph button" title="<?php esc_html_e( 'Flip horizontally' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Flip horizontally' ); ?></span></button> |
| 202 | 202 | |
| 203 | | <button type="button" id="image-undo-<?php echo $post_id; ?>" onclick="imageEdit.undo(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-undo button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Undo' ); ?></span></button> |
| 204 | | <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><span class="screen-reader-text"><?php esc_html_e( 'Redo' ); ?></span></button> |
| | 203 | <button type="button" id="image-undo-<?php echo $post_id; ?>" onclick="imageEdit.undo(<?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_html_e( 'Undo' ); ?>" class="imgedit-undo button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Undo' ); ?></span></button> |
| | 204 | <button type="button" id="image-redo-<?php echo $post_id; ?>" onclick="imageEdit.redo(<?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_html_e( 'Redo' ); ?>" class="imgedit-redo button disabled" disabled><span class="screen-reader-text"><?php esc_html_e( 'Redo' ); ?></span></button> |
| 205 | 205 | <?php echo $note_no_rotate; ?> |
| 206 | 206 | </div> |
| 207 | 207 | |