Manual Image Crop - Version 1.12

Version Description

  • Fixed 'streched images' issue
Download this release

Release Info

Developer tomasz.sita
Plugin Icon 128x128 Manual Image Crop
Version 1.12
Comparing to
See all releases

Code changes from version 1.11 to 1.12

Files changed (3) hide show
  1. lib/ManualImageCrop.php +9 -9
  2. manual-image-crop.php +2 -2
  3. readme.txt +18 -12
lib/ManualImageCrop.php CHANGED
@@ -143,30 +143,30 @@ class ManualImageCrop {
143
 
144
  private function filterPostData() {
145
  $imageSizes = get_intermediate_image_sizes();
146
-
147
  $data = array(
148
  'attachmentId' => filter_var($_POST['attachmentId'], FILTER_SANITIZE_NUMBER_INT),
149
  'editedSize' => in_array($_POST['editedSize'], $imageSizes) ? $_POST['editedSize'] : null,
150
  'select' => array(
151
- 'x' => filter_var($_POST['select']['x'], FILTER_SANITIZE_NUMBER_INT),
152
- 'y' => filter_var($_POST['select']['y'], FILTER_SANITIZE_NUMBER_INT),
153
- 'w' => filter_var($_POST['select']['w'], FILTER_SANITIZE_NUMBER_INT),
154
- 'h' => filter_var($_POST['select']['h'], FILTER_SANITIZE_NUMBER_INT),
155
  ),
156
  'previewScale' => filter_var($_POST['previewScale'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)
157
-
158
  );
159
-
160
  if (isset($_POST['mic_quality'])) {
161
  $data['mic_quality'] = filter_var($_POST['mic_quality'], FILTER_SANITIZE_NUMBER_INT);
162
  } else {
163
  $data['mic_quality'] = 60;
164
  }
165
-
166
  if (isset($_POST['make2x'])) {
167
  $data['make2x'] = filter_var($_POST['make2x'], FILTER_VALIDATE_BOOLEAN);
168
  }
169
-
170
  return $data;
171
  }
172
 
143
 
144
  private function filterPostData() {
145
  $imageSizes = get_intermediate_image_sizes();
146
+
147
  $data = array(
148
  'attachmentId' => filter_var($_POST['attachmentId'], FILTER_SANITIZE_NUMBER_INT),
149
  'editedSize' => in_array($_POST['editedSize'], $imageSizes) ? $_POST['editedSize'] : null,
150
  'select' => array(
151
+ 'x' => filter_var($_POST['select']['x'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION),
152
+ 'y' => filter_var($_POST['select']['y'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION),
153
+ 'w' => filter_var($_POST['select']['w'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION),
154
+ 'h' => filter_var($_POST['select']['h'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION),
155
  ),
156
  'previewScale' => filter_var($_POST['previewScale'], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)
157
+
158
  );
159
+
160
  if (isset($_POST['mic_quality'])) {
161
  $data['mic_quality'] = filter_var($_POST['mic_quality'], FILTER_SANITIZE_NUMBER_INT);
162
  } else {
163
  $data['mic_quality'] = 60;
164
  }
165
+
166
  if (isset($_POST['make2x'])) {
167
  $data['make2x'] = filter_var($_POST['make2x'], FILTER_VALIDATE_BOOLEAN);
168
  }
169
+
170
  return $data;
171
  }
172
 
manual-image-crop.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Manual Image Crop
4
  Plugin URI: https://github.com/tomaszsita/wp-manual-image-crop
5
  Description: Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image). Simply click on the "Crop" link next to any image in your media library and select the area of the image you want to crop.
6
- Version: 1.11
7
  Author: Tomasz Sita
8
  Author URI: https://github.com/tomaszsita
9
  License: GPL2
@@ -11,7 +11,7 @@ Text Domain: microp
11
  Domain Path: /languages/
12
  */
13
 
14
- define('mic_VERSION', '1.11');
15
 
16
  include_once(dirname(__FILE__) . '/lib/ManualImageCropSettingsPage.php');
17
 
3
  Plugin Name: Manual Image Crop
4
  Plugin URI: https://github.com/tomaszsita/wp-manual-image-crop
5
  Description: Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image). Simply click on the "Crop" link next to any image in your media library and select the area of the image you want to crop.
6
+ Version: 1.12
7
  Author: Tomasz Sita
8
  Author URI: https://github.com/tomaszsita
9
  License: GPL2
11
  Domain Path: /languages/
12
  */
13
 
14
+ define('mic_VERSION', '1.12');
15
 
16
  include_once(dirname(__FILE__) . '/lib/ManualImageCropSettingsPage.php');
17
 
readme.txt CHANGED
@@ -6,11 +6,10 @@ Requires at least: 3.5
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WB5ZQWGUM7T96
9
- Stable tag: 1.11
10
 
11
  Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image).
12
 
13
-
14
  == Description ==
15
  Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image).
16
  Simply click on the "Crop" link next to any image in your media library.
@@ -21,10 +20,15 @@ Apart from media library list, the plugin adds links in few more places:
21
  * Below featured image box ("Crop featured image")
22
  * In the media insert modal window (once you select an image)
23
 
24
- GitHub Repository:
 
 
 
 
 
25
  https://github.com/tomaszsita/wp-manual-image-crop
26
 
27
- Translations:
28
  * Dutch (Bernardo Hulsman)
29
  * French (Gabriel Féron)
30
  * German (Bertram Greenhough)
@@ -37,18 +41,20 @@ Translations:
37
 
38
  Please contact me if you want to add a translation (or submit a pull request on GitHub)
39
 
40
-
41
  == Installation ==
42
- Manually:
43
- * Upload `manual-image-crop` to the `/wp-content/plugins/` directory
44
- * Activate the plugin through the 'Plugins' menu in WordPress
45
 
46
- Automatically:
47
- * Navigate to the 'Plugins' menu inside of the wordpress wp-admin dashboard, and select AD NEW
48
- * Search for 'Manual Imag Crop', and click install
49
- * When the plugin has been installed, Click 'Activate'
50
 
51
  == Changelog ==
 
 
 
52
  = 1.11 =
53
  * Hungarian translation added
54
  * Swedish translation added
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WB5ZQWGUM7T96
9
+ Stable tag: 1.12
10
 
11
  Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image).
12
 
 
13
  == Description ==
14
  Plugin allows you to manually crop all the image sizes registered in your WordPress theme (in particular featured image).
15
  Simply click on the "Crop" link next to any image in your media library.
20
  * Below featured image box ("Crop featured image")
21
  * In the media insert modal window (once you select an image)
22
 
23
+ = Enjoying using Manual Image Crop? =
24
+ [Donate the plugin here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WB5ZQWGUM7T96 "Donate")
25
+
26
+ Thank you!
27
+
28
+ = GitHub Repository =
29
  https://github.com/tomaszsita/wp-manual-image-crop
30
 
31
+ = Translations =
32
  * Dutch (Bernardo Hulsman)
33
  * French (Gabriel Féron)
34
  * German (Bertram Greenhough)
41
 
42
  Please contact me if you want to add a translation (or submit a pull request on GitHub)
43
 
 
44
  == Installation ==
45
+ = Manually: =
46
+ * Upload `manual-image-crop` to the `/wp-content/plugins/` directory
47
+ * Activate the plugin through the 'Plugins' menu in WordPress
48
 
49
+ = Automatically: =
50
+ * Navigate to the 'Plugins' menu inside of the wordpress wp-admin dashboard, and select AD NEW
51
+ * Search for 'Manual Imag Crop', and click install
52
+ * When the plugin has been installed, Click 'Activate'
53
 
54
  == Changelog ==
55
+ = 1.12 =
56
+ * Fixed 'streched images' issue
57
+
58
  = 1.11 =
59
  * Hungarian translation added
60
  * Swedish translation added