Version Description
- Fix: Fatal error conflict with some plugins on fronted of site
Download this release
Release Info
Developer | WPMUDEV |
Plugin | Smush Image Compression and Optimization |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- assets/css/wp-smushit-admin.css +1 -1
- lib/class-wp-smush-admin.php +16 -6
- readme.txt +10 -8
- wp-smush.php +4 -8
- wp-smushit.php +0 -3
assets/css/wp-smushit-admin.css
CHANGED
@@ -501,7 +501,7 @@ input#wp-smush-save-settings {
|
|
501 |
}
|
502 |
|
503 |
.inactive .wp-smush-setting-row {
|
504 |
-
opacity: .
|
505 |
}
|
506 |
|
507 |
.inactive-anim {
|
501 |
}
|
502 |
|
503 |
.inactive .wp-smush-setting-row {
|
504 |
+
opacity: .75;
|
505 |
}
|
506 |
|
507 |
.inactive-anim {
|
lib/class-wp-smush-admin.php
CHANGED
@@ -80,9 +80,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
80 |
/// Smush Upgrade
|
81 |
add_action( 'admin_notices', array( $this, 'smush_upgrade' ) );
|
82 |
|
83 |
-
|
84 |
-
$this->smushed_count = $this->smushed_count();
|
85 |
-
$this->stats = $this->global_stats();
|
86 |
|
87 |
$this->init_settings();
|
88 |
|
@@ -212,10 +210,20 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
212 |
);
|
213 |
}
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
/**
|
216 |
* Display the ui
|
217 |
*/
|
218 |
function ui() {
|
|
|
219 |
?>
|
220 |
<div class="wrap">
|
221 |
|
@@ -354,7 +362,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
354 |
if ( ! $this->is_premium() ) {
|
355 |
?>
|
356 |
<div class="pro-note">
|
357 |
-
<div style="padding:14px 0 14px;">Pro feature only. <a href="
|
358 |
</div>
|
359 |
<?php
|
360 |
}
|
@@ -609,9 +617,11 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
609 |
|
610 |
$smush = $WpSmush->resize_from_meta_data( $original_meta, $attachment_id, false );
|
611 |
|
612 |
-
$
|
|
|
|
|
613 |
|
614 |
-
$stats['smushed'] = $this->smushed_count
|
615 |
$stats['total'] = $this->total_count;
|
616 |
|
617 |
if ( is_wp_error( $smush ) ) {
|
80 |
/// Smush Upgrade
|
81 |
add_action( 'admin_notices', array( $this, 'smush_upgrade' ) );
|
82 |
|
83 |
+
|
|
|
|
|
84 |
|
85 |
$this->init_settings();
|
86 |
|
210 |
);
|
211 |
}
|
212 |
|
213 |
+
/**
|
214 |
+
* Runs the expensive queries to get our global smush stats
|
215 |
+
*/
|
216 |
+
function setup_global_stats() {
|
217 |
+
$this->total_count = $this->total_count();
|
218 |
+
$this->smushed_count = $this->smushed_count();
|
219 |
+
$this->stats = $this->global_stats();
|
220 |
+
}
|
221 |
+
|
222 |
/**
|
223 |
* Display the ui
|
224 |
*/
|
225 |
function ui() {
|
226 |
+
$this->setup_global_stats();
|
227 |
?>
|
228 |
<div class="wrap">
|
229 |
|
362 |
if ( ! $this->is_premium() ) {
|
363 |
?>
|
364 |
<div class="pro-note">
|
365 |
+
<div style="padding:14px 0 14px;">Pro feature only. <a href="<?php echo $this->upgrade_url; ?>" target="_blank">Find out more »</a></div>
|
366 |
</div>
|
367 |
<?php
|
368 |
}
|
617 |
|
618 |
$smush = $WpSmush->resize_from_meta_data( $original_meta, $attachment_id, false );
|
619 |
|
620 |
+
$this->setup_global_stats();
|
621 |
+
|
622 |
+
$stats = $this->stats;
|
623 |
|
624 |
+
$stats['smushed'] = $this->smushed_count;
|
625 |
$stats['total'] = $this->total_count;
|
626 |
|
627 |
if ( is_wp_error( $smush ) ) {
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== WP Smush ===
|
2 |
Plugin Name: WP Smush
|
3 |
-
Version: 2.0.
|
4 |
Author: WPMU DEV
|
5 |
Author URI: http://premium.wpmudev.org/
|
6 |
-
Contributors: WPMUDEV, alexdunae
|
7 |
Tags: Attachment,Attachments,Compress,Compress Image File,Compress Image Size,Compress JPG,Compressed JPG, Compression Image,Image,Images,JPG,Optimise,Optimize,Photo,Photos,Pictures,PNG,Reduce Image Size,Smush,Smush.it,Upload,WordPress Compression,WordPress Image Tool,Yahoo, Yahoo Smush.it
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 4.2
|
10 |
-
Stable tag: 2.0.
|
11 |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
12 |
|
13 |
Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
|
@@ -15,16 +15,15 @@ Reduce image file sizes, improve performance and boost your SEO using the free <
|
|
15 |
== Description ==
|
16 |
|
17 |
<blockquote>
|
18 |
-
<
|
19 |
<br />
|
20 |
-
|
21 |
-
|
22 |
-
Try now for a completely new, incredibly powerful and 100% free images smushing process, brought to you by the team at WPMU DEV!
|
23 |
</blockquote>
|
24 |
|
25 |
WP Smush strips hidden, bulky information from your images, reducing the file size without losing quality. The faster your site loads, the more Google, Bing, Yahoo and other search engines will like it.
|
26 |
|
27 |
-
[youtube https://www.youtube.com/watch?v=
|
28 |
|
29 |
Heavy image files may be slowing down your site without you even knowing it. WP Smush meticulously scans every image you upload – or have already added to your site – and cuts all the unnecessary data for you.
|
30 |
|
@@ -82,6 +81,9 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
|
|
82 |
|
83 |
== Changelog ==
|
84 |
|
|
|
|
|
|
|
85 |
= 2.0.3 =
|
86 |
* Fixed (Important Update) - Image being corrupted while regenerating thumbnails
|
87 |
|
1 |
=== WP Smush ===
|
2 |
Plugin Name: WP Smush
|
3 |
+
Version: 2.0.4
|
4 |
Author: WPMU DEV
|
5 |
Author URI: http://premium.wpmudev.org/
|
6 |
+
Contributors: WPMUDEV, alexdunae
|
7 |
Tags: Attachment,Attachments,Compress,Compress Image File,Compress Image Size,Compress JPG,Compressed JPG, Compression Image,Image,Images,JPG,Optimise,Optimize,Photo,Photos,Pictures,PNG,Reduce Image Size,Smush,Smush.it,Upload,WordPress Compression,WordPress Image Tool,Yahoo, Yahoo Smush.it
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 4.2
|
10 |
+
Stable tag: 2.0.4
|
11 |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
12 |
|
13 |
Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
|
15 |
== Description ==
|
16 |
|
17 |
<blockquote>
|
18 |
+
<h4>All new massively improved smushing!</h4>
|
19 |
<br />
|
20 |
+
Try now for a completely new, incredibly powerful, and 100% free image smushing process, brought to you by the team at WPMU DEV!
|
21 |
+
<br>
|
|
|
22 |
</blockquote>
|
23 |
|
24 |
WP Smush strips hidden, bulky information from your images, reducing the file size without losing quality. The faster your site loads, the more Google, Bing, Yahoo and other search engines will like it.
|
25 |
|
26 |
+
[youtube https://www.youtube.com/watch?v=GCzH7z05s5U]
|
27 |
|
28 |
Heavy image files may be slowing down your site without you even knowing it. WP Smush meticulously scans every image you upload – or have already added to your site – and cuts all the unnecessary data for you.
|
29 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 2.0.4 =
|
85 |
+
* Fix: Fatal error conflict with some plugins on fronted of site
|
86 |
+
|
87 |
= 2.0.3 =
|
88 |
* Fixed (Important Update) - Image being corrupted while regenerating thumbnails
|
89 |
|
wp-smush.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Smush
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
|
5 |
Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
|
6 |
Author: WPMU DEV
|
7 |
-
Version: 2.0.
|
8 |
Author URI: http://premium.wpmudev.org/
|
9 |
Textdomain: wp_smush
|
10 |
*/
|
@@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
36 |
* Constants
|
37 |
*/
|
38 |
$prefix = 'WP_SMUSH_';
|
39 |
-
$version = '2.0.
|
40 |
$smush_constatns = array(
|
41 |
'VERSON' => $version,
|
42 |
'BASENAME' => plugin_basename( __FILE__ ),
|
@@ -58,7 +58,7 @@ foreach ( $smush_constatns as $const_name => $constant_val ) {
|
|
58 |
}
|
59 |
}
|
60 |
|
61 |
-
require_once WP_SMUSH_DIR . "
|
62 |
|
63 |
if ( ! class_exists( 'WpSmush' ) ) {
|
64 |
|
@@ -357,19 +357,15 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
357 |
|
358 |
$has_errors = (bool) count( $errors->get_error_messages() );
|
359 |
|
360 |
-
//Store stats
|
361 |
-
|
362 |
list( $stats['stats']['size_before'], $stats['stats']['size_after'], $stats['stats']['time'], $stats['stats']['percent'], $stats['stats']['bytes'] ) =
|
363 |
array( $size_before, $size_after, $total_time, $compression, $bytes_saved );
|
364 |
|
365 |
-
|
366 |
//Set smush status for all the images, store it in wp-smpro-smush-data
|
367 |
if ( ! $has_errors ) {
|
368 |
update_post_meta( $ID, self::SMUSHED_META_KEY, $stats );
|
369 |
}
|
370 |
|
371 |
-
|
372 |
-
return $has_errors ? $errors : $stats['stats'];
|
373 |
}
|
374 |
|
375 |
/**
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
|
5 |
Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
|
6 |
Author: WPMU DEV
|
7 |
+
Version: 2.0.4
|
8 |
Author URI: http://premium.wpmudev.org/
|
9 |
Textdomain: wp_smush
|
10 |
*/
|
36 |
* Constants
|
37 |
*/
|
38 |
$prefix = 'WP_SMUSH_';
|
39 |
+
$version = '2.0.4';
|
40 |
$smush_constatns = array(
|
41 |
'VERSON' => $version,
|
42 |
'BASENAME' => plugin_basename( __FILE__ ),
|
58 |
}
|
59 |
}
|
60 |
|
61 |
+
require_once WP_SMUSH_DIR . "lib/class-wp-smush-migrate.php";
|
62 |
|
63 |
if ( ! class_exists( 'WpSmush' ) ) {
|
64 |
|
357 |
|
358 |
$has_errors = (bool) count( $errors->get_error_messages() );
|
359 |
|
|
|
|
|
360 |
list( $stats['stats']['size_before'], $stats['stats']['size_after'], $stats['stats']['time'], $stats['stats']['percent'], $stats['stats']['bytes'] ) =
|
361 |
array( $size_before, $size_after, $total_time, $compression, $bytes_saved );
|
362 |
|
|
|
363 |
//Set smush status for all the images, store it in wp-smpro-smush-data
|
364 |
if ( ! $has_errors ) {
|
365 |
update_post_meta( $ID, self::SMUSHED_META_KEY, $stats );
|
366 |
}
|
367 |
|
368 |
+
return $meta;
|
|
|
369 |
}
|
370 |
|
371 |
/**
|
wp-smushit.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* simply for backwards compatibility with old installs that have this filename activated */
|
3 |
-
require_once( 'wp-smush.php' );
|
|
|
|
|
|