Version Description
- Bug Fix
- Fix JS error: Uncaught ReferenceError: imagify is not defined in /assets/options.min.js
- Don't show "Optimize" button during optimizing process in "Edit Media" screen
Download this release
Release Info
Developer | wp_media |
Plugin | Imagify Image Optimizer |
Version | 1.5.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.5.2
- assets/js/jquery.twentytwenty.js +8 -5
- assets/js/jquery.twentytwenty.min.js +3 -3
- assets/js/options.min.js +4 -4
- imagify.php +2 -2
- readme.txt +6 -2
assets/js/jquery.twentytwenty.js
CHANGED
@@ -514,7 +514,7 @@
|
|
514 |
}
|
515 |
// else put images next to next
|
516 |
else if ( thumb.width < width_limit && $('#imagify-full-original').length > 0 && $('#imagify-full-original').val() !== '' ) {
|
517 |
-
|
518 |
}
|
519 |
// if image has no backup
|
520 |
else if ( $('#imagify-full-original').length > 0 && $('#imagify-full-original').val() === '' ) {
|
@@ -522,11 +522,14 @@
|
|
522 |
}
|
523 |
// in case image is not optimized
|
524 |
else {
|
525 |
-
|
|
|
|
|
526 |
|
527 |
-
|
528 |
-
|
529 |
-
|
|
|
530 |
}
|
531 |
|
532 |
}
|
514 |
}
|
515 |
// else put images next to next
|
516 |
else if ( thumb.width < width_limit && $('#imagify-full-original').length > 0 && $('#imagify-full-original').val() !== '' ) {
|
517 |
+
// TODO
|
518 |
}
|
519 |
// if image has no backup
|
520 |
else if ( $('#imagify-full-original').length > 0 && $('#imagify-full-original').val() === '' ) {
|
522 |
}
|
523 |
// in case image is not optimized
|
524 |
else {
|
525 |
+
// if is not in optimizing process, propose the Optimize button trigger
|
526 |
+
if ( $('#misc-publishing-actions').find('.misc-pub-imagify').find('.button-primary').length === 1 ) {
|
527 |
+
$('[id^="imgedit-open-btn-"]').before('<span class="spinner imagify-hidden"></span><a class="imagify-button-primary button-primary imagify-optimize-trigger" id="imagify-optimize-trigger" href="' + $optimize_btn.attr('href') + '">' + imagifyTTT.labels.optimize + '</a>');
|
528 |
|
529 |
+
$('#imagify-optimize-trigger').on('click', function(){
|
530 |
+
$(this).prev('.spinner').removeClass('imagify-hidden').addClass('is-active');
|
531 |
+
});
|
532 |
+
}
|
533 |
}
|
534 |
|
535 |
}
|
assets/js/jquery.twentytwenty.min.js
CHANGED
@@ -21,8 +21,8 @@ g=c.closest(".twentytwenty-duo-buttons").find("button"),f=b.find(".twentytwenty-
|
|
21 |
"-label")),a(".imagify-c-level.go-left").attr("aria-hidden","true").removeClass("go-left go-right"),a(".imagify-level-"+m).attr("aria-hidden","false").addClass("go-left"));"right"===e&&(h.removeClass("twentytwenty-after"),b.find(".img-"+m).addClass("twentytwenty-after"),a(".twentytwenty-after-label").find(".twentytwenty-label-content").text(b.data(m+"-label")),a(".imagify-c-level.go-right").attr("aria-hidden","true").removeClass("go-left go-right"),a(".imagify-level-"+m).attr("aria-hidden","false").addClass("go-right"));
|
22 |
v(a(".imagify-level-"+m).find(".imagify-chart").find("canvas"));return!1})}});if(0<a(".post-php").find(".wp_attachment_image").find(".thumbnail").length){q=a(".post-php").find(".wp_attachment_image");var d=q.find(".thumbnail"),p=d.prop("src"),t=d.width(),d=d.height(),l=a("#imagify-full-original").val(),z=a("#imagify-full-original-size").val(),h=a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary");if(360<t&&0<a("#imagify-full-original").length&&""!==a("#imagify-full-original").val()){var h=
|
23 |
a(".misc-pub-filesize").find("strong").text(),w=a(".imagify-data-item").find(".imagify-chart-value").text();a('[id^="imgedit-open-btn-"]').before('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-visual-comparison" id="imagify-start-comparison">'+imagifyTTT.labels.compare+"</button>");c({width:t,height:d,original_url:l,optimized_url:p,original_size:z,optimized_size:h,saving:w,modal_append_to:q,trigger:a("#imagify-start-comparison"),modal_id:"imagify-visual-comparison"})}else 360>
|
24 |
-
t&&0<a("#imagify-full-original").length&&""!==a("#imagify-full-original").val()||0<a("#imagify-full-original").length&&""===a("#imagify-full-original").val()||(a('[id^="imgedit-open-btn-"]').before('<span class="spinner imagify-hidden"></span><a class="imagify-button-primary button-primary imagify-optimize-trigger" id="imagify-optimize-trigger" href="'+h.attr("href")+'">'+imagifyTTT.labels.optimize+"</a>"),
|
25 |
-
a(".upload-php").find(".imagify-compare-images").length&&a(".imagify-compare-images").each(function(){var b=a(this),d=b.data("id"),e=b.closest("#post-"+d).find(".column-imagify_optimized_file");c({width:b.data("full-width"),height:b.data("full-height"),original_url:b.data("backup-src"),optimized_url:b.data("full-src"),original_size:e.find(".original").text(),optimized_size:e.find(".imagify-data-item").find(".big").text(),
|
26 |
-
trigger:b,modal_id:"imagify-comparison-"+d})});if(0<a(".upload-php").length)var x=function(a){var c={};n.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(a,b,d){c[b]=d!==k?d:""});return a?c[a]?c[a]:null:c},u=function(){var b=setInterval(function(){if(a(".media-modal").find(".imagify-datas-details").length){if(0<a("#imagify-original-src").length&&""!==a("#imagify-original-src")){a(".media-frame-content").find(".attachment-actions").prepend('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-comparison-modal" id="imagify-media-frame-comparison-btn">'+
|
27 |
imagifyTTT.labels.compare+"</button>");var d=a(".media-frame-content").find(".compat-field-imagify");c({width:a("#imagify-full-width").val(),height:a("#imagify-full-height").val(),original_url:a("#imagify-original-src").val(),optimized_url:a("#imagify-full-src").val(),original_size:a("#imagify-original-size").val(),optimized_size:d.find(".imagify-data-item").find(".big").text(),saving:d.find(".imagify-chart-value").text(),modal_append_to:a(".media-frame-content").find(".thumbnail-image"),trigger:a("#imagify-media-frame-comparison-btn"),
|
28 |
modal_id:"imagify-comparison-modal",open_modal:!0})}clearInterval(b);b=null}},20)},r=setInterval(function(){0<a(".upload-php").find(".media-frame.mode-grid").find(".attachments").length&&(a(".upload-php").find(".media-frame.mode-grid").on("click",".attachment",function(){u()}),x("item")&&u(),clearInterval(r),r=null)},100)})(jQuery,window,document);
|
21 |
"-label")),a(".imagify-c-level.go-left").attr("aria-hidden","true").removeClass("go-left go-right"),a(".imagify-level-"+m).attr("aria-hidden","false").addClass("go-left"));"right"===e&&(h.removeClass("twentytwenty-after"),b.find(".img-"+m).addClass("twentytwenty-after"),a(".twentytwenty-after-label").find(".twentytwenty-label-content").text(b.data(m+"-label")),a(".imagify-c-level.go-right").attr("aria-hidden","true").removeClass("go-left go-right"),a(".imagify-level-"+m).attr("aria-hidden","false").addClass("go-right"));
|
22 |
v(a(".imagify-level-"+m).find(".imagify-chart").find("canvas"));return!1})}});if(0<a(".post-php").find(".wp_attachment_image").find(".thumbnail").length){q=a(".post-php").find(".wp_attachment_image");var d=q.find(".thumbnail"),p=d.prop("src"),t=d.width(),d=d.height(),l=a("#imagify-full-original").val(),z=a("#imagify-full-original-size").val(),h=a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary");if(360<t&&0<a("#imagify-full-original").length&&""!==a("#imagify-full-original").val()){var h=
|
23 |
a(".misc-pub-filesize").find("strong").text(),w=a(".imagify-data-item").find(".imagify-chart-value").text();a('[id^="imgedit-open-btn-"]').before('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-visual-comparison" id="imagify-start-comparison">'+imagifyTTT.labels.compare+"</button>");c({width:t,height:d,original_url:l,optimized_url:p,original_size:z,optimized_size:h,saving:w,modal_append_to:q,trigger:a("#imagify-start-comparison"),modal_id:"imagify-visual-comparison"})}else 360>
|
24 |
+
t&&0<a("#imagify-full-original").length&&""!==a("#imagify-full-original").val()||0<a("#imagify-full-original").length&&""===a("#imagify-full-original").val()||1!==a("#misc-publishing-actions").find(".misc-pub-imagify").find(".button-primary").length||(a('[id^="imgedit-open-btn-"]').before('<span class="spinner imagify-hidden"></span><a class="imagify-button-primary button-primary imagify-optimize-trigger" id="imagify-optimize-trigger" href="'+h.attr("href")+'">'+imagifyTTT.labels.optimize+"</a>"),
|
25 |
+
a("#imagify-optimize-trigger").on("click",function(){a(this).prev(".spinner").removeClass("imagify-hidden").addClass("is-active")}))}0<a(".upload-php").find(".imagify-compare-images").length&&a(".imagify-compare-images").each(function(){var b=a(this),d=b.data("id"),e=b.closest("#post-"+d).find(".column-imagify_optimized_file");c({width:b.data("full-width"),height:b.data("full-height"),original_url:b.data("backup-src"),optimized_url:b.data("full-src"),original_size:e.find(".original").text(),optimized_size:e.find(".imagify-data-item").find(".big").text(),
|
26 |
+
saving:e.find(".imagify-chart-value").text(),modal_append_to:b.closest(".column-primary"),trigger:b,modal_id:"imagify-comparison-"+d})});if(0<a(".upload-php").length)var x=function(a){var c={};n.location.href.replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(a,b,d){c[b]=d!==k?d:""});return a?c[a]?c[a]:null:c},u=function(){var b=setInterval(function(){if(a(".media-modal").find(".imagify-datas-details").length){if(0<a("#imagify-original-src").length&&""!==a("#imagify-original-src")){a(".media-frame-content").find(".attachment-actions").prepend('<button type="button" class="imagify-button-primary button-primary imagify-modal-trigger" data-target="#imagify-comparison-modal" id="imagify-media-frame-comparison-btn">'+
|
27 |
imagifyTTT.labels.compare+"</button>");var d=a(".media-frame-content").find(".compat-field-imagify");c({width:a("#imagify-full-width").val(),height:a("#imagify-full-height").val(),original_url:a("#imagify-original-src").val(),optimized_url:a("#imagify-full-src").val(),original_size:a("#imagify-original-size").val(),optimized_size:d.find(".imagify-data-item").find(".big").text(),saving:d.find(".imagify-chart-value").text(),modal_append_to:a(".media-frame-content").find(".thumbnail-image"),trigger:a("#imagify-media-frame-comparison-btn"),
|
28 |
modal_id:"imagify-comparison-modal",open_modal:!0})}clearInterval(b);b=null}},20)},r=setInterval(function(){0<a(".upload-php").find(".media-frame.mode-grid").find(".attachments").length&&(a(".upload-php").find(".media-frame.mode-grid").on("click",".attachment",function(){u()}),x("item")&&u(),clearInterval(r),r=null)},100)})(jQuery,window,document);
|
assets/js/options.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
jQuery(function(a){var c=!1,d=!1,f=0<ajaxurl.indexOf("?")?"&":"?";a("#imagify-settings #api_key").blur(function(){var b=a(this),e=b.val();if(""===a.trim(e))return!1;if(a("#check_api_key").val()===e)return a("#imagify-check-api-container").html('<span class="dashicons dashicons-yes"></span> '+
|
2 |
-
c=!0;d=a.get(ajaxurl+f+"action=imagify_check_api_key_validity&api_key="+b.val()+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(b){b.success?(a("#imagify-check-api-container").remove(),swal({title:
|
3 |
-
"pointer").on("click",function(b){if("INPUT"!==b.target.nodeName)return a('input[aria-describedby="'+a(this).attr("id")+'"]').trigger("click"),!1});a(".imagify-settings th span").on("click",function(b){1===a(this).parent().next("td").find("input:checkbox").length&&a(this).parent().next("td").find("input:checkbox").trigger("click")});a(".imagify-options-line").find("input").on("change focus",function(){var b=a(this).closest(".imagify-options-line").prev("label").prev("input");
|
4 |
-
|
1 |
+
jQuery(function(a){var c=!1,d=!1,f=0<ajaxurl.indexOf("?")?"&":"?";a("#imagify-settings #api_key").blur(function(){var b=a(this),e=b.val();if(""===a.trim(e))return!1;if(a("#check_api_key").val()===e)return a("#imagify-check-api-container").html('<span class="dashicons dashicons-yes"></span> '+imagifyAdmin.ValidApiKeyText),!1;!0===c?d.abort():(a("#imagify-check-api-container").remove(),b.after('<span id="imagify-check-api-container"><span class="imagify-spinner"></span>'+imagifyAdmin.waitApiKeyCheckText+
|
2 |
+
"</span>"));c=!0;d=a.get(ajaxurl+f+"action=imagify_check_api_key_validity&api_key="+b.val()+"&imagifycheckapikeynonce="+a("#imagifycheckapikeynonce").val()).done(function(b){b.success?(a("#imagify-check-api-container").remove(),swal({title:imagifyAdmin.ApiKeyCheckSuccessTitle,text:imagifyAdmin.ApiKeyCheckSuccessText,type:"success",customClass:"imagify-sweet-alert"},function(){location.reload()})):a("#imagify-check-api-container").html('<span class="dashicons dashicons-no"></span> '+b.data);c=!1})});
|
3 |
+
a(".imagify-options-line").css("cursor","pointer").on("click",function(b){if("INPUT"!==b.target.nodeName)return a('input[aria-describedby="'+a(this).attr("id")+'"]').trigger("click"),!1});a(".imagify-settings th span").on("click",function(b){1===a(this).parent().next("td").find("input:checkbox").length&&a(this).parent().next("td").find("input:checkbox").trigger("click")});a(".imagify-options-line").find("input").on("change focus",function(){var b=a(this).closest(".imagify-options-line").prev("label").prev("input");
|
4 |
+
b[0].checked||b.prop("checked",!0)});a(".imagify-settings-section").find("#backup").on("change",function(){if(!a(this).is(":checked")){var b=a(this);swal({title:imagifyOptions.noBackupTitle,text:imagifyOptions.noBackupText,type:"info",customClass:"imagify-sweet-alert",showCancelButton:!0,cancelButtonText:imagifyAdmin.swalCancel},function(a){a||b.prop("checked",!0)})}})});
|
imagify.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Imagify
|
4 |
Plugin URI: https://wordpress.org/plugins/imagify/
|
5 |
Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwith using Imagify, the new most advanced image optimization tool.
|
6 |
-
Version: 1.5.
|
7 |
Author: WP Media
|
8 |
Author URI: http://wp-media.me
|
9 |
Licence: GPLv2
|
@@ -17,7 +17,7 @@ Copyright 2015 WP Media
|
|
17 |
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
18 |
|
19 |
// Imagify defines
|
20 |
-
define( 'IMAGIFY_VERSION' , '1.5.
|
21 |
define( 'IMAGIFY_SLUG' , 'imagify' );
|
22 |
define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
|
23 |
define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
|
3 |
Plugin Name: Imagify
|
4 |
Plugin URI: https://wordpress.org/plugins/imagify/
|
5 |
Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwith using Imagify, the new most advanced image optimization tool.
|
6 |
+
Version: 1.5.2
|
7 |
Author: WP Media
|
8 |
Author URI: http://wp-media.me
|
9 |
Licence: GPLv2
|
17 |
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
|
18 |
|
19 |
// Imagify defines
|
20 |
+
define( 'IMAGIFY_VERSION' , '1.5.2' );
|
21 |
define( 'IMAGIFY_SLUG' , 'imagify' );
|
22 |
define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
|
23 |
define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wp_media
|
|
3 |
Tags: compress image, images, performance, optimization, photos, upload, resize, gif, png, jpg, reduce image size, retina
|
4 |
Requires at least: 3.7.0
|
5 |
Tested up to: 4.5.1
|
6 |
-
Stable tag: 1.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -136,6 +136,11 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
|
|
136 |
|
137 |
== Changelog ==
|
138 |
|
|
|
|
|
|
|
|
|
|
|
139 |
= 1.5.1 =
|
140 |
* Bug Fix
|
141 |
* Thumbnail sizes in settings page aren't reset anymore on plugin update
|
@@ -143,7 +148,6 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
|
|
143 |
* Fix PHP Warning: Invalid argument supplied for foreach() in /inc/functions/admin-stats.php on line 233
|
144 |
|
145 |
= 1.5 =
|
146 |
-
|
147 |
* NEW Features:
|
148 |
* NextGen Gallery compatibility - Optimize all your images uploaded with NextGen Gallery
|
149 |
* Asynchronous Optimization - No more latency when you upload new images, Imagify will optimize them in background!
|
3 |
Tags: compress image, images, performance, optimization, photos, upload, resize, gif, png, jpg, reduce image size, retina
|
4 |
Requires at least: 3.7.0
|
5 |
Tested up to: 4.5.1
|
6 |
+
Stable tag: 1.5.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= 1.5.2 =
|
140 |
+
* Bug Fix
|
141 |
+
* Fix JS error: Uncaught ReferenceError: imagify is not defined in /assets/options.min.js
|
142 |
+
* Don't show "Optimize" button during optimizing process in "Edit Media" screen
|
143 |
+
|
144 |
= 1.5.1 =
|
145 |
* Bug Fix
|
146 |
* Thumbnail sizes in settings page aren't reset anymore on plugin update
|
148 |
* Fix PHP Warning: Invalid argument supplied for foreach() in /inc/functions/admin-stats.php on line 233
|
149 |
|
150 |
= 1.5 =
|
|
|
151 |
* NEW Features:
|
152 |
* NextGen Gallery compatibility - Optimize all your images uploaded with NextGen Gallery
|
153 |
* Asynchronous Optimization - No more latency when you upload new images, Imagify will optimize them in background!
|