From ac17007b10fff24f01b7d1e77e0a05722194ce3d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 21 Jul 2014 19:09:44 +0000 Subject: [PATCH] Remove requirement for a minimum image size in the image editor. props ericlewis, solarissmoke. fixes #11325. git-svn-id: https://develop.svn.wordpress.org/trunk@29259 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/image-edit.php | 1 - src/wp-admin/js/image-edit.js | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php index 00feff4da9..99a188e638 100644 --- a/src/wp-admin/includes/image-edit.php +++ b/src/wp-admin/includes/image-edit.php @@ -170,7 +170,6 @@ function wp_image_editor($post_id, $msg = false) { - diff --git a/src/wp-admin/js/image-edit.js b/src/wp-admin/js/image-edit.js index 7a63ecdc62..991bbf2a03 100644 --- a/src/wp-admin/js/image-edit.js +++ b/src/wp-admin/js/image-edit.js @@ -385,9 +385,8 @@ var imageEdit = window.imageEdit = { }, setCropSelection : function(postid, c) { - var sel, min = $('#imgedit-minthumb-' + postid).val() || '128:128', + var sel, sizer = this.hold.sizer; - min = min.split(':'); c = c || 0; if ( !c || ( c.width < 3 && c.height < 3 ) ) { @@ -399,12 +398,6 @@ var imageEdit = window.imageEdit = { return false; } - if ( c.width < (min[0] * sizer) && c.height < (min[1] * sizer) ) { - this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 0); - $('#imgedit-selection-' + postid).val(''); - return false; - } - sel = { 'x': c.x1, 'y': c.y1, 'w': c.width, 'h': c.height }; this.setDisabled($('.imgedit-crop', '#imgedit-panel-' + postid), 1); $('#imgedit-selection-' + postid).val( JSON.stringify(sel) );