Lazy Load by WP Rocket - Version 2.1.4

Version Description

  • Regression fix: Correctly exclude scripts from lazyload again
Download this release

Release Info

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

Code changes from version 2.1.3 to 2.1.4

readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smili
4
  Requires at least: 4.7
5
  Tested up to: 5.1
6
  Requires PHP: 5.4
7
- Stable tag: 2.1.3
8
 
9
  Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
 
@@ -80,11 +80,14 @@ The plugin will automatically lazyload background-images set with a `style` attr
80
 
81
  You can also apply it manually. The element you want to apply lazyload on must have this specific markup:
82
 
83
- `<div class="rocket-lazyload-bg" data-bg="url(../img/image.jpg)"></div>`
84
 
85
- The element must have the class `rocket-lazyload-bg`, and a `data-bg` attribute, which value is the CSS url for the image.
86
 
87
  == Changelog ==
 
 
 
88
  = 2.1.3 =
89
  * Bugfix: Ignore content inside noscript tags to prevent modifying them and causing some display issues
90
 
4
  Requires at least: 4.7
5
  Tested up to: 5.1
6
  Requires PHP: 5.4
7
+ Stable tag: 2.1.4
8
 
9
  Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
 
80
 
81
  You can also apply it manually. The element you want to apply lazyload on must have this specific markup:
82
 
83
+ `<div class="rocket-lazyload" data-bg="url(../img/image.jpg)"></div>`
84
 
85
+ The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
 
87
  == Changelog ==
88
+ = 2.1.4 =
89
+ * Regression fix: Correctly exclude scripts from lazyload again
90
+
91
  = 2.1.3 =
92
  * Bugfix: Ignore content inside noscript tags to prevent modifying them and causing some display issues
93
 
rocket-lazy-load.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Lazy Load by WP Rocket
4
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
5
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6
- * Version: 2.1.3
7
  * Author: WP Rocket
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
@@ -29,7 +29,7 @@
29
 
30
  defined('ABSPATH') || die('Cheatin\' uh?');
31
 
32
- define('ROCKET_LL_VERSION', '2.1.3');
33
  define('ROCKET_LL_WP_VERSION', '4.7');
34
  define('ROCKET_LL_PHP_VERSION', '5.4');
35
  define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
3
  * Plugin Name: Lazy Load by WP Rocket
4
  * Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
5
  * Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
6
+ * Version: 2.1.4
7
  * Author: WP Rocket
8
  * Author URI: https://wp-rocket.me
9
  * Text Domain: rocket-lazy-load
29
 
30
  defined('ABSPATH') || die('Cheatin\' uh?');
31
 
32
+ define('ROCKET_LL_VERSION', '2.1.4');
33
  define('ROCKET_LL_WP_VERSION', '4.7');
34
  define('ROCKET_LL_PHP_VERSION', '5.4');
35
  define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
src/Subscriber/LazyloadSubscriber.php CHANGED
@@ -316,7 +316,7 @@ class LazyloadSubscriber implements SubscriberInterface
316
  public function lazyloadBuffer($html)
317
  {
318
  $buffer = $this->ignoreScripts($html);
319
- $buffer = $this->ignoreNoScripts($html);
320
 
321
  if ($this->option_array->get('images')) {
322
  $html = $this->image->lazyloadImages($html, $buffer);
@@ -400,7 +400,7 @@ class LazyloadSubscriber implements SubscriberInterface
400
  * @param string $html HTML content.
401
  * @return string
402
  */
403
- private function ignoreNoScripts($html)
404
  {
405
  return preg_replace('#<noscript>(?:.+)</noscript>#Umsi', '', $html);
406
  }
316
  public function lazyloadBuffer($html)
317
  {
318
  $buffer = $this->ignoreScripts($html);
319
+ $buffer = $this->ignoreNoscripts($buffer);
320
 
321
  if ($this->option_array->get('images')) {
322
  $html = $this->image->lazyloadImages($html, $buffer);
400
  * @param string $html HTML content.
401
  * @return string
402
  */
403
+ private function ignoreNoscripts($html)
404
  {
405
  return preg_replace('#<noscript>(?:.+)</noscript>#Umsi', '', $html);
406
  }