+
'
. self::addSetting("number", __("Image quality", 'resmushit-image-optimizer'), __("A lower value means a smaller image size, a higher value means better image quality. A value between 50 and 85 is normally recommended.", 'resmushit-image-optimizer'), "resmushit_qlty")
+
. self::addSetting("checkbox", __("Optimize on upload", 'resmushit-image-optimizer'), __("Once activated, newly uploaded images are automatically optimized.", 'resmushit-image-optimizer'), "resmushit_on_upload")
. self::addSetting("checkbox", __("Preserve EXIF", 'resmushit-image-optimizer'), __("Activate this option to retain the original EXIF data in the images.", 'resmushit-image-optimizer'), "resmushit_preserve_exif")
. self::addSetting("checkbox", __("Deactivate backup", 'resmushit-image-optimizer'), sprintf(__("If you select this option, you choose not to keep the original version of the images. This is helpful to save disk space, but we strongly recommend having a backup of the entire website on hand. More information.", "resmushit-image-optimizer"), "https://resmush.it/why-preserving-backup-files/"), "resmushit_remove_unsmushed")
. self::addSetting("checkbox", __("Optimize images using CRON", 'resmushit-image-optimizer'), sprintf(__("Image optimization is performed automatically via CRON tasks. More information", 'resmushit-image-optimizer'), 'https://resmush.it/how-to-configure-cronjobs/'), "resmushit_cron")
+
+ . self::addSetting("checkbox", __("Generate Webp/Avif", 'resmushit-image-optimizer'), sprintf(__("Create WebP/AVIF versions of the images. %s Request access %s ", 'resmushit-image-optimizer'), '', ''), "resmushit_webpavif")
+
. self::addSetting("checkbox", __("Activate logs", 'resmushit-image-optimizer'), sprintf(__("Activate logging in a file. Useful for debugging/developers. More information", 'resmushit-image-optimizer'), 'https://resmush.it/features/'), "resmushit_logs")
. self::addSetting("checkbox", __("Activate statistics", 'resmushit-image-optimizer'), __("Generates statistics about optimized images.", 'resmushit-image-optimizer'), "resmushit_statistics")
. '';
@@ -552,17 +556,22 @@ public static function addSetting($type, $name, $extra, $machine_name) {
";
$label = "";
+
+
switch($type){
case 'text':
$output .= $label . "";
break;
case 'number':
- $output .= $label . "";
+ $more = ($machine_name == 'resmushit_qlty') ? ' ' . __('What is the best way to optimize images?', 'resmushit-image-optimizer') . '
' : '';
+
+ $output .= $label . "$more";
break;
case 'checkbox':
$additionnal = null;
if ( 1 == get_option( $machine_name ) ) $additionnal = 'checked="checked"';
- $output .= "";
+ $disabled = ($machine_name == 'resmushit_webpavif') ? 'disabled' : '';
+ $output .= "";
$output .= $label;
break;
default:
diff --git a/css/resmush_admin.css b/css/resmush_admin.css
index ca532fc..c20ff88 100644
--- a/css/resmush_admin.css
+++ b/css/resmush_admin.css
@@ -166,7 +166,7 @@
}
.resmush-settings-ui .shortpixel-message .button-wrapper {
text-align: center;
- margin: 36px 0 26px;
+ margin: 36px 0 10px;
}
.resmush-settings-ui .shortpixel-message .button-wrapper a {
font-size: 20px;
@@ -180,6 +180,13 @@
background-color: #1ABDCA;
color: #e6faff;
}
+.resmush-settings-ui .shortpixel-message .link-under {
+ text-align: center;
+ margin-bottom: 16px;
+}
+.resmush-settings-ui .shortpixel-message .link-under a {
+ color: #1ABDCA;
+}
@media (max-width: 1100px) {
.resmush-settings-ui .shortpixel-message {
max-width: 500px;
diff --git a/css/resmush_admin.css.map b/css/resmush_admin.css.map
index 8f6d4e2..d6fda97 100644
--- a/css/resmush_admin.css.map
+++ b/css/resmush_admin.css.map
@@ -1 +1 @@
-{"version":3,"sourceRoot":"","sources":["../scss/_mixins.scss","../scss/resmush_admin.scss"],"names":[],"mappings":"AAiBA;EAAuB;IAAG;;EAA6B;IAAI;;EAA6B;IAAI;;EAAgC;IAAI;;EAA+B;IAAI;;EAAoC;IAAI;;EAAmC;IAAI;;EAAoC;IAAI;;EAAmC;IAAK;;;ACflU;EAGE;;AACE;EACE;EACA;EACA;EACA;;AAEF;EACE;;AACA;EACE;;AAGJ;EACE;EACA;EACA;;;AAWJ;EAEE;EACA;EACA;;AAEA;EAIG;EACA;;AAEA;EACG;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAIF;EACI;EACA;;AAEJ;EACG;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACG;EACA;;AAEH;EACG;EACA;EACA;EACA;;ADrEZ;EC2EM;IAAK;;EACJ;IACE;;;AD7ET;ECkFM;IACE;;;AASV;EAEE;EACA;;AACA;EAEE;EACA;;AAEF;EAEI;EAEA;EACA;;AAEJ;EAEE;;AAIF;EAEG;;AAEH;EAEG;;ADxHH;EC4FF;IAiCK;;;AAOD;EAEG;;AAEH;EAAO;;AACP;EACI;EACA;;AAMR;EAEG;EACA;EACA;EACA;EACA;EAEA;;AACA;EAAM;;AACN;EAEG;;AACA;EACE;EACA;EACA;EACA;;AAGL;EAEG;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;ADnLV;ECiJF;IAwCM;IACA;;;AAML;EACC;;AACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAMC;EACG","file":"resmush_admin.css"}
\ No newline at end of file
+{"version":3,"sourceRoot":"","sources":["../scss/_mixins.scss","../scss/resmush_admin.scss"],"names":[],"mappings":"AAiBA;EAAuB;IAAG;;EAA6B;IAAI;;EAA6B;IAAI;;EAAgC;IAAI;;EAA+B;IAAI;;EAAoC;IAAI;;EAAmC;IAAI;;EAAoC;IAAI;;EAAmC;IAAK;;;ACflU;EAGE;;AACE;EACE;EACA;EACA;EACA;;AAEF;EACE;;AACA;EACE;;AAGJ;EACE;EACA;EACA;;;AAWJ;EAEE;EACA;EACA;;AAEA;EAIG;EACA;;AAEA;EACG;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAIF;EACI;EACA;;AAEJ;EACG;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACG;EACA;;AAEH;EACG;EACA;EACA;EACA;;ADrEZ;EC2EM;IAAK;;EACJ;IACE;;;AD7ET;ECkFM;IACE;;;AASV;EAEE;EACA;;AACA;EAEE;EACA;;AAEF;EAEI;EAEA;EACA;;AAEJ;EAEE;;AAIF;EAEG;;AAEH;EAEG;;ADxHH;EC4FF;IAiCK;;;AAOD;EAEG;;AAEH;EAAO;;AACP;EACI;EACA;;AAMR;EAEG;EACA;EACA;EACA;EACA;EAEA;;AACA;EAAM;;AACN;EAEG;;AACA;EACE;EACA;EACA;EACA;;AAGL;EAEG;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIT;EACG;EAKA;;AAJA;EACI;;AD1LR;ECiJF;IAgDM;IACA;;;AAML;EACC;;AACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAMC;EACG","file":"resmush_admin.css"}
\ No newline at end of file
diff --git a/images/star.png b/images/star.png
new file mode 100644
index 0000000000000000000000000000000000000000..75679a921113eb127bdc1bc67fdea70998ff8dc3
GIT binary patch
literal 1022
zcmV0004mX+uL$Nkc;*
zaB^>EX>4Tx04R}tkv&MmKpe$iQ$^8=gB?UVWT?7W5EXIMDionYs1;guFuC*#nlvOS
zE{=k0!NHHks)LKOt`4q(Aou~|?BJy6A|?JWDYS_3;J6>}?mh0_0YbgZG^=AA&~)2O
zCE{WxyDE0QB8Uij5yPm=EMrcRlJFg0_XzOyF2=L`&;2?2)SShDfJi*c4AUmwAfDc|
z4bJ<-VOEq?;&b9LlP*a7$aTfzH_io@1)do;)2VslFtJ!@W2KE*(bR~ih@+~eQ@)V#
zSmnIMSu0mr^Pc>Lp`5<5%ypU(B(R7jND!f*iW17Osjm`rQY@rsKknlna{Usy6mpfo
z$gzM5G{~+W{11M2Yvm^=yrfVZ=zMXUk71x|7iiQR=lj@k8Ye*T8MxA0{z@H~`6Rv8
z(xOK||2A-O-O`jj;Bp5Td@^KHcBLRqA)g1{&*+=7z`!lgv*z{I+{ftykfyGZH^9Lm
zFjAoGb)R>4xA*q%nPz`KuLp9!=NrAf00006VoOIv0RI4r0BZ&1T6F*b010qNS#tmY
z3ljhU3ljkVnw%H_000McNliru=mQ)JFgppfk&XZW02y>eSad^gZEa<4bO1wgWnpw>
zWFU8GbZ8()Nlj2!fese{00GuXL_t(I%e|AmYZOrw#m~L(zL|9wqg@l3wy!;Kx~4Qq!1y26)XRMu&YAARahJ2&g^{WJqtfTk_}@B
zp7x&id%Szj11f6kWlKiApjFk+RgEW(t2#438ubD>QZNy+>vHu6v$W
zx4_jZXZAd6xUoQ5h>bB8)&c<1f{$r&E{N8eS=}0Lwq7U@0RSrn0MuyrcMk-MqLTpb
zIF93j$XaWm9qYTU6A%$x$GHf?DuA4cV2n}5n2!LS9|*SAd}CJIMD*DA{dr~vfxyBb
z0zBVqxTdyB0LrqolgZ?*wf6p=O!nK)s230s&1tQl&iMX{I9mOEIgq7kK8fQeyJgvJ
zwEJNt@Na$IJUin$`eA)`_JN4{<4xiujiTsoQI^k|oe$+dx1!m3AA#_R`Dak}SD4H!
z)|xNVpq1*TSnd%K(j+Z*cD@gbqBJ5R%Tah
s>t~h+@jmkaz+7I~SErZz7XM2>03DyObHpS>+W-In07*qoM6N<$f>*KIkN^Mx
literal 0
HcmV?d00001
diff --git a/scss/resmush_admin.scss b/scss/resmush_admin.scss
index be5153a..2f6b23a 100644
--- a/scss/resmush_admin.scss
+++ b/scss/resmush_admin.scss
@@ -178,7 +178,7 @@
.button-wrapper
{
text-align: center;
- margin: 36px 0 26px;
+ margin: 36px 0 10px;
a {
font-size: 20px;
padding: 8px 8px;
@@ -193,6 +193,14 @@
}
}
}
+ .link-under {
+ text-align: center;
+ a {
+ color: #1ABDCA;
+ }
+
+ margin-bottom: 16px;
+ }
@include breakpoint (0, 1100px)
{
max-width: 500px;
From c71cdca57d430667c4ae00facabded1c0d253ed1 Mon Sep 17 00:00:00 2001
From: Bas Schuiling
Date: Thu, 28 Mar 2024 17:11:30 +0200
Subject: [PATCH 3/6] Remove setting
---
classes/resmushitUI.class.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/classes/resmushitUI.class.php b/classes/resmushitUI.class.php
index e2e0d72..902bdd7 100644
--- a/classes/resmushitUI.class.php
+++ b/classes/resmushitUI.class.php
@@ -135,7 +135,7 @@ public static function settingsPanel() {
. self::addSetting("checkbox", __("Generate Webp/Avif", 'resmushit-image-optimizer'), sprintf(__("Create WebP/AVIF versions of the images. %s Request access %s ", 'resmushit-image-optimizer'), '', ''), "resmushit_webpavif")
- . self::addSetting("checkbox", __("Activate logs", 'resmushit-image-optimizer'), sprintf(__("Activate logging in a file. Useful for debugging/developers. More information", 'resmushit-image-optimizer'), 'https://resmush.it/features/'), "resmushit_logs")
+
. self::addSetting("checkbox", __("Activate statistics", 'resmushit-image-optimizer'), __("Generates statistics about optimized images.", 'resmushit-image-optimizer'), "resmushit_statistics")
. '';
submit_button();
@@ -563,7 +563,7 @@ public static function addSetting($type, $name, $extra, $machine_name) {
$output .= $label . "";
break;
case 'number':
- $more = ($machine_name == 'resmushit_qlty') ? ' ' . __('What is the best way to optimize images?', 'resmushit-image-optimizer') . '' : '';
+ $more = ($machine_name == 'resmushit_qlty') ? ' ' . __('What is the best way to optimize images?', 'resmushit-image-optimizer') . '' : '';
$output .= $label . "$more";
break;
From 7e1010baf7facb590c179990aafd7b3578db00f8 Mon Sep 17 00:00:00 2001
From: Bas Schuiling
Date: Thu, 28 Mar 2024 17:33:28 +0200
Subject: [PATCH 4/6] Change log name
---
classes/Plugin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/classes/Plugin.php b/classes/Plugin.php
index f30bb41..257eeaf 100644
--- a/classes/Plugin.php
+++ b/classes/Plugin.php
@@ -73,7 +73,7 @@ public static function checkLogger()
$uploaddir = wp_upload_dir(null, false, false);
if (isset($uploaddir['basedir']))
{
- $log->setLogPath($uploaddir['basedir'] . "/resmush_log");
+ $log->setLogPath($uploaddir['basedir'] . "/resmushit.log");
}
}
}
From af28dc0ebe8789d2622fd264d91f2ad1fa52c28c Mon Sep 17 00:00:00 2001
From: Pedro Dobrescu
Date: Fri, 29 Mar 2024 11:16:57 +0200
Subject: [PATCH 5/6] Update wording and add another support link
---
classes/resmushitUI.class.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/classes/resmushitUI.class.php b/classes/resmushitUI.class.php
index 902bdd7..5d10acd 100644
--- a/classes/resmushitUI.class.php
+++ b/classes/resmushitUI.class.php
@@ -133,7 +133,7 @@ public static function settingsPanel() {
. self::addSetting("checkbox", __("Deactivate backup", 'resmushit-image-optimizer'), sprintf(__("If you select this option, you choose not to keep the original version of the images. This is helpful to save disk space, but we strongly recommend having a backup of the entire website on hand. More information.", "resmushit-image-optimizer"), "https://resmush.it/why-preserving-backup-files/"), "resmushit_remove_unsmushed")
. self::addSetting("checkbox", __("Optimize images using CRON", 'resmushit-image-optimizer'), sprintf(__("Image optimization is performed automatically via CRON tasks. More information", 'resmushit-image-optimizer'), 'https://resmush.it/how-to-configure-cronjobs/'), "resmushit_cron")
- . self::addSetting("checkbox", __("Generate Webp/Avif", 'resmushit-image-optimizer'), sprintf(__("Create WebP/AVIF versions of the images. %s Request access %s ", 'resmushit-image-optimizer'), '', ''), "resmushit_webpavif")
+ . self::addSetting("checkbox", __("Generate WebP/AVIF", 'resmushit-image-optimizer'), sprintf(__("Create WebP/AVIF versions of the images. %s Request access %s ", 'resmushit-image-optimizer'), '', ''), "resmushit_webpavif")
. self::addSetting("checkbox", __("Activate statistics", 'resmushit-image-optimizer'), __("Generates statistics about optimized images.", 'resmushit-image-optimizer'), "resmushit_statistics")
@@ -340,6 +340,9 @@ public static function feedbackPanel()
+
+
+
Date: Fri, 29 Mar 2024 11:21:51 +0200
Subject: [PATCH 6/6] Update the readme file and version numbers for the 1.0.2
release
---
readme.txt | 12 ++++++++----
resmushit.php | 6 +++---
resmushit.settings.php | 2 +-
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/readme.txt b/readme.txt
index ee25371..fa6ebb0 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,9 +3,9 @@ Contributors: ShortPixel, resmushit
Donate link: https://ko-fi.com/resmushit
Tags: image, optimizer, image optimization, smush, free image optimization
Requires at least: 4.0.0
-Tested up to: 6.4
+Tested up to: 6.5
Requires PHP: 5.6
-Stable tag: 1.0.1
+Stable tag: 1.0.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -85,14 +85,18 @@ Yes ! Absolutely free, the only restriction is that the images must not be large
= Where do I report security bugs found in this plugin? =
-Please report security bugs found in the source code of the reSmush.it Image Optimizer plugin through the [Patchstack Vulnerability Disclosure Program](https://patchs
-tack.com/database/vdp/resmushit-image-optimizer). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.
+Please report security bugs found in the source code of the reSmush.it Image Optimizer plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/resmushit-image-optimizer). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.
== Screenshots ==
1. The simple interface
== Changelog ==
+= 1.0.2 =
+Release date March 29, 2024
+* Fix: The new image size after compressing/restoring the image is now saved correctly in WordPress;
+* Tweak: Updated the settings page and added more support links and a "Rate Us" button;
+
= 1.0.1 =
Release date March 12, 2024
* Fix: A PHP Notice was displayed in the logs for certain settings;
diff --git a/resmushit.php b/resmushit.php
index fe894f2..4987d3a 100644
--- a/resmushit.php
+++ b/resmushit.php
@@ -10,8 +10,8 @@
* Plugin Name: reSmush.it Image Optimizer
* Plugin URI: https://wordpress.org/plugins/resmushit-image-optimizer/
* Description: 100% Free Image Optimizer and Compressor plugin. Fast JPEG/PNG and GIF compression.
- * Version: 1.0.1
- * Timestamp: 2024.03.12
+ * Version: 1.0.2
+ * Timestamp: 2024.03.29
* Author: reSmush.it
* Author URI: https://resmush.it
* Author: Charles Bourgeaux, ShortPixel
@@ -24,7 +24,7 @@
require('resmushit.inc.php');
-define( 'RESMUSH_PLUGIN_VERSION', '1.0.1');
+define( 'RESMUSH_PLUGIN_VERSION', '1.0.2');
define( 'RESMUSH_PLUGIN_FILE', __FILE__ );
define( 'RESMUSH_PLUGIN_PATH', plugin_dir_path(__FILE__) );
diff --git a/resmushit.settings.php b/resmushit.settings.php
index cd6a9f7..470840a 100644
--- a/resmushit.settings.php
+++ b/resmushit.settings.php
@@ -1,7 +1,7 @@