Make WordPress Core

Changeset 29259


Ignore:
Timestamp:
07/21/2014 07:09:44 PM (12 years ago)
Author:
SergeyBiryukov
Message:

Remove requirement for a minimum image size in the image editor.

props ericlewis, solarissmoke.
fixes #11325.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image-edit.php

    r29206 r29259  
    171171
    172172                <input type="hidden" id="imgedit-sizer-<?php echo $post_id; ?>" value="<?php echo $sizer; ?>" />
    173                 <input type="hidden" id="imgedit-minthumb-<?php echo $post_id; ?>" value="<?php echo ( get_option('thumbnail_size_w') . ':' . get_option('thumbnail_size_h') ); ?>" />
    174173                <input type="hidden" id="imgedit-history-<?php echo $post_id; ?>" value="" />
    175174                <input type="hidden" id="imgedit-undone-<?php echo $post_id; ?>" value="0" />
  • trunk/src/wp-admin/js/image-edit.js

    r28639 r29259  
    386386
    387387        setCropSelection : function(postid, c) {
    388                 var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128',
     388                var sel,
    389389                        sizer = this.hold.sizer;
    390                         min = min.split(':');
    391390                        c = c || 0;
    392391
     
    396395                        $('#imgedit-sel-width-' + postid).val('');
    397396                        $('#imgedit-sel-height-' + postid).val('');
    398                         $('#imgedit-selection-' + postid).val('');
    399                         return false;
    400                 }
    401 
    402                 if ( c.width < (min[0] * sizer) && c.height < (min[1] * sizer) ) {
    403                         this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0);
    404397                        $('#imgedit-selection-' + postid).val('');
    405398                        return false;
Note: See TracChangeset for help on using the changeset viewer.