Lazy Load by WP Rocket - Version 1.3.2

Version Description

*2017-09-12 * Fix images not displaying in certain conditions because image attributes exclusion was not working correctly

Download this release

Release Info

Developer wp_media
Plugin Icon 128x128 Lazy Load by WP Rocket
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

Files changed (2) hide show
  1. readme.txt +5 -1
  2. rocket-lazy-load.php +13 -3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: creativejuiz, tabrisrp, wp_media
3
  Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar
4
  Requires at least: 3.0
5
  Tested up to: 4.8.1
6
- Stable tag: 1.3.1
7
 
8
  The tiny Lazy Load script for WordPress without jQuery, works for images and iframes.
9
 
@@ -50,6 +50,10 @@ You can also use the filters `rocket_lazyload_excluded_attributes` or `rocket_la
50
  Some plugins are not compatible without lazy loading. Please open a support thread, and we will see how we can solve the issue by excluding lazy loading for this plugin.
51
 
52
  == Changelog ==
 
 
 
 
53
  = 1.3.1 =
54
  * 2017-09-07
55
  * Don't apply lazyload on Divi slider
3
  Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar
4
  Requires at least: 3.0
5
  Tested up to: 4.8.1
6
+ Stable tag: 1.3.2
7
 
8
  The tiny Lazy Load script for WordPress without jQuery, works for images and iframes.
9
 
50
  Some plugins are not compatible without lazy loading. Please open a support thread, and we will see how we can solve the issue by excluding lazy loading for this plugin.
51
 
52
  == Changelog ==
53
+ = 1.3.2 =
54
+ *2017-09-12
55
+ * Fix images not displaying in certain conditions because image attributes exclusion was not working correctly
56
+
57
  = 1.3.1 =
58
  * 2017-09-07
59
  * Don't apply lazyload on Divi slider
rocket-lazy-load.php CHANGED
@@ -5,7 +5,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
5
  * Plugin Name: Rocket Lazy Load
6
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
7
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
8
- * Version: 1.3.1
9
  * Requires PHP: 5.4
10
  * Author: WP Media
11
  * Author URI: https://wp-rocket.me
@@ -27,7 +27,7 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
27
  * You should have received a copy of the GNU General Public License
28
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
29
  */
30
- define( 'ROCKET_LL_VERSION', '1.3.1' );
31
  define( 'ROCKET_LL_PATH', realpath( plugin_dir_path( __FILE__ ) ) . '/' );
32
  define( 'ROCKET_LL_3RD_PARTY_PATH', ROCKET_LL_PATH . '3rd-party/' );
33
  define( 'ROCKET_LL_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets/' );
@@ -298,7 +298,17 @@ function rocket_is_excluded_lazyload( $attributes ) {
298
  'timthumb.php?src',
299
  ) );
300
 
301
- if ( array_intersect( $attributes, $excluded_attributes, $excluded_classes, $excluded_src ) ) {
 
 
 
 
 
 
 
 
 
 
302
  return true;
303
  }
304
 
5
  * Plugin Name: Rocket Lazy Load
6
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
7
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
8
+ * Version: 1.3.2
9
  * Requires PHP: 5.4
10
  * Author: WP Media
11
  * Author URI: https://wp-rocket.me
27
  * You should have received a copy of the GNU General Public License
28
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
29
  */
30
+ define( 'ROCKET_LL_VERSION', '1.3.2' );
31
  define( 'ROCKET_LL_PATH', realpath( plugin_dir_path( __FILE__ ) ) . '/' );
32
  define( 'ROCKET_LL_3RD_PARTY_PATH', ROCKET_LL_PATH . '3rd-party/' );
33
  define( 'ROCKET_LL_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets/' );
298
  'timthumb.php?src',
299
  ) );
300
 
301
+ $attributes = array_flip( $attributes );
302
+
303
+ if ( array_intersect( $attributes, $excluded_attributes ) ) {
304
+ return true;
305
+ }
306
+
307
+ if ( array_intersect( $attributes, $excluded_classes ) ) {
308
+ return true;
309
+ }
310
+
311
+ if ( array_intersect( $attributes, $excluded_src ) ) {
312
  return true;
313
  }
314