Skip to content

Commit fa0969d

Browse files
committed
Coding Standards: Remove unused variable el in monitorPopup.
Remove an unused variable to resolves coding standards failure. Follow up to [56651]. Props joedolson. See #58756. git-svn-id: https://develop.svn.wordpress.org/trunk@56653 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ad4a7b8 commit fa0969d

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/js/_enqueues/lib/image-edit.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@
255255
*
256256
* @return {boolean} Always returns false.
257257
*/
258-
monitorPopup : function(el) {
259-
var $el = $( el );
258+
monitorPopup : function() {
260259
var $parent = document.querySelector( '.imgedit-rotate-menu-container' );
261260
var $toggle = document.querySelector( '.imgedit-rotate-menu-container .imgedit-rotate' );
262261

src/wp-admin/includes/image-edit.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function wp_image_editor( $post_id, $msg = false ) {
6363
<button type="button" onclick="imageEdit.toggleCropTool( <?php echo "$post_id, '$nonce'"; ?>, this );" aria-expanded="false" aria-controls="imgedit-crop" class="imgedit-crop button disabled" disabled><?php esc_html_e( 'Crop' ); ?></button>
6464
<button type="button" class="imgedit-scale button" onclick="imageEdit.toggleControls(this);" aria-expanded="false" aria-controls="imgedit-scale"><?php esc_html_e( 'Scale' ); ?></button>
6565
<div class="imgedit-rotate-menu-container">
66-
<button type="button" aria-controls="imgedit-rotate-menu" class="imgedit-rotate button" aria-expanded="false" onclick="imageEdit.togglePopup(this)" onblur="imageEdit.monitorPopup(this)"><?php esc_html_e( 'Image Rotation' ); ?></button>
66+
<button type="button" aria-controls="imgedit-rotate-menu" class="imgedit-rotate button" aria-expanded="false" onclick="imageEdit.togglePopup(this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Image Rotation' ); ?></button>
6767
<div id="imgedit-rotate-menu" class="imgedit-popup-menu">
6868
<?php
6969
// On some setups GD library does not provide imagerotate() - Ticket #11536.
@@ -75,9 +75,9 @@ function wp_image_editor( $post_id, $msg = false ) {
7575
) ) {
7676
$note_no_rotate = '';
7777
?>
78-
<button type="button" class="imgedit-rleft button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup(this)"><?php esc_html_e( 'Rotate 90&deg; left' ); ?></button>
79-
<button type="button" class="imgedit-rright button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup(this)"><?php esc_html_e( 'Rotate 90&deg; right' ); ?></button>
80-
<button type="button" class="imgedit-rfull button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(180, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup(this)"><?php esc_html_e( 'Rotate 180&deg;' ); ?></button>
78+
<button type="button" class="imgedit-rleft button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 90&deg; left' ); ?></button>
79+
<button type="button" class="imgedit-rright button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 90&deg; right' ); ?></button>
80+
<button type="button" class="imgedit-rfull button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(180, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 180&deg;' ); ?></button>
8181
<?php
8282
} else {
8383
$note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>';
@@ -88,8 +88,8 @@ function wp_image_editor( $post_id, $msg = false ) {
8888
}
8989
?>
9090
<hr />
91-
<button type="button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup(this)" class="imgedit-flipv button"><?php esc_html_e( 'Flip vertical' ); ?></button>
92-
<button type="button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup(this)" class="imgedit-fliph button"><?php esc_html_e( 'Flip horizontal' ); ?></button>
91+
<button type="button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()" class="imgedit-flipv button"><?php esc_html_e( 'Flip vertical' ); ?></button>
92+
<button type="button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()" class="imgedit-fliph button"><?php esc_html_e( 'Flip horizontal' ); ?></button>
9393
<?php echo $note_no_rotate; ?>
9494
</div>
9595
</div>

0 commit comments

Comments
 (0)