Skip to content

Commit

Permalink
bugfix - filter settings will work again
Browse files Browse the repository at this point in the history
  • Loading branch information
Volkmar Kantor committed Jul 7, 2017
1 parent ddde046 commit 42b27ad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crop-thumbnails.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
* Author: Volkmar Kantor
* Author URI: http://www.totalmedial.de
* Version: 0.10.12
* Version: 0.10.13
* Description: Crop your thumbnails, the easy way.
* Text Domain: crop-thumbnails
*
Expand All @@ -27,7 +27,7 @@

//cpt - stands for crop-post-thumbnail
define('CROP_THUMBS_LANG','cpt_lang');
define('CROP_THUMBS_VERSION','0.10.12');
define('CROP_THUMBS_VERSION','0.10.13');

function cpt_plugin_init() {
load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
Expand Down
11 changes: 10 additions & 1 deletion functions/backendpreparer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function adminHeaderJS() {
* adds the links into post-types and the media-library
*/
function addLinksToAdmin() {

?>
<script type="text/javascript">
jQuery(document).ready(function($) {
Expand All @@ -68,6 +68,11 @@ function addLinksToAdmin() {
}
};

/**
* Global accessable id of the current post (will be null if no post-element is present)
*/
CROP_THUMBNAILS_CURRENT_POST_ID = null;

/**
* Adds a button to the featured image metabox.
* The button will be visible only if a featured image is set.
Expand Down Expand Up @@ -124,6 +129,7 @@ function updateCropFeaturedImageButton(currentId) {
if (post_id_hidden) {

post_id_hidden = parseInt(post_id_hidden.val());
CROP_THUMBNAILS_CURRENT_POST_ID = post_id_hidden;

/**
* add link on top of editor *
Expand Down Expand Up @@ -210,6 +216,9 @@ function updateCropFeaturedImageButton(currentId) {
for(var v in data) {
url+='&amp;'+v+'='+data[v];
}
if(CROP_THUMBNAILS_CURRENT_POST_ID!==null) {
url+='&amp;parent_post_id='+CROP_THUMBNAILS_CURRENT_POST_ID;
}

var content = $('<div><iframe src="'+url+'"></iframe></div>');
var overlay;
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ If you fork and planning to publish the forked plugin, please contact me.
6. Quicktest on settings-page, to check if your system is correct setup.

== Changelog ==
= 0.10.13 =
* bugfix: filter-settings will work again in media-dialog

= 0.10.12 =
* add italian translation (thanks to akteon18)

Expand Down

0 comments on commit 42b27ad

Please sign in to comment.