Smush Image Compression and Optimization - Version 2.0.6

Version Description

  • Fixed: Conflict with various themes while editing post and page
  • Fixed: Word Count not working
  • Fixed: Notice and Warnings
Download this release

Release Info

Developer UmeshSingla
Plugin Icon 128x128 Smush Image Compression and Optimization
Version 2.0.6
Comparing to
See all releases

Code changes from version 2.0.5 to 2.0.6

lib/class-wp-smush-admin.php CHANGED
@@ -185,6 +185,15 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
185
  * enqueue js and css
186
  */
187
  function enqueue() {
 
 
 
 
 
 
 
 
 
188
  wp_enqueue_script( 'wp-smushit-admin-js' );
189
  wp_enqueue_script( 'wp-smushit-admin-media-js' );
190
 
185
  * enqueue js and css
186
  */
187
  function enqueue() {
188
+ global $pagenow;
189
+ if ( $pagenow == 'post.php' ) {
190
+ //Do not load any style or js on post types other than attachment
191
+ $post_type = get_post_type();
192
+ if ( empty( $post_type ) || $post_type !== 'attachment' ) {
193
+ return;
194
+ }
195
+ }
196
+
197
  wp_enqueue_script( 'wp-smushit-admin-js' );
198
  wp_enqueue_script( 'wp-smushit-admin-media-js' );
199
 
lib/class-wp-smush-bulk.php CHANGED
@@ -28,6 +28,7 @@ if ( ! class_exists( 'WpSmushitBulk' ) ) {
28
  'post_type' => 'attachment',
29
  'post_status' => 'any',
30
  'post_mime_type' => array( 'image/jpeg', 'image/gif', 'image/png' ),
 
31
  'order' => 'DESC',
32
  'posts_per_page' => - 1,
33
  'meta_query' => array(
28
  'post_type' => 'attachment',
29
  'post_status' => 'any',
30
  'post_mime_type' => array( 'image/jpeg', 'image/gif', 'image/png' ),
31
+ 'orderby' => 'ID',
32
  'order' => 'DESC',
33
  'posts_per_page' => - 1,
34
  'meta_query' => array(
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === WP Smush ===
2
  Plugin Name: WP Smush
3
- Version: 2.0.5
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.5
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.
@@ -81,6 +81,12 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
81
 
82
  == Changelog ==
83
 
 
 
 
 
 
 
84
  = 2.0.5 =
85
 
86
  * New: Allow Super-smush for existing smushed images (Pro Only)
@@ -88,6 +94,7 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
88
  * Fixed: Fixed conflict with wp gallery link plugin in grid view
89
  * Fixed: Other small fixes
90
 
 
91
  = 2.0.4 =
92
  * Fix: Fatal error conflict with some plugins on fronted of site
93
 
1
  === WP Smush ===
2
  Plugin Name: WP Smush
3
+ Version: 2.0.6
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.6
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.
81
 
82
  == Changelog ==
83
 
84
+ = 2.0.6 =
85
+
86
+ * Fixed: Conflict with various themes while editing post and page
87
+ * Fixed: Word Count not working
88
+ * Fixed: Notice and Warnings
89
+
90
  = 2.0.5 =
91
 
92
  * New: Allow Super-smush for existing smushed images (Pro Only)
94
  * Fixed: Fixed conflict with wp gallery link plugin in grid view
95
  * Fixed: Other small fixes
96
 
97
+
98
  = 2.0.4 =
99
  * Fix: Fatal error conflict with some plugins on fronted of site
100
 
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.5
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.5';
40
  $smush_constatns = array(
41
  'VERSON' => $version,
42
  'BASENAME' => plugin_basename( __FILE__ ),
@@ -695,7 +695,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
695
 
696
  //IF current compression is lossy
697
  if ( ! empty( $wp_smush_data ) && ! empty( $wp_smush_data['stats'] ) ) {
698
- $lossy = $wp_smush_data['stats']['lossy'];
699
  $is_lossy = $lossy == 1 ? true : false;
700
  }
701
 
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.6
8
  Author URI: http://premium.wpmudev.org/
9
  Textdomain: wp_smush
10
  */
36
  * Constants
37
  */
38
  $prefix = 'WP_SMUSH_';
39
+ $version = '2.0.6';
40
  $smush_constatns = array(
41
  'VERSON' => $version,
42
  'BASENAME' => plugin_basename( __FILE__ ),
695
 
696
  //IF current compression is lossy
697
  if ( ! empty( $wp_smush_data ) && ! empty( $wp_smush_data['stats'] ) ) {
698
+ $lossy = !empty( $wp_smush_data['stats']['lossy'] ) ? $wp_smush_data['stats']['lossy'] : '';
699
  $is_lossy = $lossy == 1 ? true : false;
700
  }
701