Version Description
- Add Settings link to Plugin page
- Limit reSmush.it options to image attachments only
- Fix
RESMUSHIT_QLTY is not defined
Download this release
Release Info
Developer | resmushit |
Plugin | reSmush.it Image Optimizer |
Version | 0.1.23 |
Comparing to | |
See all releases |
Code changes from version 0.1.22 to 0.1.23
- classes/resmushit.class.php +6 -2
- readme.txt +9 -4
- resmushit.admin.php +4 -1
- resmushit.php +18 -3
- resmushit.settings.php +1 -1
classes/resmushit.class.php
CHANGED
@@ -31,10 +31,14 @@ Class reSmushit {
|
|
31 |
* @return bool TRUE if the resmush operation worked
|
32 |
*/
|
33 |
public static function getPictureQualitySetting() {
|
34 |
-
if(get_option( 'resmushit_qlty' ))
|
35 |
return get_option( 'resmushit_qlty' );
|
36 |
-
else
|
|
|
|
|
|
|
37 |
return RESMUSHIT_QLTY;
|
|
|
38 |
}
|
39 |
|
40 |
/**
|
31 |
* @return bool TRUE if the resmush operation worked
|
32 |
*/
|
33 |
public static function getPictureQualitySetting() {
|
34 |
+
if(get_option( 'resmushit_qlty' )) {
|
35 |
return get_option( 'resmushit_qlty' );
|
36 |
+
} else {
|
37 |
+
if (!defined('RESMUSHIT_QLTY')) {
|
38 |
+
return RESMUSHIT_DEFAULT_QLTY;
|
39 |
+
}
|
40 |
return RESMUSHIT_QLTY;
|
41 |
+
}
|
42 |
}
|
43 |
|
44 |
/**
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: resmushit
|
3 |
Tags: image, optimizer, image optimization, resmush.it, smush, jpg, png, gif, optimization, compression, Compress, Images, Pictures, Reduce Image Size, Smush, Smush.it
|
4 |
Requires at least: 4.0.0
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 0.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -14,7 +14,7 @@ Use reSmush.it Image Optimizer for FREE to optimize your pictures file sizes. Im
|
|
14 |
reSmush.it Image Optimizer allow to use **free Image optimization** based on [reSmush.it API](http://www.resmush.it/ "Image Optimization API, developped by Charles Bourgeaux"). reSmush.it provides image size reduction based on several advanced algorithms. The API accept JPG, PNG and GIF files up to **5MB**.
|
15 |
|
16 |
This plugin includes a bulk operation to optimize all your pictures in 2 clicks ! Change your image optimization level to fit your needs !
|
17 |
-
This service is used by more than **
|
18 |
|
19 |
The plugin includes an option to exclude some pictures of the optimizer.
|
20 |
|
@@ -34,7 +34,7 @@ This plugin has initially been developped by [Maecia Agency](http://www.maecia.c
|
|
34 |
|
35 |
= How great is reSmush.it ? =
|
36 |
|
37 |
-
Since we've optimized more than
|
38 |
|
39 |
= Is there an "Optimize on upload" feature ? =
|
40 |
|
@@ -66,6 +66,11 @@ Yes ! Absolutely free, the only restriction is to send images below 5MB.
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
= 0.1.22 =
|
70 |
* Fix on attachment metadata incorrectly returned (will fix issues with other media libraries)
|
71 |
|
2 |
Contributors: resmushit
|
3 |
Tags: image, optimizer, image optimization, resmush.it, smush, jpg, png, gif, optimization, compression, Compress, Images, Pictures, Reduce Image Size, Smush, Smush.it
|
4 |
Requires at least: 4.0.0
|
5 |
+
Tested up to: 5.3.1
|
6 |
+
Stable tag: 0.1.23
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
14 |
reSmush.it Image Optimizer allow to use **free Image optimization** based on [reSmush.it API](http://www.resmush.it/ "Image Optimization API, developped by Charles Bourgeaux"). reSmush.it provides image size reduction based on several advanced algorithms. The API accept JPG, PNG and GIF files up to **5MB**.
|
15 |
|
16 |
This plugin includes a bulk operation to optimize all your pictures in 2 clicks ! Change your image optimization level to fit your needs !
|
17 |
+
This service is used by more than **400,000** websites on different CMS (Wordpress, Drupal, Joomla, Magento, Prestashop...).
|
18 |
|
19 |
The plugin includes an option to exclude some pictures of the optimizer.
|
20 |
|
34 |
|
35 |
= How great is reSmush.it ? =
|
36 |
|
37 |
+
Since we've optimized more than 6,000,000,000 pictures, we've risen new skills. Our service is still in development to bring you new crazy functionalities.
|
38 |
|
39 |
= Is there an "Optimize on upload" feature ? =
|
40 |
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 0.1.23 =
|
70 |
+
* Add Settings link to Plugin page
|
71 |
+
* Limit reSmush.it options to image attachments only
|
72 |
+
* Fix `RESMUSHIT_QLTY is not defined`
|
73 |
+
|
74 |
= 0.1.22 =
|
75 |
* Fix on attachment metadata incorrectly returned (will fix issues with other media libraries)
|
76 |
|
resmushit.admin.php
CHANGED
@@ -60,6 +60,9 @@ add_action( 'manage_media_custom_column', 'resmushit_media_list_add_column_value
|
|
60 |
|
61 |
/* Add custom field to attachment */
|
62 |
function resmushit_image_attachment_add_status_button($form_fields, $post) {
|
|
|
|
|
|
|
63 |
$form_fields["rsmt-disabled-checkbox"] = array(
|
64 |
"label" => __("Disable of reSmush.it"),
|
65 |
"input" => "html",
|
@@ -121,4 +124,4 @@ function resmushit_register_plugin_assets(){
|
|
121 |
wp_register_script( 'resmushit-js', plugins_url( 'js/script.js', __FILE__ ) );
|
122 |
wp_enqueue_script( 'resmushit-js' );
|
123 |
}
|
124 |
-
add_action( 'admin_head', 'resmushit_register_plugin_assets' );
|
60 |
|
61 |
/* Add custom field to attachment */
|
62 |
function resmushit_image_attachment_add_status_button($form_fields, $post) {
|
63 |
+
if ( !preg_match("/image.*/", $post->post_mime_type) )
|
64 |
+
return $form_fields;
|
65 |
+
|
66 |
$form_fields["rsmt-disabled-checkbox"] = array(
|
67 |
"label" => __("Disable of reSmush.it"),
|
68 |
"input" => "html",
|
124 |
wp_register_script( 'resmushit-js', plugins_url( 'js/script.js', __FILE__ ) );
|
125 |
wp_enqueue_script( 'resmushit-js' );
|
126 |
}
|
127 |
+
add_action( 'admin_head', 'resmushit_register_plugin_assets' );
|
resmushit.php
CHANGED
@@ -10,8 +10,8 @@
|
|
10 |
* Plugin Name: reSmush.it Image Optimizer
|
11 |
* Plugin URI: https://resmush.it
|
12 |
* Description: Image Optimization API. Provides image size optimization
|
13 |
-
* Version: 0.1.
|
14 |
-
* Timestamp: 2019.
|
15 |
* Author: reSmush.it
|
16 |
* Author URI: https://resmush.it
|
17 |
* Author: Charles Bourgeaux
|
@@ -251,4 +251,19 @@ function resmushit_update_statistics() {
|
|
251 |
echo json_encode($output);
|
252 |
die();
|
253 |
}
|
254 |
-
add_action( 'wp_ajax_resmushit_update_statistics', 'resmushit_update_statistics' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
* Plugin Name: reSmush.it Image Optimizer
|
11 |
* Plugin URI: https://resmush.it
|
12 |
* Description: Image Optimization API. Provides image size optimization
|
13 |
+
* Version: 0.1.23
|
14 |
+
* Timestamp: 2019.12.16
|
15 |
* Author: reSmush.it
|
16 |
* Author URI: https://resmush.it
|
17 |
* Author: Charles Bourgeaux
|
251 |
echo json_encode($output);
|
252 |
die();
|
253 |
}
|
254 |
+
add_action( 'wp_ajax_resmushit_update_statistics', 'resmushit_update_statistics' );
|
255 |
+
|
256 |
+
|
257 |
+
|
258 |
+
|
259 |
+
|
260 |
+
/**
|
261 |
+
* add 'Settings' link to options page from Plugins
|
262 |
+
* @param array $links
|
263 |
+
* @return string
|
264 |
+
*/
|
265 |
+
function resmushit_add_plugin_page_settings_link($links) {
|
266 |
+
$links[] = '<a href="' . admin_url( 'upload.php?page=resmushit_options' ) . '">' . __('Settings') . '</a>';
|
267 |
+
return $links;
|
268 |
+
}
|
269 |
+
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'resmushit_add_plugin_page_settings_link');
|
resmushit.settings.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
|
4 |
define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
|
5 |
-
define('RESMUSHIT_VERSION', '0.1.
|
6 |
define('RESMUSHIT_DEFAULT_QLTY', '92');
|
7 |
define('RESMUSHIT_TIMEOUT', '10');
|
8 |
define('RESMUSHIT_LOGS_PATH', 'resmushit.log');
|
2 |
|
3 |
|
4 |
define('RESMUSHIT_ENDPOINT', 'http://api.resmush.it/');
|
5 |
+
define('RESMUSHIT_VERSION', '0.1.23');
|
6 |
define('RESMUSHIT_DEFAULT_QLTY', '92');
|
7 |
define('RESMUSHIT_TIMEOUT', '10');
|
8 |
define('RESMUSHIT_LOGS_PATH', 'resmushit.log');
|