Image Optimizer by 10web – Image Optimizer and Compression plugin - Version 1.0.15

Version Description

  • Fixed: Bug on gallery and enabled directory
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Image Optimizer by 10web – Image Optimizer and Compression plugin
Version 1.0.15
Comparing to
See all releases

Code changes from version 1.0.13 to 1.0.15

assets/js/settings.js CHANGED
@@ -413,6 +413,7 @@ function updateOtherFolders(html) {
413
  var otherFoldersOther = jQuery.extend({}, otherFolders);
414
  if (jQuery("[name=gallery_upload_dir]").length > 0) {
415
  otherFoldersGallery = otherFolders[jQuery("[name=gallery_upload_dir]").val()];
 
416
  delete otherFoldersOther[jQuery("[name=gallery_upload_dir]").val()];
417
  }
418
 
413
  var otherFoldersOther = jQuery.extend({}, otherFolders);
414
  if (jQuery("[name=gallery_upload_dir]").length > 0) {
415
  otherFoldersGallery = otherFolders[jQuery("[name=gallery_upload_dir]").val()];
416
+ otherFoldersGallery = otherFoldersGallery ? otherFoldersGallery : {};
417
  delete otherFoldersOther[jQuery("[name=gallery_upload_dir]").val()];
418
  }
419
 
includes/iowd-helper.php CHANGED
@@ -244,5 +244,20 @@ class IOWD_Helper
244
  return $already_optimized;
245
  }
246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
 
248
  }
244
  return $already_optimized;
245
  }
246
 
247
+ /**
248
+ * @return null|string
249
+ */
250
+ public static function get_gallery_dir()
251
+ {
252
+ if (class_exists("BWG")) {
253
+ $bwg = new BWG();
254
+ $dir_path = str_replace(ABSPATH, '', $bwg->upload_dir);
255
+
256
+ return ABSPATH . "/" . $dir_path;
257
+ }
258
+
259
+ return null;
260
+ }
261
+
262
 
263
  }
