Version Description
- bugfix: hide disabled image-sizes in the crop-editor again
Download this release
Release Info
Developer | Volkmar Kantor |
Plugin | Crop-Thumbnails |
Version | 0.10.11 |
Comparing to | |
See all releases |
Code changes from version 0.10.10 to 0.10.11
- crop-thumbnails.php +2 -2
- functions/backendpreparer.php +1 -1
- functions/editor.php +6 -1
- readme.txt +3 -0
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.
|
8 |
* Description: Crop your thumbnails, the easy way.
|
9 |
* Text Domain: crop-thumbnails
|
10 |
*
|
@@ -27,7 +27,7 @@
|
|
27 |
|
28 |
//cpt - stands for crop-post-thumbnail
|
29 |
define('CROP_THUMBS_LANG','cpt_lang');
|
30 |
-
define('CROP_THUMBS_VERSION','0.10.
|
31 |
|
32 |
function cpt_plugin_init() {
|
33 |
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.11
|
8 |
* Description: Crop your thumbnails, the easy way.
|
9 |
* Text Domain: crop-thumbnails
|
10 |
*
|
27 |
|
28 |
//cpt - stands for crop-post-thumbnail
|
29 |
define('CROP_THUMBS_LANG','cpt_lang');
|
30 |
+
define('CROP_THUMBS_VERSION','0.10.11');
|
31 |
|
32 |
function cpt_plugin_init() {
|
33 |
load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
functions/backendpreparer.php
CHANGED
@@ -83,7 +83,7 @@ jQuery(document).ready(function($) {
|
|
83 |
|
84 |
var featuredImageLinkButton = '';
|
85 |
featuredImageLinkButton+= '<p class="cropFeaturedImageWrap hidden">';
|
86 |
-
featuredImageLinkButton+= '<a class="button cropThumbnailsLink" href="#" data-cropthumbnail=\'{"image_id":'+ parseInt(wp.media.featuredImage.get()) +',"viewmode":"single"}\' title="<?php esc_attr_e('Crop Featured Image',CROP_THUMBS_LANG) ?>">';
|
87 |
featuredImageLinkButton+= '<span class="wp-media-buttons-icon"></span> <?php esc_html_e('Crop Featured Image',CROP_THUMBS_LANG); ?>';
|
88 |
featuredImageLinkButton+= '</a>';
|
89 |
baseElem.find('.inside').after( $(featuredImageLinkButton) );
|
83 |
|
84 |
var featuredImageLinkButton = '';
|
85 |
featuredImageLinkButton+= '<p class="cropFeaturedImageWrap hidden">';
|
86 |
+
featuredImageLinkButton+= '<a class="button cropThumbnailsLink" href="#" data-cropthumbnail=\'{"image_id":'+ parseInt(wp.media.featuredImage.get()) +',"viewmode":"single","posttype":"<?php echo get_post_type(); ?>"}\' title="<?php esc_attr_e('Crop Featured Image',CROP_THUMBS_LANG) ?>">';
|
87 |
featuredImageLinkButton+= '<span class="wp-media-buttons-icon"></span> <?php esc_html_e('Crop Featured Image',CROP_THUMBS_LANG); ?>';
|
88 |
featuredImageLinkButton+= '</a>';
|
89 |
baseElem.find('.inside').after( $(featuredImageLinkButton) );
|
functions/editor.php
CHANGED
@@ -129,10 +129,11 @@ class CropPostThumbnailsEditor {
|
|
129 |
* Display the crop editor.
|
130 |
* @param $_REQUEST['image_id'] - ID of the image to show
|
131 |
* @param $_REQUEST['viewmode']=='single' - without the back-link
|
|
|
132 |
*/
|
133 |
function byImageId() {
|
134 |
global $cptSettings,$content_width;
|
135 |
-
|
136 |
//make sure $content_width is out of the way
|
137 |
$_remember_content_width = $content_width;
|
138 |
$content_width = null;
|
@@ -159,6 +160,10 @@ class CropPostThumbnailsEditor {
|
|
159 |
$current_parent_post_id = $_tmp->ID;
|
160 |
}
|
161 |
}
|
|
|
|
|
|
|
|
|
162 |
|
163 |
$all_image_sizes = $cptSettings->getImageSizes();
|
164 |
$this->addDebug('all_image_sizes', print_r($all_image_sizes,true));
|
129 |
* Display the crop editor.
|
130 |
* @param $_REQUEST['image_id'] - ID of the image to show
|
131 |
* @param $_REQUEST['viewmode']=='single' - without the back-link
|
132 |
+
* @param $_REQUEST['posttype']=='page' - (optional) will be used to hide certain image sizes (default: '')
|
133 |
*/
|
134 |
function byImageId() {
|
135 |
global $cptSettings,$content_width;
|
136 |
+
|
137 |
//make sure $content_width is out of the way
|
138 |
$_remember_content_width = $content_width;
|
139 |
$content_width = null;
|
160 |
$current_parent_post_id = $_tmp->ID;
|
161 |
}
|
162 |
}
|
163 |
+
|
164 |
+
if(!empty($_REQUEST['posttype']) && post_type_exists($_REQUEST['posttype'])) {
|
165 |
+
$current_parent_post_type = $_REQUEST['posttype'];
|
166 |
+
}
|
167 |
|
168 |
$all_image_sizes = $cptSettings->getImageSizes();
|
169 |
$this->addDebug('all_image_sizes', print_r($all_image_sizes,true));
|
readme.txt
CHANGED
@@ -120,6 +120,9 @@ If you fork and planning to publish the forked plugin, please contact me.
|
|
120 |
6. Quicktest on settings-page, to check if your system is correct setup.
|
121 |
|
122 |
== Changelog ==
|
|
|
|
|
|
|
123 |
= 0.10.10 =
|
124 |
* bugfix: Checks if the current page have a featured image box in the first place
|
125 |
|
120 |
6. Quicktest on settings-page, to check if your system is correct setup.
|
121 |
|
122 |
== Changelog ==
|
123 |
+
= 0.10.11 =
|
124 |
+
* bugfix: hide disabled image-sizes in the crop-editor again
|
125 |
+
|
126 |
= 0.10.10 =
|
127 |
* bugfix: Checks if the current page have a featured image box in the first place
|
128 |
|