Version Description
Download this release
Release Info
Developer | optimole |
Plugin | Image optimization & Lazy Load by Optimole |
Version | 2.5.3 |
Comparing to | |
See all releases |
Code changes from version 2.5.2 to 2.5.3
- CHANGELOG.md +4 -0
- inc/admin.php +1 -1
- inc/manager.php +3 -0
- optimole-wp.php +2 -2
- readme.txt +7 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +1 -1
CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.5.2](https://github.com/Codeinwp/optimole-wp/compare/v2.5.1...v2.5.2) (2020-09-02)
|
2 |
|
3 |
* Improve compatibility with various plugins for the video lazyload functionality
|
1 |
+
##### [Version 2.5.3](https://github.com/Codeinwp/optimole-wp/compare/v2.5.2...v2.5.3) (2020-09-07)
|
2 |
+
|
3 |
+
* Improve compatibility with native lazyload from WP 5.5
|
4 |
+
|
5 |
##### [Version 2.5.2](https://github.com/Codeinwp/optimole-wp/compare/v2.5.1...v2.5.2) (2020-09-02)
|
6 |
|
7 |
* Improve compatibility with various plugins for the video lazyload functionality
|
inc/admin.php
CHANGED
@@ -227,7 +227,7 @@ class Optml_Admin {
|
|
227 |
}(window, document));
|
228 |
document.addEventListener( "DOMContentLoaded", function() {
|
229 |
document.body.className = document.body.className.replace("optimole-no-script","");
|
230 |
-
if ( "loading" in HTMLImageElement.prototype ) {
|
231 |
const images = document.querySelectorAll(\'img[loading="lazy"]\');
|
232 |
images.forEach(img => {
|
233 |
if ( !img.dataset.optSrc) {
|
227 |
}(window, document));
|
228 |
document.addEventListener( "DOMContentLoaded", function() {
|
229 |
document.body.className = document.body.className.replace("optimole-no-script","");
|
230 |
+
if ( "loading" in HTMLImageElement.prototype && Object.prototype.hasOwnProperty.call( optimoleData, "nativeLazyload" ) && optimoleData.nativeLazyload === true ) {
|
231 |
const images = document.querySelectorAll(\'img[loading="lazy"]\');
|
232 |
images.forEach(img => {
|
233 |
if ( !img.dataset.optSrc) {
|
inc/manager.php
CHANGED
@@ -231,6 +231,9 @@ final class Optml_Manager {
|
|
231 |
public function register_hooks() {
|
232 |
|
233 |
do_action( 'optml_replacer_setup' );
|
|
|
|
|
|
|
234 |
add_filter( 'the_content', array( $this, 'process_images_from_content' ), PHP_INT_MAX );
|
235 |
/**
|
236 |
* When we have to process cdn images, i.e MIRROR is defined,
|
231 |
public function register_hooks() {
|
232 |
|
233 |
do_action( 'optml_replacer_setup' );
|
234 |
+
if ( $this->settings->get( 'native_lazyload' ) === 'disabled' ) {
|
235 |
+
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
|
236 |
+
}
|
237 |
add_filter( 'the_content', array( $this, 'process_images_from_content' ), PHP_INT_MAX );
|
238 |
/**
|
239 |
* When we have to process cdn images, i.e MIRROR is defined,
|
optimole-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Image optimization service by Optimole
|
4 |
* Description: Complete handling of your website images.
|
5 |
-
* Version: 2.5.
|
6 |
* Author: Optimole
|
7 |
* Author URI: https://optimole.com
|
8 |
* License: GPL-2.0+
|
@@ -77,7 +77,7 @@ function optml() {
|
|
77 |
define( 'OPTML_JS_CDN', 'd5jmkjjpb7yfg.cloudfront.net' );
|
78 |
}
|
79 |
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
|
80 |
-
define( 'OPTML_VERSION', '2.5.
|
81 |
define( 'OPTML_NAMESPACE', 'optml' );
|
82 |
define( 'OPTML_BASEFILE', __FILE__ );
|
83 |
// Fallback for old PHP versions when this constant is not defined.
|
2 |
/**
|
3 |
* Plugin Name: Image optimization service by Optimole
|
4 |
* Description: Complete handling of your website images.
|
5 |
+
* Version: 2.5.3
|
6 |
* Author: Optimole
|
7 |
* Author URI: https://optimole.com
|
8 |
* License: GPL-2.0+
|
77 |
define( 'OPTML_JS_CDN', 'd5jmkjjpb7yfg.cloudfront.net' );
|
78 |
}
|
79 |
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
|
80 |
+
define( 'OPTML_VERSION', '2.5.3' );
|
81 |
define( 'OPTML_NAMESPACE', 'optml' );
|
82 |
define( 'OPTML_BASEFILE', __FILE__ );
|
83 |
// Fallback for old PHP versions when this constant is not defined.
|
readme.txt
CHANGED
@@ -89,6 +89,13 @@ Premium users will be able to optimize images for more than 25k monthly active u
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
##### [Version 2.5.2](https://github.com/Codeinwp/optimole-wp/compare/v2.5.1...v2.5.2) (2020-09-02)
|
93 |
|
94 |
* Improve compatibility with various plugins for the video lazyload functionality
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
##### [Version 2.5.3](https://github.com/Codeinwp/optimole-wp/compare/v2.5.2...v2.5.3) (2020-09-07)
|
93 |
+
|
94 |
+
* Improve compatibility with native lazyload from WP 5.5
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
##### [Version 2.5.2](https://github.com/Codeinwp/optimole-wp/compare/v2.5.1...v2.5.2) (2020-09-02)
|
100 |
|
101 |
* Improve compatibility with various plugins for the video lazyload functionality
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9475fb7b928b2065c785a22b7217ea56::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit2c5f0875545c80f9422c7bcbc9139b53
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit2c5f0875545c80f9422c7bcbc9139b53
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9475fb7b928b2065c785a22b7217ea56
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit9475fb7b928b2065c785a22b7217ea56', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9475fb7b928b2065c785a22b7217ea56', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit9475fb7b928b2065c785a22b7217ea56::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit9475fb7b928b2065c785a22b7217ea56::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire9475fb7b928b2065c785a22b7217ea56($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire9475fb7b928b2065c785a22b7217ea56($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'9fef4034ed73e26a337d9856ea126f7f' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit9475fb7b928b2065c785a22b7217ea56
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'9fef4034ed73e26a337d9856ea126f7f' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|