includes/iowd-settings.php CHANGED
@@ -7,7 +7,7 @@ class IOWD_Settings
7
  {
8
 
9
  private $tabs = array();
10
- public $photo_gallery_dir = null;
11
 
12
 
13
  public function __construct()
@@ -479,19 +479,12 @@ class IOWD_Settings
479
 
480
  private static function get_gallery_dir()
481
  {
482
- global $wd_bwg_options;
483
- if ($wd_bwg_options) {
484
- $photo_gallery_dir = ABSPATH . "/" .$wd_bwg_options->images_directory . '/photo-gallery';
485
-
486
- return $photo_gallery_dir;
487
- }
488
-
489
- return null;
490
  }
491
 
492
  public static function save_settings()
493
  {
494
- if(isset($_POST["action"]) && $_POST["action"] == "save_settings") {
495
 
496
  check_admin_referer('nonce_' . IOWD_PREFIX, 'nonce_' . IOWD_PREFIX);
497
  if (isset($_POST["standard_setting"]) && $_POST["standard_setting"]) {
@@ -581,7 +574,7 @@ class IOWD_Settings
581
  $other_folders = json_decode(htmlspecialchars_decode(stripslashes($options["other_folders"])), true);
582
 
583
  $other = empty($other_folders) === false && is_array($other_folders) ? true : false;
584
-
585
  $iowd_tabs_active = isset($_REQUEST["iowd_tabs_active"]) ? $_REQUEST["iowd_tabs_active"] : "general";
586
  $iowd_sizes = IOWD_Helper::wp_get_image_sizes();
587
 
@@ -626,11 +619,11 @@ class IOWD_Settings
626
 
627
  if ($error == "no_job") {
628
  $msg = __("Something went wrong. Please try after few minutes.", IOWD_PREFIX);
629
- } elseif ($error == "no_agreement") {
630
  $msg = __("No agreement found.", IOWD_PREFIX);
631
  } else if ($error == "empty_credentials") {
632
  $msg = __("Empty credentials, please try again.", IOWD_PREFIX);
633
- } else if ($error == "no_image_data"){
634
  $msg = __("No images found, please check your options.", IOWD_PREFIX);
635
  }
636
 
7
  {
8
 
9
  private $tabs = array();
10
+ public $photo_gallery_dir = null;
11
 
12
 
13
  public function __construct()
479
 
480
  private static function get_gallery_dir()
481
  {
482
+ return IOWD_Helper::get_gallery_dir();
 
 
 
 
 
 
 
483
  }
484
 
485
  public static function save_settings()
486
  {
487
+ if (isset($_POST["action"]) && $_POST["action"] == "save_settings") {
488
 
489
  check_admin_referer('nonce_' . IOWD_PREFIX, 'nonce_' . IOWD_PREFIX);
490
  if (isset($_POST["standard_setting"]) && $_POST["standard_setting"]) {
574
  $other_folders = json_decode(htmlspecialchars_decode(stripslashes($options["other_folders"])), true);
575
 
576
  $other = empty($other_folders) === false && is_array($other_folders) ? true : false;
577
+
578
  $iowd_tabs_active = isset($_REQUEST["iowd_tabs_active"]) ? $_REQUEST["iowd_tabs_active"] : "general";
579
  $iowd_sizes = IOWD_Helper::wp_get_image_sizes();
580
 
619
 
620
  if ($error == "no_job") {
621
  $msg = __("Something went wrong. Please try after few minutes.", IOWD_PREFIX);
622
+ } else if ($error == "no_agreement") {
623
  $msg = __("No agreement found.", IOWD_PREFIX);
624
  } else if ($error == "empty_credentials") {
625
  $msg = __("Empty credentials, please try again.", IOWD_PREFIX);
626
+ } else if ($error == "no_image_data") {
627
  $msg = __("No images found, please check your options.", IOWD_PREFIX);
628
  }
629
 
io-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Image Optimizer WD
5
  * Plugin URI: https://10web.io/services/image-optimizer/
6
  * Description: Image Optimizer WordPress plugin enables you to resize, compress and optimize PNG, JPG, GIF files while maintaining image quality.
7
- * Version: 1.0.13
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -27,10 +27,10 @@ define('IOWD_PREFIX', "iowd");
27
  define('IOWD_API_URL', "https://optimizer.10web.io/api/");
28
 
29
 
30
- setlocale(LC_ALL, 'en_US.UTF-8');
31
  if (version_compare(phpversion(), "5.4", '>')) {
32
  $uri = $_SERVER['REQUEST_URI'];
33
  if (version_compare(phpversion(), "5.4", '>') && (strpos($uri, "iowd") || (defined('DOING_AJAX') && DOING_AJAX && isset($_POST["action"]) && $_POST["action"] == "optimize"))) {
 
34
  require_once('vendor/autoload.php');
35
  }
36
 
4
  * Plugin Name: Image Optimizer WD
5
  * Plugin URI: https://10web.io/services/image-optimizer/
6
  * Description: Image Optimizer WordPress plugin enables you to resize, compress and optimize PNG, JPG, GIF files while maintaining image quality.
7
+ * Version: 1.0.15
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
27
  define('IOWD_API_URL', "https://optimizer.10web.io/api/");
28
 
29
 
 
30
  if (version_compare(phpversion(), "5.4", '>')) {
31
  $uri = $_SERVER['REQUEST_URI'];
32
  if (version_compare(phpversion(), "5.4", '>') && (strpos($uri, "iowd") || (defined('DOING_AJAX') && DOING_AJAX && isset($_POST["action"]) && $_POST["action"] == "optimize"))) {
33
+ setlocale(LC_ALL, 'en_US.UTF-8');
34
  require_once('vendor/autoload.php');
35
  }
36
 
iowd_class.php CHANGED
@@ -8,7 +8,7 @@ class IOWD
8
  {
9
 
10
  protected static $instance = null;
11
- private static $version = '1.0.13';
12
  private static $page;
13
  private $reg_autoloader = false;
14
  private $options = array();
8
  {
9
 
10
  protected static $instance = null;
11
+ private static $version = '1.0.15';
12
  private static $page;
13
  private $reg_autoloader = false;
14
  private $options = array();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: : compress, image, images optimization, performance, photos, lossless, opt
4
  Requires at least: 3.9
5
  Tested up to: 4.9
6
  Requires PHP: 5.5
7
- Stable tag: 1.0.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -38,6 +38,12 @@ Upgrade to [Paid version](https://10web.io/services/image-optimizer/) to add fea
38
 
39
  == Changelog ==
40
 
 
 
 
 
 
 
41
  = 1.0.12 =
42
  * Fixed: Minor bug
43
 
4
  Requires at least: 3.9
5
  Tested up to: 4.9
6
  Requires PHP: 5.5
7
+ Stable tag: 1.0.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
38
 
39
  == Changelog ==
40
 
41
+ = 1.0.15 =
42
+ * Fixed: Bug on gallery and enabled directory
43
+
44
+ = 1.0.13 =
45
+ * Changed: 10web links
46
+
47
  = 1.0.12 =
48
  * Fixed: Minor bug
49
 
wd/assets/img/iowd_main_plugin.png ADDED
Binary file