Version Description
Download this release
Release Info
Developer | optimole |
Plugin | Image optimization & Lazy Load by Optimole |
Version | 3.4.1 |
Comparing to | |
See all releases |
Code changes from version 3.4.0 to 3.4.1
- CHANGELOG.md +4 -0
- inc/admin.php +18 -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 +2 -2
CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
#### [Version 3.4.0](https://github.com/Codeinwp/optimole-wp/compare/v3.3.5...v3.4.0) (2022-04-18)
|
2 |
|
3 |
* Adds Machine Learning(ML) quality compression which will predict the right quality for your image in order to get the smallest possible size with minimum perceived quality losses, delivering images with ~40% smaller size than the current solution.
|
1 |
+
##### [Version 3.4.1](https://github.com/Codeinwp/optimole-wp/compare/v3.4.0...v3.4.1) (2022-05-10)
|
2 |
+
|
3 |
+
* Auto allow domain when the website URL is being changed, such as moving from production -> staging or viceversa
|
4 |
+
|
5 |
#### [Version 3.4.0](https://github.com/Codeinwp/optimole-wp/compare/v3.3.5...v3.4.0) (2022-04-18)
|
6 |
|
7 |
* Adds Machine Learning(ML) quality compression which will predict the right quality for your image in order to get the smallest possible size with minimum perceived quality losses, delivering images with ~40% smaller size than the current solution.
|
inc/admin.php
CHANGED
@@ -34,6 +34,10 @@ class Optml_Admin {
|
|
34 |
add_action( 'admin_notices', [ $this, 'add_notice_upgrade' ] );
|
35 |
add_filter( 'admin_body_class', [ $this, 'add_body_class' ] );
|
36 |
add_action( 'optml_daily_sync', [ $this, 'daily_sync' ] );
|
|
|
|
|
|
|
|
|
37 |
add_action( 'admin_init', [ $this, 'maybe_redirect' ] );
|
38 |
if ( ! is_admin() && $this->settings->is_connected() && ! wp_next_scheduled( 'optml_daily_sync' ) ) {
|
39 |
wp_schedule_event( time() + 10, 'daily', 'optml_daily_sync', [] );
|
@@ -42,6 +46,20 @@ class Optml_Admin {
|
|
42 |
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
* Adds Optimole tag to admin bar
|
47 |
*/
|
34 |
add_action( 'admin_notices', [ $this, 'add_notice_upgrade' ] );
|
35 |
add_filter( 'admin_body_class', [ $this, 'add_body_class' ] );
|
36 |
add_action( 'optml_daily_sync', [ $this, 'daily_sync' ] );
|
37 |
+
|
38 |
+
if ( $this->settings->is_connected() ) {
|
39 |
+
add_action( 'init', [$this, 'check_domain_change'] );
|
40 |
+
}
|
41 |
add_action( 'admin_init', [ $this, 'maybe_redirect' ] );
|
42 |
if ( ! is_admin() && $this->settings->is_connected() && ! wp_next_scheduled( 'optml_daily_sync' ) ) {
|
43 |
wp_schedule_event( time() + 10, 'daily', 'optml_daily_sync', [] );
|
46 |
|
47 |
}
|
48 |
|
49 |
+
/**
|
50 |
+
* Checks if domain has changed
|
51 |
+
*/
|
52 |
+
public function check_domain_change() {
|
53 |
+
$previous_domain = get_option( 'optml_current_domain', 0 );
|
54 |
+
$site_url = base64_encode( get_home_url() );
|
55 |
+
|
56 |
+
if ( $site_url !== $previous_domain ) {
|
57 |
+
update_option( 'optml_current_domain', $site_url );
|
58 |
+
if ( $previous_domain !== 0 ) {
|
59 |
+
$this->daily_sync();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
/**
|
64 |
* Adds Optimole tag to admin bar
|
65 |
*/
|
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: 3.4.
|
6 |
* Author: Optimole
|
7 |
* Author URI: https://optimole.com
|
8 |
* License: GPL-2.0+
|
@@ -74,7 +74,7 @@ function optml() {
|
|
74 |
}
|
75 |
define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
|
76 |
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
|
77 |
-
define( 'OPTML_VERSION', '3.4.
|
78 |
define( 'OPTML_NAMESPACE', 'optml' );
|
79 |
define( 'OPTML_BASEFILE', __FILE__ );
|
80 |
// 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: 3.4.1
|
6 |
* Author: Optimole
|
7 |
* Author URI: https://optimole.com
|
8 |
* License: GPL-2.0+
|
74 |
}
|
75 |
define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
|
76 |
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
|
77 |
+
define( 'OPTML_VERSION', '3.4.1' );
|
78 |
define( 'OPTML_NAMESPACE', 'optml' );
|
79 |
define( 'OPTML_BASEFILE', __FILE__ );
|
80 |
// Fallback for old PHP versions when this constant is not defined.
|
readme.txt
CHANGED
@@ -94,6 +94,13 @@ Premium users will be able to optimize images starting with more than 25k monthl
|
|
94 |
|
95 |
== Changelog ==
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
#### [Version 3.4.0](https://github.com/Codeinwp/optimole-wp/compare/v3.3.5...v3.4.0) (2022-04-18)
|
98 |
|
99 |
* Adds Machine Learning(ML) quality compression which will predict the right quality for your image in order to get the smallest possible size with minimum perceived quality losses, delivering images with ~40% smaller size than the current solution.
|
94 |
|
95 |
== Changelog ==
|
96 |
|
97 |
+
##### [Version 3.4.1](https://github.com/Codeinwp/optimole-wp/compare/v3.4.0...v3.4.1) (2022-05-10)
|
98 |
+
|
99 |
+
* Auto allow domain when the website URL is being changed, such as moving from production -> staging or viceversa
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
#### [Version 3.4.0](https://github.com/Codeinwp/optimole-wp/compare/v3.3.5...v3.4.0) (2022-04-18)
|
105 |
|
106 |
* Adds Machine Learning(ML) quality compression which will predict the right quality for your image in order to get the smallest possible size with minimum perceived quality losses, delivering images with ~40% smaller size than the current solution.
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428::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,18 +22,18 @@ class ComposerAutoloaderInit7420590d0274e46c311d56316a38f2b8
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
-
$includeFiles = \Composer\Autoload\
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
return $loader;
|
@@ -45,7 +45,7 @@ class ComposerAutoloaderInit7420590d0274e46c311d56316a38f2b8
|
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
-
function
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428', 'loadClassLoader'));
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInited7ede7b34e86089b2953277e80ec428::getInitializer($loader));
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInited7ede7b34e86089b2953277e80ec428::$files;
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
+
composerRequireed7ede7b34e86089b2953277e80ec428($fileIdentifier, $file);
|
37 |
}
|
38 |
|
39 |
return $loader;
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
+
function composerRequireed7ede7b34e86089b2953277e80ec428($fileIdentifier, $file)
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
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',
|
@@ -17,7 +17,7 @@ class ComposerStaticInit7420590d0274e46c311d56316a38f2b8
|
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
-
$loader->classMap =
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInited7ede7b34e86089b2953277e80ec428
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'9fef4034ed73e26a337d9856ea126f7f' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
+
$loader->classMap = ComposerStaticInited7ede7b34e86089b2953277e80ec428::$classMap;
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|