Image optimization & Lazy Load by Optimole - Version 3.4.2

Version Description

Download this release

Release Info

Developer optimole
Plugin Icon 128x128 Image optimization & Lazy Load by Optimole
Version 3.4.2
Comparing to
See all releases

Code changes from version 3.4.1 to 3.4.2

CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
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
1
+ ##### [Version 3.4.2](https://github.com/Codeinwp/optimole-wp/compare/v3.4.1...v3.4.2) (2022-05-25)
2
+
3
+ Fix edge cases for auto allowing domain on site migration.
4
+
5
  ##### [Version 3.4.1](https://github.com/Codeinwp/optimole-wp/compare/v3.4.0...v3.4.1) (2022-05-10)
6
 
7
  * Auto allow domain when the website URL is being changed, such as moving from production -> staging or viceversa
inc/admin.php CHANGED
@@ -14,7 +14,7 @@
14
  * Class Optml_Admin
15
  */
16
  class Optml_Admin {
17
-
18
  /**
19
  * Hold the settings object.
20
  *
@@ -51,7 +51,7 @@ class Optml_Admin {
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 );
14
  * Class Optml_Admin
15
  */
16
  class Optml_Admin {
17
+ use Optml_Normalizer;
18
  /**
19
  * Hold the settings object.
20
  *
51
  */
52
  public function check_domain_change() {
53
  $previous_domain = get_option( 'optml_current_domain', 0 );
54
+ $site_url = $this->to_domain_hash( get_home_url() );
55
 
56
  if ( $site_url !== $previous_domain ) {
57
  update_option( 'optml_current_domain', $site_url );
inc/traits/normalizer.php CHANGED
@@ -27,6 +27,23 @@ trait Optml_Normalizer {
27
  return boolval( $value );
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Strip slashes on unicode encoded strings.
32
  *
27
  return boolval( $value );
28
  }
29
 
30
+ /**
31
+ * Return domain hash.
32
+ *
33
+ * @param string $domain Full url.
34
+ *
35
+ * @return string Domain hash.
36
+ */
37
+ public function to_domain_hash( $domain ) {
38
+ $domain_parts = parse_url( $domain );
39
+ $domain = isset( $domain_parts['host'] ) ? $domain_parts['host'] : '';
40
+ $prefix = substr( $domain, 0, 4 );
41
+ if ( $prefix === 'www.' ) {
42
+ $domain = substr( $domain, 4 );
43
+ }
44
+
45
+ return base64_encode( $domain );
46
+ }
47
  /**
48
  * Strip slashes on unicode encoded strings.
49
  *
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.1
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.1' );
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.2
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.2' );
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
@@ -17,6 +17,7 @@ Automatically compress, optimize and serve scaled images along with next-gen Web
17
  > * Fully automated; [set and forget](https://docs.optimole.com/article/1173-how-to-get-started-with-optimole-in-just-3-steps)
18
  > * Supports all image types
19
  > * Supports both Retina and WebP images
 
20
  > * AVIF format support for lower image size
21
  > * Cloud image library support
22
  > * Serves images from a global CDN for free
@@ -44,13 +45,13 @@ With the basic plan, you will be able to optimize unmetered number of images for
44
  Better yet. The free version is fully functional and includes all of the following great features:
45
 
46
  **Format Based Optimization**
47
- Our cloud-based transformation process means we can optimize images based on the format as well as serve images in next-gen formats. If your visitor is using a WebP capable browser, then Optimole will convert to WebP the image and send it to their device.
48
 
49
  **Cloud Library support**
50
  Offload your website images directly to Optimole Cloud and save storage space on your server. Cross share images between your all your websites connected to Optimole.
51
 
52
  **Image Optimization**
53
- Our algorithms crunch the numbers to provide the best lossy or lossless optimization for the best-looking image at the smallest size.
54
 
55
  **Exact Used Size**
56
  Optimole will use just one image and resize it delivering a responsive image to fit perfectly on your visitors' devices. No more awkward guesses at potential screen widths. Serve scaled images instantly.
@@ -94,6 +95,13 @@ Premium users will be able to optimize images starting with more than 25k monthl
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
17
  > * Fully automated; [set and forget](https://docs.optimole.com/article/1173-how-to-get-started-with-optimole-in-just-3-steps)
18
  > * Supports all image types
19
  > * Supports both Retina and WebP images
20
+ > * Machine Learning(ML) powered automatic compression
21
  > * AVIF format support for lower image size
22
  > * Cloud image library support
23
  > * Serves images from a global CDN for free
45
  Better yet. The free version is fully functional and includes all of the following great features:
46
 
47
  **Format Based Optimization**
48
+ Our cloud-based transformation process means we can optimize images based on the format as well as serve images in next-gen formats. If your visitor is using a WebP capable browser, then Optimole will convert to WebP the image and send it to their device. AVIF support included.
49
 
50
  **Cloud Library support**
51
  Offload your website images directly to Optimole Cloud and save storage space on your server. Cross share images between your all your websites connected to Optimole.
52
 
53
  **Image Optimization**
54
+ Our algorithms crunch the numbers to provide the best lossy or lossless optimization for the best-looking image at the smallest size using Machine Learning(ML) powered compression.
55
 
56
  **Exact Used Size**
57
  Optimole will use just one image and resize it delivering a responsive image to fit perfectly on your visitors' devices. No more awkward guesses at potential screen widths. Serve scaled images instantly.
95
 
96
  == Changelog ==
97
 
98
+ ##### [Version 3.4.2](https://github.com/Codeinwp/optimole-wp/compare/v3.4.1...v3.4.2) (2022-05-25)
99
+
100
+ Fix edge cases for auto allowing domain on site migration.
101
+
102
+
103
+
104
+
105
  ##### [Version 3.4.1](https://github.com/Codeinwp/optimole-wp/compare/v3.4.0...v3.4.1) (2022-05-10)
106
 
107
  * Auto allow domain when the website URL is being changed, such as moving from production -> staging or viceversa
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 ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428::getLoader();
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInitcf4a2a666522611d131c0747aeb43392::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428
6
  {
7
  private static $loader;
8
 
@@ -22,18 +22,18 @@ class ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428
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,7 +45,7 @@ class ComposerAutoloaderInited7ede7b34e86089b2953277e80ec428
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;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitcf4a2a666522611d131c0747aeb43392
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitcf4a2a666522611d131c0747aeb43392', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitcf4a2a666522611d131c0747aeb43392', 'loadClassLoader'));
28
 
29
  require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitcf4a2a666522611d131c0747aeb43392::getInitializer($loader));
31
 
32
  $loader->register(true);
33
 
34
+ $includeFiles = \Composer\Autoload\ComposerStaticInitcf4a2a666522611d131c0747aeb43392::$files;
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
+ composerRequirecf4a2a666522611d131c0747aeb43392($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
45
  * @param string $file
46
  * @return void
47
  */
48
+ function composerRequirecf4a2a666522611d131c0747aeb43392($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 ComposerStaticInited7ede7b34e86089b2953277e80ec428
8
  {
9
  public static $files = array (
10
  '9fef4034ed73e26a337d9856ea126f7f' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
@@ -17,7 +17,7 @@ class ComposerStaticInited7ede7b34e86089b2953277e80ec428
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
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitcf4a2a666522611d131c0747aeb43392
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 = ComposerStaticInitcf4a2a666522611d131c0747aeb43392::$classMap;
21
 
22
  }, null, ClassLoader::class);
23
  }