Crop-Thumbnails - Version 0.10.1

Version Description

  • small enhancement for developers: add the 'same_ratio_active' parameter in the ajax-request (https://wordpress.org/support/topic/return-same-ratio-daja-in-ajax-request)
Download this release

Release Info

Developer Volkmar Kantor
Plugin Icon Crop-Thumbnails
Version 0.10.1
Comparing to
See all releases

Code changes from version 0.10.0 to 0.10.1

Files changed (4) hide show
  1. crop-thumbnails.php +2 -2
  2. functions/save.php +2 -1
  3. js/cpt-crop.js +2 -1
  4. readme.txt +10 -1
crop-thumbnails.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
5
  * Author: Volkmar Kantor
6
  * Author URI: http://www.totalmedial.de
7
- * Version: 0.10.0
8
  * Description: Crop your thumbnails, the easy way.
9
  *
10
  * License: GPL v3
@@ -26,7 +26,7 @@
26
 
27
  //cpt - stands for crop-post-thumbnail
28
  define('CROP_THUMBS_LANG','cpt_lang');
29
- define('CROP_THUMBS_VERSION','0.10.0');
30
 
31
  function cpt_plugin_init() {
32
  load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
4
  * Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
5
  * Author: Volkmar Kantor
6
  * Author URI: http://www.totalmedial.de
7
+ * Version: 0.10.1
8
  * Description: Crop your thumbnails, the easy way.
9
  *
10
  * License: GPL v3
26
 
27
  //cpt - stands for crop-post-thumbnail
28
  define('CROP_THUMBS_LANG','cpt_lang');
29
+ define('CROP_THUMBS_VERSION','0.10.1');
30
 
31
  function cpt_plugin_init() {
32
  load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
functions/save.php CHANGED
@@ -13,6 +13,7 @@ class CptSaveThumbnail {
13
  * * $_REQUEST['selection'] - json-object - data of the selection/crop
14
  * * $_REQUEST['raw_values'] - json-object - data of the original image
15
  * * $_REQUEST['active_values'] - json-array - array with data of the images to crop
 
16
  * The main code is wraped via try-catch - the errorMessage will send back to JavaScript for displaying in an alert-box.
17
  * Called die() at the end.
18
  */
@@ -253,4 +254,4 @@ class CptSaveThumbnail {
253
  return $destfilename;
254
  }
255
  }
256
- ?>
13
  * * $_REQUEST['selection'] - json-object - data of the selection/crop
14
  * * $_REQUEST['raw_values'] - json-object - data of the original image
15
  * * $_REQUEST['active_values'] - json-array - array with data of the images to crop
16
+ * * $_REQUEST['same_ratio_active'] - boolean - was the same_ratio_checkbox checked or not
17
  * The main code is wraped via try-catch - the errorMessage will send back to JavaScript for displaying in an alert-box.
18
  * Called die() at the end.
19
  */
254
  return $destfilename;
255
  }
256
  }
257
+ ?>
js/cpt-crop.js CHANGED
@@ -80,7 +80,8 @@ jQuery(document).ready(function($) {
80
  cookie: encodeURIComponent(document.cookie),
81
  selection: JSON.stringify(cropping.api.tellSelect()),
82
  raw_values: JSON.stringify(cropping.img.data('values')),
83
- active_values: JSON.stringify(active_array)
 
84
  },
85
  complete : function() {
86
  $('.mainWindow').show();
80
  cookie: encodeURIComponent(document.cookie),
81
  selection: JSON.stringify(cropping.api.tellSelect()),
82
  raw_values: JSON.stringify(cropping.img.data('values')),
83
+ active_values: JSON.stringify(active_array),
84
+ same_ratio_active: $('#cpt-same-ratio').is('checked')
85
  },
86
  complete : function() {
87
  $('.mainWindow').show();
readme.txt CHANGED
@@ -15,7 +15,8 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
  The plugin enhance functionality to crop your automatic cropped post-thumbnails individuell and simple. It add links in the backend to enter all images you had attached to a post, page or custom-post.
16
  In the Crop-Editor you can choose one or more (if they have the same ratio) imagesizes and cut-off the part of the image you want.
17
 
18
- Further Features
 
19
  * It is possible to filter the list of available image-sizes (in dependency to post-types) in the settings (Settings > Crop-Thumbnails).
20
  * You could provide your users a custom style for the Editor-Window.
21
 
@@ -77,6 +78,11 @@ Example-Code:
77
  CROP_THUMBNAILS_DO_CACHE_BREAK( $('.your-image-selector') );
78
  });`
79
 
 
 
 
 
 
80
  == Screenshots ==
81
 
82
  1. You have access to Crop-Thumbnails on post / page / custom-post-types.
@@ -87,6 +93,9 @@ Example-Code:
87
 
88
  == Changelog ==
89
 
 
 
 
90
  = 0.10.0 =
91
  * refactoring some parts of the code to make it more modular
92
  * adding a cache breaker to the backend, so in post-view and mediathek the image should be refreshed after the modal-dialog closes
15
  The plugin enhance functionality to crop your automatic cropped post-thumbnails individuell and simple. It add links in the backend to enter all images you had attached to a post, page or custom-post.
16
  In the Crop-Editor you can choose one or more (if they have the same ratio) imagesizes and cut-off the part of the image you want.
17
 
18
+ = Further Features =
19
+
20
  * It is possible to filter the list of available image-sizes (in dependency to post-types) in the settings (Settings > Crop-Thumbnails).
21
  * You could provide your users a custom style for the Editor-Window.
22
 
78
  CROP_THUMBNAILS_DO_CACHE_BREAK( $('.your-image-selector') );
79
  });`
80
 
81
+ = I want to contribute code. =
82
+ Fantastic, i published the code on github: https://github.com/vollyimnetz/crop-thumbnails. But be warned, i am carefully evaluate new features.
83
+
84
+ If you fork and planning to publish the forked plugin, please contact me.
85
+
86
  == Screenshots ==
87
 
88
  1. You have access to Crop-Thumbnails on post / page / custom-post-types.
93
 
94
  == Changelog ==
95
 
96
+ = 0.10.1 =
97
+ * small enhancement for developers: add the 'same_ratio_active' parameter in the ajax-request (https://wordpress.org/support/topic/return-same-ratio-daja-in-ajax-request)
98
+
99
  = 0.10.0 =
100
  * refactoring some parts of the code to make it more modular
101
  * adding a cache breaker to the backend, so in post-view and mediathek the image should be refreshed after the modal-dialog closes