Make WordPress Core

Ticket #11536: 11536.3.patch

File 11536.3.patch, 1.9 KB (added by hakre, 15 years ago)

Streamlined husky's patch and fixed a typo

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

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    3939        <div class="imgedit-menu">
    4040                <div onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-crop disabled" title="<?php esc_attr_e( 'Crop' ); ?>"></div><?php
    4141
    42         if ( function_exists('imagerotate') ) { ?>
     42        // On some setups GD library does not provide imagerotate() - Ticket #11536   
     43        if (function_exists('imagerotate') ) : ?>
     44                <div class="imgedit-rleft"  onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate counter-clockwise' ); ?>"></div>
     45                <div class="imgedit-rright" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate clockwise' ); ?>"></div>
     46<?php else :
     47                $note_gdlib = esc_attr__('Image rotation is not supported on your webhost [GDlib imagerotate() is missing]');
     48?>
     49            <div class="imgedit-rleft disabled"  title="<?php echo( $note_gdlib ); ?>"></div>
     50            <div class="imgedit-rright disabled" title="<?php echo( $note_gdlib ); ?>"></div>
     51<?php endif; ?>
    4352
    44                 <div onclick="imageEdit.rotate(90, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-rleft" title="<?php esc_attr_e( 'Rotate counter-clockwise' ); ?>"></div>
    45                 <div onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-rright" title="<?php esc_attr_e( 'Rotate clockwise' ); ?>"></div><?php
    4653
    47         } ?>
    48 
    4954                <div onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-flipv" title="<?php esc_attr_e( 'Flip vertically' ); ?>"></div>
    5055                <div onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-fliph" title="<?php esc_attr_e( 'Flip horizontally' ); ?>"></div>
    5156