<div class="imgedit-panel-content imgedit-panel-tools wp-clearfix">
<div class="imgedit-menu wp-clearfix">
<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>
<button type="button" class="imgedit-scale button" onclick="imageEdit.toggleControls(this);" aria-expanded="false" aria-controls="imgedit-scale"><?php
esc_html_e( 'Scale'
); ?></button>
<div class="imgedit-rotate-menu-container">
<button type="button" aria-controls="imgedit-rotate-menu" class="imgedit-rotate button" aria-expanded="false" onclick="imageEdit.togglePopup(this)"><?php
esc_html_e( 'Image Rotation'
); ?></button>
<div id="imgedit-rotate-menu" class="imgedit-popup-menu">
<?php
// On some setups GD library does not provide imagerotate() - Ticket #11536.
if ( wp_image_editor_supports( array
( 'mime_type' =>
get_post_mime_type( $post_id ),
'methods' => array
( 'rotate'
),
) ) ) { $note_no_rotate = '';
?>
<button type="button" class="imgedit-rleft button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate( 90, <?php
echo "
$post_id, '
$nonce'"; ?>, this)"><?php
esc_html_e( 'Rotate 90° left'
); ?></button>
<button type="button" class="imgedit-rright button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(-90, <?php
echo "
$post_id, '
$nonce'"; ?>, this)"><?php
esc_html_e( 'Rotate 90° right'
); ?></button>
<button type="button" class="imgedit-rfull button" onkeyup="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(180, <?php
echo "
$post_id, '
$nonce'"; ?>, this)"><?php
esc_html_e( 'Rotate 180°'
); ?></button>
<?php
} else { $note_no_rotate = '<p class="note-no-rotate"><em>' .
__( 'Image rotation is not supported by your web host.'
) . '</em></p>';