WP Image Zoom - Version 1.30

Version Description

  • 12/13/2018
  • Fix: remove "trunk" folder from tags. This leads to a "The plugin does not have a valid header" error during the installation
Download this release

Release Info

Developer diana_burduja
Plugin Icon 128x128 WP Image Zoom
Version 1.30
Comparing to
See all releases

Code changes from version 1.29 to 1.30

assets/js/image_zoom.settings.min.js CHANGED
@@ -1,5 +1 @@
1
- /*! Image Zoom - v4.5 - 2017-10-16
2
- * Copyright (c) 2017 Diana Burduja; Licensed MIT license
3
-
4
- This is a very strongly modified version of the https://github.com/elevateweb/elevatezoom jQuery plugin. */
5
  jQuery(document).ready(function(a){function b(){a(".zoomContainer").remove();var b={},e={lensShape:a("input[name=lensShape]:checked").val(),cursorType:a("input[name=cursorType]:checked").val(),zwEasing:parseInt(a("#zwEasing").val()),lensSize:parseInt(a("#lensSize").val()),lensColour:a("#lensColour").val(),lensOverlay:a("#lensOverlay").is(":checked"),borderThickness:parseInt(a("#borderThickness").val()),borderColor:a("#borderColor").val(),borderRadius:parseInt(a("#borderRadius").val()),zwWidth:parseInt(a("#zwWidth").val()),zwHeight:parseInt(a("#zwHeight").val()),zwShadow:parseInt(a("#zwShadow").val()),zwPadding:parseInt(a("#zwPadding").val()),zwBorderThickness:parseInt(a("#zwBorderThickness").val()),zwBorderColor:a("#zwBorderColor").val(),zwBorderRadius:parseInt(a("#zwBorderRadius").val()),lensFade:1e3*parseFloat(a("#lensFade").val()),zwFade:1e3*parseFloat(a("#zwFade").val()),tint:a("#tint").is(":checked"),tintColor:a("#tintColor").val(),tintOpacity:parseFloat(a("#tintOpacity").val())};switch(c(e),e.tintOpacity>1&&(e.tintOpacity=1),e.tintOpacity<0&&(e.tintOpacity=0),"zoom"===e.cursorType&&(e.cursorType="url(../images/cursor_type_zoom.svg) auto"),e.lensOverlay===!0&&(e.lensOverlay="http://localhost/sb-test/wp-content/plugins/wp-image-zoooom-pro/assets/images/lens-overlay-1.png"),e.lensShape){case"none":b={zoomType:"inner",cursor:e.cursorType,easingAmount:e.zwEasing};break;case"square":case"round":b={lensShape:e.lensShape,zoomType:"lens",lensSize:e.lensSize,borderSize:e.borderThickness,borderColour:e.borderColor,cursor:e.cursorType,lensFadeIn:e.lensFade,lensFadeOut:e.lensFade},e.tint===!0&&(b.tint=!0,b.tintColour=e.tintColor,b.tintOpacity=e.tintOpacity);break;case"zoom_window":b={lensShape:"square",lensSize:e.lensSize,lensBorderSize:e.borderThickness,lensBorderColour:e.borderColor,lensColour:e.lensColour,lensOverlay:e.lensOverlay,borderRadius:e.zwBorderRadius,cursor:e.cursorType,zoomWindowWidth:e.zwWidth,zoomWindowHeight:e.zwHeight,zoomWindowShadow:e.zwShadow,borderSize:e.zwBorderThickness,borderColour:e.zwBorderColor,zoomWindowOffsetx:e.zwPadding,lensFadeIn:e.lensFade,lensFadeOut:e.lensFade,zoomWindowFadeIn:e.zwFade,zoomWindowFadeOut:e.zwFade,easingAmount:e.zwEasing,zoomWindowPosition:1},e.tint===!0&&(b.tint=!0,b.tintColour=e.tintColor,b.tintOpacity=e.tintOpacity),a("#demo_wrapper").css("text-align","left")}a("#demo").image_zoom(b),a(window).bind("resize",function(){a(window).resize(function(){clearTimeout(window.resizeEvt),window.resizeEvt=setTimeout(function(){a(".zoomContainer").remove(),a("#demo").image_zoom(b)},300)})}),d(e)}function c(b){(isNaN(b.zwEasing)||b.zwEasing<0||b.zwEasing>200)&&(e("<b>Animation Easing Effect</b> accepts integers between 0 and 200. Your value was stripped to 12"),b.zwEasing=12,a("#zwEasing").val("12")),(isNaN(b.lensSize)||b.lensSize<20||b.lensSize>2e3)&&(e("<b>Lens Size</b> accepts integers between 20 and 2000. Your value was reset to 200"),b.lensSize=200,a("#lensSize").val("200")),(isNaN(b.borderThickness)||b.borderThickness<0||b.borderThickness>200)&&(e("<b>Border Thickness</b> accepts integers between 0 and 200. Your value was reset to 1"),b.borderThickness=1,a("#borderThickness").val("1")),(isNaN(b.lensFade)||b.lensFade<0||b.lensFade>1e4)&&(e("<b>Fade Time</b> accepts integers between 0 and 10. Your value was reset to 1"),b.lensFade=1,a("#lensFade").val("1")),(isNaN(b.tintOpacity)||b.tintOpacity<0||b.tintOpacity>1)&&(e("<b>Tint Opacity</b> accepts a number between 0 and 1. Your value was reset to 0.5"),b.tintOpacity=.5,a("#tintOpacity").val("0.5")),(isNaN(b.zwWidth)||b.zwWidth<0||b.zwWidth>2e3)&&(e("<b>Zoom Window Width</b> accepts a number between 0 and 2000. Your value was reset to 400"),b.zwWidth=400,a("#zwWidth").val("400")),(isNaN(b.zwHeight)||b.zwHeight<0||b.zwHeight>2e3)&&(e("<b>Zoom Window Height</b> accepts a number between 0 and 2000. Your value was reset to 360"),b.zwHeight=360,a("#zwHeight").val("360")),(isNaN(b.zwBorderThickness)||b.zwBorderThickness<0||b.zwBorderThickness>200)&&(e("<b>Border Thickness</b> accepts integers between 0 and 200. Your value was reset to 4"),b.zwBorderThickness=4,a("#zwBorderThickness").val("4")),(isNaN(b.zwBorderRadius)||b.zwBorderRadius<0||b.zwBorderRadius>500)&&(e("<b>Rounded Corners</b> accepts integers between 0 and 500. Your value was reset to 0"),b.zwBorderRadius=0,a("#zwBorderRadius").val("0")),(isNaN(b.zwFade)||b.zwFade<0||b.zwFade>1e4)&&(e("<b>Fade Time</b> accepts integers between 0 and 10. Your value was reset to 0"),b.zwFade=0,a("#zwFade").val("0"))}function d(b){switch(a("#tab_lens, #tab_zoom_window").removeClass("disabled"),a("#tab_lens a").attr("href","#lens_settings"),a("#tab_zoom_window a").attr("href","#zoom_window_settings"),a("#lensSize").removeAttr("disabled"),a("#lensColour").removeAttr("disabled"),a("#lensBgImage").removeAttr("disabled"),a("#tintColor").removeAttr("disabled"),a("#tintOpacity").removeAttr("disabled"),a("#lensColour").removeAttr("disabled"),a("#lensOverlay").removeAttr("disabled"),b.lensShape){case"none":a("#tab_lens, #tab_zoom_window").addClass("disabled"),a("#tab_lens a").attr("href",""),a("#tab_zoom_window a").attr("href",""),a("#lensColour").attr("disabled","disabled"),a("#lensBgImage").attr("disabled","disabled");break;case"square":case"round":a("#tab_zoom_window").addClass("disabled"),a("#tab_zoom_window a").attr("href",""),a("#lensColour").attr("disabled","disabled"),a("#lensBgImage").attr("disabled","disabled");break;case"zoom_window":a("#lensSize").attr("disabled","disabled")}b.tint===!1?(a("#tintColor").attr("disabled","disabled"),a("#tintOpacity").attr("disabled","disabled")):(a("#lensColour").attr("disabled","disabled"),a("#lensOverlay").attr("disabled","disabled"))}function e(b){a("#alert_messages").html('<div class="alert alert-dismissable alert-danger"><button type="button" class="close" data-dismiss="alert">&times;</button>'+b+"</div>")}a('[data-toggle="tooltip"]').tooltip(),a("#demo").length>0&&b(),a(".form-group input").change(b)});
 
 
 
 
1
  jQuery(document).ready(function(a){function b(){a(".zoomContainer").remove();var b={},e={lensShape:a("input[name=lensShape]:checked").val(),cursorType:a("input[name=cursorType]:checked").val(),zwEasing:parseInt(a("#zwEasing").val()),lensSize:parseInt(a("#lensSize").val()),lensColour:a("#lensColour").val(),lensOverlay:a("#lensOverlay").is(":checked"),borderThickness:parseInt(a("#borderThickness").val()),borderColor:a("#borderColor").val(),borderRadius:parseInt(a("#borderRadius").val()),zwWidth:parseInt(a("#zwWidth").val()),zwHeight:parseInt(a("#zwHeight").val()),zwShadow:parseInt(a("#zwShadow").val()),zwPadding:parseInt(a("#zwPadding").val()),zwBorderThickness:parseInt(a("#zwBorderThickness").val()),zwBorderColor:a("#zwBorderColor").val(),zwBorderRadius:parseInt(a("#zwBorderRadius").val()),lensFade:1e3*parseFloat(a("#lensFade").val()),zwFade:1e3*parseFloat(a("#zwFade").val()),tint:a("#tint").is(":checked"),tintColor:a("#tintColor").val(),tintOpacity:parseFloat(a("#tintOpacity").val())};switch(c(e),e.tintOpacity>1&&(e.tintOpacity=1),e.tintOpacity<0&&(e.tintOpacity=0),"zoom"===e.cursorType&&(e.cursorType="url(../images/cursor_type_zoom.svg) auto"),e.lensOverlay===!0&&(e.lensOverlay="http://localhost/sb-test/wp-content/plugins/wp-image-zoooom-pro/assets/images/lens-overlay-1.png"),e.lensShape){case"none":b={zoomType:"inner",cursor:e.cursorType,easingAmount:e.zwEasing};break;case"square":case"round":b={lensShape:e.lensShape,zoomType:"lens",lensSize:e.lensSize,borderSize:e.borderThickness,borderColour:e.borderColor,cursor:e.cursorType,lensFadeIn:e.lensFade,lensFadeOut:e.lensFade},e.tint===!0&&(b.tint=!0,b.tintColour=e.tintColor,b.tintOpacity=e.tintOpacity);break;case"zoom_window":b={lensShape:"square",lensSize:e.lensSize,lensBorderSize:e.borderThickness,lensBorderColour:e.borderColor,lensColour:e.lensColour,lensOverlay:e.lensOverlay,borderRadius:e.zwBorderRadius,cursor:e.cursorType,zoomWindowWidth:e.zwWidth,zoomWindowHeight:e.zwHeight,zoomWindowShadow:e.zwShadow,borderSize:e.zwBorderThickness,borderColour:e.zwBorderColor,zoomWindowOffsetx:e.zwPadding,lensFadeIn:e.lensFade,lensFadeOut:e.lensFade,zoomWindowFadeIn:e.zwFade,zoomWindowFadeOut:e.zwFade,easingAmount:e.zwEasing,zoomWindowPosition:1},e.tint===!0&&(b.tint=!0,b.tintColour=e.tintColor,b.tintOpacity=e.tintOpacity),a("#demo_wrapper").css("text-align","left")}a("#demo").image_zoom(b),a(window).bind("resize",function(){a(window).resize(function(){clearTimeout(window.resizeEvt),window.resizeEvt=setTimeout(function(){a(".zoomContainer").remove(),a("#demo").image_zoom(b)},300)})}),d(e)}function c(b){(isNaN(b.zwEasing)||b.zwEasing<0||b.zwEasing>200)&&(e("<b>Animation Easing Effect</b> accepts integers between 0 and 200. Your value was stripped to 12"),b.zwEasing=12,a("#zwEasing").val("12")),(isNaN(b.lensSize)||b.lensSize<20||b.lensSize>2e3)&&(e("<b>Lens Size</b> accepts integers between 20 and 2000. Your value was reset to 200"),b.lensSize=200,a("#lensSize").val("200")),(isNaN(b.borderThickness)||b.borderThickness<0||b.borderThickness>200)&&(e("<b>Border Thickness</b> accepts integers between 0 and 200. Your value was reset to 1"),b.borderThickness=1,a("#borderThickness").val("1")),(isNaN(b.lensFade)||b.lensFade<0||b.lensFade>1e4)&&(e("<b>Fade Time</b> accepts integers between 0 and 10. Your value was reset to 1"),b.lensFade=1,a("#lensFade").val("1")),(isNaN(b.tintOpacity)||b.tintOpacity<0||b.tintOpacity>1)&&(e("<b>Tint Opacity</b> accepts a number between 0 and 1. Your value was reset to 0.5"),b.tintOpacity=.5,a("#tintOpacity").val("0.5")),(isNaN(b.zwWidth)||b.zwWidth<0||b.zwWidth>2e3)&&(e("<b>Zoom Window Width</b> accepts a number between 0 and 2000. Your value was reset to 400"),b.zwWidth=400,a("#zwWidth").val("400")),(isNaN(b.zwHeight)||b.zwHeight<0||b.zwHeight>2e3)&&(e("<b>Zoom Window Height</b> accepts a number between 0 and 2000. Your value was reset to 360"),b.zwHeight=360,a("#zwHeight").val("360")),(isNaN(b.zwBorderThickness)||b.zwBorderThickness<0||b.zwBorderThickness>200)&&(e("<b>Border Thickness</b> accepts integers between 0 and 200. Your value was reset to 4"),b.zwBorderThickness=4,a("#zwBorderThickness").val("4")),(isNaN(b.zwBorderRadius)||b.zwBorderRadius<0||b.zwBorderRadius>500)&&(e("<b>Rounded Corners</b> accepts integers between 0 and 500. Your value was reset to 0"),b.zwBorderRadius=0,a("#zwBorderRadius").val("0")),(isNaN(b.zwFade)||b.zwFade<0||b.zwFade>1e4)&&(e("<b>Fade Time</b> accepts integers between 0 and 10. Your value was reset to 0"),b.zwFade=0,a("#zwFade").val("0"))}function d(b){switch(a("#tab_lens, #tab_zoom_window").removeClass("disabled"),a("#tab_lens a").attr("href","#lens_settings"),a("#tab_zoom_window a").attr("href","#zoom_window_settings"),a("#lensSize").removeAttr("disabled"),a("#lensColour").removeAttr("disabled"),a("#lensBgImage").removeAttr("disabled"),a("#tintColor").removeAttr("disabled"),a("#tintOpacity").removeAttr("disabled"),a("#lensColour").removeAttr("disabled"),a("#lensOverlay").removeAttr("disabled"),b.lensShape){case"none":a("#tab_lens, #tab_zoom_window").addClass("disabled"),a("#tab_lens a").attr("href",""),a("#tab_zoom_window a").attr("href",""),a("#lensColour").attr("disabled","disabled"),a("#lensBgImage").attr("disabled","disabled");break;case"square":case"round":a("#tab_zoom_window").addClass("disabled"),a("#tab_zoom_window a").attr("href",""),a("#lensColour").attr("disabled","disabled"),a("#lensBgImage").attr("disabled","disabled");break;case"zoom_window":a("#lensSize").attr("disabled","disabled")}b.tint===!1?(a("#tintColor").attr("disabled","disabled"),a("#tintOpacity").attr("disabled","disabled")):(a("#lensColour").attr("disabled","disabled"),a("#lensOverlay").attr("disabled","disabled"))}function e(b){a("#alert_messages").html('<div class="alert alert-dismissable alert-danger"><button type="button" class="close" data-dismiss="alert">&times;</button>'+b+"</div>")}a('[data-toggle="tooltip"]').tooltip(),a("#demo").length>0&&b(),a(".form-group input").change(b)});
image-zoooom.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Image Zoom
4
  * Plugin URI: https://wordpress.org/plugins/wp-image-zoooom/
5
  * Description: Add zoom effect over the an image, whether it is an image in a post/page or the featured image of a product in a WooCommerce shop
6
- * Version: 1.29
7
  * Author: SilkyPress
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
@@ -12,7 +12,7 @@
12
  * Domain Path: /languages/
13
  *
14
  * WC requires at least: 2.3.0
15
- * WC tested up to: 3.5.0
16
  */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) {
@@ -27,7 +27,7 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
27
  */
28
  final class ImageZoooom {
29
  public $plugin;
30
- public $version = '1.29';
31
  public $theme = '';
32
  protected static $_instance = null;
33
 
@@ -81,9 +81,8 @@ final class ImageZoooom {
81
 
82
  if ( is_admin() ) {
83
  $this->load_plugin_textdomain();
84
- include_once( 'includes/image-zoom-admin.php' );
85
  // include_once( 'includes/image-zoom-notices.php' );
86
- include_once( 'includes/image-zoom-warnings.php' );
87
  }
88
  add_action( 'template_redirect', array( $this, 'template_redirect' ) );
89
  add_action( 'vc_after_init', array( $this, 'js_composer' ) );
3
  * Plugin Name: WP Image Zoom
4
  * Plugin URI: https://wordpress.org/plugins/wp-image-zoooom/
5
  * Description: Add zoom effect over the an image, whether it is an image in a post/page or the featured image of a product in a WooCommerce shop
6
+ * Version: 1.30
7
  * Author: SilkyPress
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
12
  * Domain Path: /languages/
13
  *
14
  * WC requires at least: 2.3.0
15
+ * WC tested up to: 3.5
16
  */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) {
27
  */
28
  final class ImageZoooom {
29
  public $plugin;
30
+ public $version = '1.30';
31
  public $theme = '';
32
  protected static $_instance = null;
33
 
81
 
82
  if ( is_admin() ) {
83
  $this->load_plugin_textdomain();
84
+ include_once( 'includes/admin-side.php' );
85
  // include_once( 'includes/image-zoom-notices.php' );
 
86
  }
87
  add_action( 'template_redirect', array( $this, 'template_redirect' ) );
88
  add_action( 'vc_after_init', array( $this, 'js_composer' ) );
includes/{image-zoom-admin.php → admin-side.php} RENAMED
@@ -17,10 +17,16 @@ class ImageZoooom_Admin {
17
  * Constructor
18
  */
19
  public function __construct() {
 
 
 
 
 
20
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
21
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
22
  add_action( 'admin_head', array( $this, 'iz_add_tinymce_button' ) );
23
  $this->plugin = wp_image_zoooom_settings('plugin');
 
24
  }
25
 
26
  /**
@@ -45,17 +51,18 @@ class ImageZoooom_Admin {
45
  return false;
46
 
47
  $url = IMAGE_ZOOM_URL. 'assets/';
 
48
  $v = IMAGE_ZOOM_VERSION;
49
 
50
  // Register the javascript files
51
  if ( $this->plugin['testing'] == true ) {
52
- wp_register_script( 'bootstrap', $url. 'js/bootstrap.3.2.0.min.js' , array( 'jquery' ), $v, true );
53
  wp_register_script( 'image_zoooom', $url.'js/jquery.image_zoom.js' , array( 'jquery' ), $v, true );
54
  if ( !isset($_GET['tab']) || $_GET['tab'] == 'settings' ) {
55
  wp_register_script( 'zoooom-settings', $url. 'js/image_zoom.settings.free.js', array( 'image_zoooom' ), $v, true );
56
  }
57
  } else {
58
- wp_register_script( 'bootstrap', $url.'js/bootstrap.3.2.0.min.js', array( 'jquery' ), $v, true );
59
  wp_register_script( 'image_zoooom', $url.'js/jquery.image_zoom.min.js', array( 'jquery' ), $v, true );
60
  if ( !isset($_GET['tab']) || $_GET['tab'] == 'settings' ) {
61
  wp_register_script( 'zoooom-settings', $url.'js/image_zoom.settings.min.js', array( 'image_zoooom' ), $v, true );
@@ -68,7 +75,7 @@ class ImageZoooom_Admin {
68
  wp_enqueue_script( 'zoooom-settings' );
69
 
70
  // Register the css files
71
- wp_register_style( 'bootstrap', $url.'css/bootstrap.min.css', array(), $v);
72
  if ( $this->plugin['testing'] == true ) {
73
  wp_register_style( 'zoooom', $url.'css/style.css', array(), $v);
74
  } else {
@@ -428,6 +435,111 @@ class ImageZoooom_Admin {
428
  }
429
 
430
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  }
432
 
433
 
17
  * Constructor
18
  */
19
  public function __construct() {
20
+
21
+ if ( ! function_exists( 'is_plugin_active' ) ) {
22
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
23
+ }
24
+
25
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
26
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
27
  add_action( 'admin_head', array( $this, 'iz_add_tinymce_button' ) );
28
  $this->plugin = wp_image_zoooom_settings('plugin');
29
+ $this->warnings();
30
  }
31
 
32
  /**
51
  return false;
52
 
53
  $url = IMAGE_ZOOM_URL. 'assets/';
54
+ $frm_url = IMAGE_ZOOM_URL. 'includes/frm/assets/';
55
  $v = IMAGE_ZOOM_VERSION;
56
 
57
  // Register the javascript files
58
  if ( $this->plugin['testing'] == true ) {
59
+ wp_register_script( 'bootstrap', $frm_url. 'bootstrap.3.2.0.min.js' , array( 'jquery' ), $v, true );
60
  wp_register_script( 'image_zoooom', $url.'js/jquery.image_zoom.js' , array( 'jquery' ), $v, true );
61
  if ( !isset($_GET['tab']) || $_GET['tab'] == 'settings' ) {
62
  wp_register_script( 'zoooom-settings', $url. 'js/image_zoom.settings.free.js', array( 'image_zoooom' ), $v, true );
63
  }
64
  } else {
65
+ wp_register_script( 'bootstrap', $frm_url.'bootstrap.3.2.0.min.js', array( 'jquery' ), $v, true );
66
  wp_register_script( 'image_zoooom', $url.'js/jquery.image_zoom.min.js', array( 'jquery' ), $v, true );
67
  if ( !isset($_GET['tab']) || $_GET['tab'] == 'settings' ) {
68
  wp_register_script( 'zoooom-settings', $url.'js/image_zoom.settings.min.js', array( 'image_zoooom' ), $v, true );
75
  wp_enqueue_script( 'zoooom-settings' );
76
 
77
  // Register the css files
78
+ wp_register_style( 'bootstrap', $frm_url.'bootstrap.min.css', array(), $v);
79
  if ( $this->plugin['testing'] == true ) {
80
  wp_register_style( 'zoooom', $url.'css/style.css', array(), $v);
81
  } else {
435
  }
436
 
437
 
438
+ /**
439
+ * Show admin warnings
440
+ */
441
+ function warnings() {
442
+
443
+ require_once( 'frm/warnings.php' );
444
+
445
+ $allowed_actions = array(
446
+ 'iz_dismiss_ajax_product_filters',
447
+ 'iz_dismiss_jetpack',
448
+ 'iz_dismiss_bwp_minify',
449
+ 'iz_dismiss_avada',
450
+ 'iz_dismiss_shopkeeper',
451
+ 'iz_dismiss_bridge',
452
+ 'iz_dismiss_wooswipe',
453
+ );
454
+
455
+ $w = new SilkyPress_Warnings($allowed_actions);
456
+
457
+ if ( !$w->is_url('zoooom_settings') ) {
458
+ return;
459
+ }
460
+
461
+ // Warning about AJAX product filter plugins
462
+ $this->iz_dismiss_ajax_product_filters($w);
463
+
464
+
465
+ // Check if Jetpack Photon module is active
466
+ if ( defined('JETPACK__VERSION' ) && Jetpack::is_module_active( 'photon' ) ) {
467
+ $message = __( 'WP Image Zoom plugin is not compatible with the <a href="admin.php?page=jetpack">Jetpack Photon</a> module. If you find that the zoom is not working, try to deactivate the Photon module and see if that solves it.', 'wp-image-zoooom-pro' );
468
+ $w->add_notice( 'iz_dismiss_jetpack', $message );
469
+ }
470
+
471
+ // Warning about BWF settings
472
+ if ( is_plugin_active( 'bwp-minify/bwp-minify.php' ) ) {
473
+ $message = __( '<b>If the zoom does not show up</b> on your website, it could be because you need to add the “image_zoooom-init” and the “image_zoooom” to the “Scripts to NOT minify” option in the BWP Minify settings, as shown in <a href="https://www.silkypress.com/wp-content/uploads/2016/09/image-zoom-bwp.png" target="_blank">this screenshot</a>.', 'wp-image-zoooom-pro' );
474
+ $w->add_notice( 'iz_dismiss_bwp_minify', $message );
475
+ }
476
+
477
+
478
+ // Check if the Avada theme is active
479
+ if ( strpos( strtolower(get_template()), 'avada') !== false && is_plugin_active('woocommerce/woocommerce.php')) {
480
+ $flexslider_url = 'https://woocommerce.com/flexslider/';
481
+ $pro_url = 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner';
482
+ $message = sprintf( __( 'The WP Image Zoom plugin <b>will not work</b> on the WooCommerce products gallery with the Avada theme. The Avada theme changes entirely the default WooCommerce gallery with the <a href="%1$s" target="_blank">Flexslider gallery</a> and the zoom plugin does not support the Flexslider gallery. Please check the <a href="%2$s" target="_blank">PRO version</a> of the plugin for compatibility with the Flexslider gallery.', 'wp-image-zoooom' ), $flexslider_url, $pro_url );
483
+ $w->add_notice( 'iz_dismiss_avada', $message );
484
+ }
485
+
486
+
487
+ // Check if the Shopkeeper theme is active
488
+ if ( strpos( strtolower(get_template()), 'shopkeeper') !== false && is_plugin_active('woocommerce/woocommerce.php')) {
489
+ $pro_url = 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner';
490
+ $message = sprintf( __( 'The WP Image Zoom plugin <b>will not work</b> on the WooCommerce products gallery with the Shopkeeper theme. The Shopkeeper theme changes entirely the default WooCommerce gallery with a custom made gallery not supported by the free version of the WP Image Zoom plugin. Please check the <a href="%1$s" target="_blank">PRO version</a> of the plugin for compatibility with the Shopkeeper\'s gallery.', 'wp-image-zoooom' ), $pro_url );
491
+ $w->add_notice( 'iz_dismiss_shopkeeper', $message, 'updated settings-error notice is-dismissible' );
492
+ }
493
+
494
+
495
+ // Check if the Bridge theme is active
496
+ if ( strpos( strtolower(get_template()), 'bridge') !== false && is_plugin_active('woocommerce/woocommerce.php')) {
497
+ $message = __( 'The <b>Bridge</b> theme replaces the default WooCommerce product gallery with its own. The <b>WP Image Zoom</b> plugin will not work with this replaced gallery. But if you set the "Enable Default WooCommerce Product Gallery Features" option to "Yes" on the <a href="'.admin_url( 'admin.php?page=qode_theme_menu_tab_woocommerce' ).'">WP Admin -> Qode Options -> WooCommerce</a> page, then the zoom will work as expected on the product gallery.', 'wp-image-zoooom' );
498
+ // Note: This works for Bridge 16.7, but not for Bridge 14.1
499
+ $w->add_notice( 'iz_dismiss_bridge', $message, 'updated settings-error notice is-dismissible' );
500
+ }
501
+
502
+
503
+ // Warning about WooSwipe plugin
504
+ if ( is_plugin_active( 'wooswipe/wooswipe.php' ) ) {
505
+ $pro_url = 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner';
506
+ $wooswipe_url = 'https://wordpress.org/plugins/wooswipe/';
507
+ $message = sprintf( __( 'WP Image Zoom plugin is <b>not compatible with the <a href="%1$s">WooSwipe WooCommerce Gallery</a> plugin</b>. You can try the zoom plugin with the default WooCommerce gallery by deactivating the WooSwipe plugin. Alternatively, you can upgrade to the WP Image Zoom Pro version, where the issue with the WooSwipe plugin is fixed.' ), $wooswipe_url, $pro_url);
508
+ $w->add_notice( 'iz_dismiss_wooswipe', $message );
509
+ }
510
+
511
+ $w->show_warnings();
512
+ }
513
+
514
+
515
+ /**
516
+ * Warning about AJAX product filter plugins
517
+ */
518
+ function iz_dismiss_ajax_product_filters($w) {
519
+ $continue = false;
520
+
521
+ $general = get_option('zoooom_general');
522
+ if ( isset($_POST['tab'] )) {
523
+ $general['woo_cat'] = (isset($_POST['woo_cat'])) ? true : false;
524
+ }
525
+ if ( ! isset($general['woo_cat']) || $general['woo_cat'] != true ) return false;
526
+
527
+ if ( is_plugin_active( 'woocommerce-ajax-filters/woocommerce-filters.php' ) ) $continue = true;
528
+ if ( is_plugin_active( 'load-more-products-for-woocommerce/load-more-products.php' ) ) $continue = true;
529
+ if ( is_plugin_active( 'wc-ajax-product-filter/wcapf.php' ) ) $continue = true;
530
+
531
+ if ( !$continue ) return false;
532
+
533
+ $article_url = 'https://www.silkypress.com/wp-image-zoom/zoom-woocommerce-category-page-ajax/';
534
+ $message = sprintf(__( 'You are using the zoom on WooCommerce shop pages in combination with a plugin that loads more products with AJAX (a product filter plugin or a "load more" products plugin). You\'ll notice that the zoom isn\'t applied after new products are loaded with AJAX. Please read <a href="%1$s" target="_blank">this article for a solution</a>.', 'wp-image-zoooom' ), $article_url);
535
+
536
+ $w->add_notice( 'iz_dismiss_ajax_product_filters', $message );
537
+ }
538
+
539
+
540
+
541
+
542
+
543
  }
544
 
545
 
{assets/js → includes/frm/assets}/bootstrap.3.2.0.min.js RENAMED
File without changes
{assets/css → includes/frm/assets}/bootstrap.min.css RENAMED
File without changes
{assets/js → includes/frm/assets}/bootstrap.min.js RENAMED
File without changes
includes/frm/forms-helper.php ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly
5
+ }
6
+
7
+ if ( !class_exists('SilkyPress_FormsHelper') ) {
8
+ /**
9
+ * SilkyPress_FormsHelper
10
+ */
11
+ class SilkyPress_FormsHelper {
12
+
13
+ public $label_class = 'col-sm-3 control-label';
14
+ public $non_label_class = 'col-sm-9';
15
+ public $plugin_url = '';
16
+
17
+ public function input( $type, $settings = array() ) {
18
+ $allowed_types = array( 'text', 'radio', 'input_text', 'buttons', 'input_color', 'checkbox', 'header' );
19
+
20
+ if ( ! in_array( $type, $allowed_types ) ) {
21
+ return;
22
+ }
23
+ if ( !isset($settings['label'] )) return;
24
+ if ( !isset($settings['name'] )) return;
25
+ if ( isset($settings['disabled']) && $settings['disabled'] ) {
26
+ $settings['disabled'] = ' disabled';
27
+ } else {
28
+ $settings['disabled'] = '';
29
+ }
30
+ call_user_func( array($this, $type), $settings );
31
+ }
32
+
33
+
34
+ public function text( $args = array() ) {
35
+ if ( ! isset($args['value'] ) ) $args['value'] = '';
36
+ if ( ! isset($args['description'] ) ) $args['description'] = '';
37
+ ?>
38
+ <div class="form-group<?php echo $args['disabled']; ?>">
39
+ <?php echo $this->label( $args ); ?>
40
+ <div class="input-group" style="width: auto;">
41
+ <?php echo $args['value']; ?>
42
+ </div>
43
+ <?php $this->helpblock( $args ); ?>
44
+ </div>
45
+ <?php
46
+ }
47
+
48
+ public function radio($args = array(), $inline = false) {
49
+ if ( !isset($args['values'] ) || count($args['values']) == 0 ) return;
50
+ if ( !isset($args['value'] ) ) $args['value'] = '';
51
+ if ( !isset($args['style'] ) ) $args['style'] = '';
52
+ if ( !isset($args['active'] ) ) $args['active'] = '';
53
+ ?>
54
+ <div class="form-group<?php if(!empty($args['disabled'])) echo ' disabled-short'; ?>">
55
+ <?php echo $this->label( $args ); ?>
56
+ <div class="<?php echo $this->non_label_class; ?>">
57
+ <?php foreach ($args['values'] as $_id => $_label) : ?>
58
+ <div class="radio<?php if($args['style'] == 'inline') echo '-inline'; ?><?php echo $args['disabled'] ?>">
59
+ <label>
60
+ <input type="radio" name="<?php echo $args['name'] ?>" id="<?php echo $_id ?>" value="<?php echo $_id ?>" <?php echo ($_id == $args['value']) ? 'checked=""' : ''; echo $args['disabled']; ?>>
61
+ <?php echo $_label ?>
62
+ </label>
63
+ </div>
64
+ <?php endforeach; ?>
65
+ <?php $this->helpblock( $args ); ?>
66
+ </div>
67
+ </div>
68
+ <?php
69
+ }
70
+
71
+ public function input_text( $args = array() ) {
72
+ if ( ! isset($args['value'] ) ) $args['value'] = '';
73
+ if ( ! isset($args['description'] ) ) $args['description'] = '';
74
+ ?>
75
+ <div class="form-group<?php echo $args['disabled']; ?>">
76
+ <?php echo $this->label( $args ); ?>
77
+ <div class="input-group">
78
+ <input type="text" class="form-control" id="<?php echo $args['name']?>" name="<?php echo $args['name'] ?>" value="<?php echo $args['value'] ?>"<?php echo $args['disabled']; ?> />
79
+ <?php if (isset($args['post_input'])) : ?><span class="input-group-addon"><?php echo $args['post_input'] ?></span><?php endif; ?>
80
+ </div>
81
+ <?php $this->helpblock( $args ); ?>
82
+ </div>
83
+ <?php
84
+ }
85
+
86
+
87
+ public function input_color( $args = array() ) {
88
+ if ( ! isset($args['value'] ) ) $args['value'] = '';
89
+ ?>
90
+ <div class="form-group<?php echo $args['disabled']; ?>">
91
+ <?php echo $this->label( $args ); ?>
92
+ <div class="input-group">
93
+ <input type="color" class="form-control" id="<?php echo $args['name'] ?>" name="<?php echo $args['name'] ?>" value="<?php echo $args['value'] ?>"<?php echo $args['disabled']; ?> />
94
+ <span class="input-group-addon" id="color-text-color-hex"><?php echo $args['value'] ?></span>
95
+ </div>
96
+ <?php $this->helpblock( $args ); ?>
97
+ </div>
98
+
99
+ <?php
100
+ }
101
+
102
+ public function checkbox( $args = array() ) {
103
+ if ( ! isset($args['value'] ) ) $args['value'] = false;
104
+ ?>
105
+ <div class="form-group<?php echo $args['disabled']; ?>">
106
+ <?php echo $this->label( $args ); ?>
107
+ <div class="input-group">
108
+ <label>
109
+ <input type="checkbox" id="<?php echo $args['name'] ?>" name="<?php echo $args['name'] ?>" <?php echo ($args['value'] == true) ? 'checked=""' : '' ?><?php echo $args['disabled'] ?> />
110
+ </label>
111
+ </div>
112
+ <?php $this->helpblock( $args ); ?>
113
+ </div>
114
+ <?php
115
+ }
116
+
117
+ public function header( $args = array() ) {
118
+ ?>
119
+ <h4 class="col-sm-5"><?php echo $args['label']; ?></h4><div style="clear: both;"></div>
120
+ <?php
121
+ }
122
+
123
+ public function buttons( $args = array() ) {
124
+ if ( ! isset($args['values'] ) || count($args['values']) == 0 ) return;
125
+ if ( ! isset($args['value'] ) ) $args['value'] = '';
126
+ if ( ! isset($args['style'] ) ) $args['style'] = '';
127
+ ?>
128
+ <div class="form-group<?php if(!empty($args['disabled'])) echo ' disabled-short'; ?>">
129
+ <?php echo $this->label( $args ); ?>
130
+ <div class="btn-group <?php echo $args['disabled'] ?>" data-toggle="buttons" id="btn-group-style-circle">
131
+ <?php foreach( $args['values'] as $_id => $_value ) : ?>
132
+ <?php $tooltip = (!empty($_value[1])) ? ' data-toggle="tooltip" data-placement="top" title="'.$_value[1].'" data-original-title="' . $_value[1] . '"' : ''; ?>
133
+ <label class="btn btn-default<?php echo ($args['value'] == $_id) ? ' active' : '' ?> "<?php echo $args['disabled'] ?>>
134
+ <input type="radio" name="<?php echo $args['name'] ?>" id="<?php echo $_id ?>" value="<?php echo $_id ?>" <?php echo ($args['value'] == $_id) ? 'checked' : '' ?> />
135
+ <div class="icon-in-label ndd-spot-icon icon-style-1" <?php echo $tooltip; ?>>
136
+ <div class="ndd-icon-main-element">
137
+ <?php if($args['style'] == 'full') : ?>
138
+ <?php echo $_value[0];?>
139
+ <?php else : ?>
140
+ <img src="<?php echo $this->plugin_url . 'assets' . $_value[0] ?>" />
141
+ <?php endif; ?>
142
+ </div>
143
+ </div>
144
+ </label>
145
+ <?php endforeach; ?>
146
+ <?php $this->helpblock( $args ); ?>
147
+ </div>
148
+ </div>
149
+ <?php
150
+ }
151
+
152
+ public function label( $args = array() ) {
153
+ $output = '<label for="'.$args['name'].'" class="'.$this->label_class.'">'.$args['label'];
154
+ if ( isset ( $args['description'] ) && !empty( $args['description'] ) ) {
155
+ $output .= ' <img src="'.$this->plugin_url.'assets/images/question_mark.svg" data-toggle="tooltip" data-placement="top" title="'.$args['description'].'" data-original-title="'.$args['description'].'" />';
156
+ }
157
+ $output .= '</label>' . "\n";
158
+ return $output;
159
+ }
160
+
161
+ public function helpblock( $args = array() ) {
162
+ return true;
163
+ if ($args['disabled'] == ' disabled' && isset($args['description']) ) { ?>
164
+ <span class="help-block"><?php echo $args['description'] ?></span>
165
+ <?php }
166
+ }
167
+
168
+ }
169
+ }
170
+
171
+ ?>
includes/frm/premium-tooltips.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly
5
+ }
6
+
7
+ if ( !class_exists('SilkyPress_PremiumTooltips') ) {
8
+ /**
9
+ * SilkyPress_PremiumTooltips
10
+ */
11
+ class SilkyPress_PremiumTooltips {
12
+
13
+
14
+ /**
15
+ * Constructor
16
+ */
17
+ public function __construct($message) {
18
+ $this->html($message);
19
+ $this->css();
20
+ $this->javascript();
21
+ }
22
+
23
+
24
+
25
+ function html($message) {
26
+ ?>
27
+ <div id="skp-premium-tooltip">
28
+ <div class="skp-premium-tooltip--arrow">
29
+ <div style=""></div>
30
+ </div>
31
+ <div class="skp-premium-tooltip--msg">
32
+ <label><?php echo $message; ?></label>
33
+ </div>
34
+ </div>
35
+ <?php
36
+ }
37
+
38
+
39
+ function css() {
40
+ ?>
41
+ <style type="text/css">
42
+ #skp-premium-tooltip {
43
+ display:none;
44
+ width: 230px;
45
+ height: 60px;
46
+ position: absolute;
47
+ margin-left: 354px;
48
+ margin-top: 112px;
49
+ color: white;
50
+ }
51
+ #skp-premium-tooltip .skp-premium-tooltip--arrow {
52
+ float:left;
53
+ width:13px;
54
+ }
55
+ #skp-premium-tooltip .skp-premium-tooltip--arrow div {
56
+ width: 0px;
57
+ height: 0px;
58
+ border-top: 6px solid transparent;
59
+ border-right: 6px solid #333333;
60
+ border-bottom: 6px solid transparent;
61
+ float: right;
62
+ margin-right: 0px;
63
+ margin-top: 16px;
64
+ }
65
+ #skp-premium-tooltip .skp-premium-tooltip--msg {
66
+ font-family:sans-serif;
67
+ font-size:13px;
68
+ text-align: center;
69
+ border-radius: 5px;
70
+ float: left;
71
+ background-color: rgb(51, 51, 51);
72
+ color: white;
73
+ width: 210px;
74
+ padding: 10px 0px;
75
+ }
76
+ </style>
77
+ <?php
78
+ }
79
+
80
+ function javascript() {
81
+ ?>
82
+ <script type="text/javascript">
83
+ jQuery(document).ready(function($){
84
+ $(".form-group.disabled-short, .form-group.disabled").click(function(e){
85
+ if(typeof window.tooltip != "undefined"){
86
+ clearTimeout(window.tooltip);
87
+ }
88
+
89
+ var inputCon = $(e.currentTarget).find(".input-group");
90
+ var left = 30;
91
+
92
+
93
+ $(e.currentTarget).children().each(function(i, child){
94
+ left += $(child).width();
95
+ });
96
+
97
+ var offsetTop = $(e.currentTarget).offset().top - 38;
98
+ offsetTop -= $('h2').offset().top - 52;
99
+
100
+ $("#skp-premium-tooltip").css({"margin-left" : left + "px", "margin-top" : offsetTop + "px"});
101
+ $("#skp-premium-tooltip").fadeIn( "slow", function() {
102
+ window.tooltip = setTimeout(function(){ $("#skp-premium-tooltip").hide(); }, 1000);
103
+ });
104
+ return;
105
+ });
106
+ });
107
+ </script>
108
+ <?php
109
+ }
110
+ }
111
+ }
includes/frm/warnings.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly
5
+ }
6
+
7
+ if ( !class_exists('SilkyPress_Warnings') ) {
8
+ /**
9
+ * SilkyPress_Warnings
10
+ */
11
+ class SilkyPress_Warnings {
12
+
13
+ var $allowed_actions = array();
14
+
15
+ var $notices = array();
16
+
17
+ /**
18
+ * Constructor
19
+ */
20
+ public function __construct($allowed_actions) {
21
+ $this->allowed_actions = $allowed_actions;
22
+ add_action( 'wp_ajax_sk_dismiss_warning', array( $this, 'notice_dismiss' ) );
23
+ }
24
+
25
+
26
+ /**
27
+ * Check if we are on the right page
28
+ */
29
+ function is_url( $url_part = '' ) {
30
+ if ( !isset( $_SERVER ) || !isset( $_SERVER['REQUEST_URI'] ) ) {
31
+ return false;
32
+ }
33
+ if ( strpos( $_SERVER['REQUEST_URI'], $url_part ) !== false ) {
34
+ return true;
35
+ }
36
+ return false;
37
+ }
38
+
39
+
40
+ /**
41
+ * Add this message to the $this->notices array
42
+ */
43
+ function add_notice($id, $message, $class = '') {
44
+ if ( get_option($id) != false ) return false;
45
+
46
+ $notice = array(
47
+ 'id' => $id,
48
+ 'message' => $message,
49
+ );
50
+ if ( !empty($class) ) $notice['class'] = $class;
51
+
52
+ $this->notices[] = $notice;
53
+ }
54
+
55
+
56
+ function show_warnings() {
57
+ add_action( 'admin_notices', array($this, 'show_admin_notice') );
58
+ }
59
+
60
+
61
+ /**
62
+ * Show the admin notices
63
+ * */
64
+ function show_admin_notice() {
65
+ if ( !is_array($this->notices) || count($this->notices) == 0 ) return;
66
+
67
+ foreach( $this->notices as $_n ) {
68
+ $nonce = wp_create_nonce( $_n['id'] );
69
+ if ( !isset($_n['class'])) $_n['class'] = 'notice notice-warning is-dismissible';
70
+ $_n['class'] .= ' sk-notice-dismiss';
71
+ printf( '<div class="%1$s" id="%2$s" data-nonce="%3$s"><p>%4$s</p></div>', $_n['class'], $_n['id'], $nonce, $_n['message'] );
72
+ }
73
+ ?>
74
+ <script type='text/javascript'>
75
+ jQuery(function($){
76
+ $(document).on( 'click', '.sk-notice-dismiss', function() {
77
+ var id = $(this).attr('id');
78
+ var data = {
79
+ action: 'sk_dismiss_warning',
80
+ option: id,
81
+ nonce: $(this).data('nonce'),
82
+ };
83
+ $.post(ajaxurl, data, function(response ) {
84
+ $('#'+id).fadeOut('slow');
85
+ });
86
+ });
87
+ });
88
+ </script>
89
+ <?php
90
+ }
91
+
92
+
93
+ /**
94
+ * Ajax response for `notice_dismiss` action
95
+ */
96
+ function notice_dismiss() {
97
+
98
+ $option = $_POST['option'];
99
+
100
+ if ( ! in_array($option, $this->allowed_actions ) ) return;
101
+
102
+ check_ajax_referer( $option, 'nonce' );
103
+
104
+ update_option( $option, 1 );
105
+
106
+
107
+ wp_die();
108
+ }
109
+ }
110
+ }
includes/image-zoom-admin-general.php CHANGED
@@ -1,9 +1,10 @@
1
  <?php
2
 
3
- require_once 'image-zoom-forms-helper.php';
4
 
5
  $iz_admin = new ImageZoooom_Admin;
6
- $iz_forms_helper = new ImageZoooom_FormsHelper;
 
7
 
8
  $assets_url = IMAGE_ZOOM_URL . '/assets';
9
 
@@ -14,7 +15,11 @@ if ( $settings == false ) {
14
 
15
  $messages = $iz_admin->show_messages();
16
 
17
- include_once( 'premium-tooltips.php' );
 
 
 
 
18
 
19
  ?>
20
  <style type="text/css">
@@ -44,12 +49,13 @@ include_once( 'premium-tooltips.php' );
44
  <li>the lightbox created by <a href="https://www.silkypress.com/i/jetpack-carousel" target="_blank" rel="nofollow">Carousel</a> from Jetpack</li>
45
  <li>the <a href="https://www.silkypress.com/i/js-prettyphoto" target="_blank" rel="nofollow">prettyPhoto</a> lightbox (also used by the <a href="https://www.silkypress.com/i/visual-composer" target="_blank" rel="nofollow">Visual Composer</a> gallery)</li>
46
  <li>the <a href="https://www.silkypress.com/i/js-fancybox" target="_blank" rel="nofollow">fancyBox</a> lightbox (also used by the
47
- <a href="https://www.silkypress.com/i/wp-easy-fancybox" target="_blank" rel="nofollow">Easy Fancybox
48
- </a> plugin)</li>
49
  <li>the <a href="https://www.silkypress.com/i/js-featherlight" target="_blank" rel="nofollow">Featherlight.js</a> lightbox (also used by <a href="https://www.silkypress.com/i/wp-draw-attention" target="_blank" rel="nofollow">Draw Attention</a> plugin)</li>
50
  <li>the lightbox created by the Ultimate Product Catalogue by Etoile Web Design</li>
51
- <li>the <a href="http://dimsemenov.com/plugins/magnific-popup/" target="_blank" rel="nofollow">Magnific Popup</a> lightbox (also used by <a href="https://www.silkypress.com/i/enfold-theme" target="_blank" rel="nofollow">Enfold</a> portfolio items)</li>
52
  <li>the lightbox from the <a href="https://wordpress.org/plugins/elementor/" target="_blank" rel="nofollow">Elementor</a> Page Builder</li>
 
53
  </ul>
54
  </p>
55
  </div>
1
  <?php
2
 
3
+ require_once 'frm/forms-helper.php';
4
 
5
  $iz_admin = new ImageZoooom_Admin;
6
+ $iz_forms_helper = new SilkyPress_FormsHelper;
7
+ $iz_forms_helper->plugin_url = IMAGE_ZOOM_URL;
8
 
9
  $assets_url = IMAGE_ZOOM_URL . '/assets';
10
 
15
 
16
  $messages = $iz_admin->show_messages();
17
 
18
+ require_once( 'frm/premium-tooltips.php' );
19
+ $message = __('Only available in <a href="%1$s" target="_blank">PRO version</a>', 'wp-image-zoooom');
20
+ $message = wp_kses( $message, array('a' => array('href' => array(), 'target'=> array())));
21
+ $message = sprintf( $message, 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner');
22
+ new SilkyPress_PremiumTooltips($message);
23
 
24
  ?>
25
  <style type="text/css">
49
  <li>the lightbox created by <a href="https://www.silkypress.com/i/jetpack-carousel" target="_blank" rel="nofollow">Carousel</a> from Jetpack</li>
50
  <li>the <a href="https://www.silkypress.com/i/js-prettyphoto" target="_blank" rel="nofollow">prettyPhoto</a> lightbox (also used by the <a href="https://www.silkypress.com/i/visual-composer" target="_blank" rel="nofollow">Visual Composer</a> gallery)</li>
51
  <li>the <a href="https://www.silkypress.com/i/js-fancybox" target="_blank" rel="nofollow">fancyBox</a> lightbox (also used by the
52
+ <a href="https://wordpress.org/plugins/easy-fancybox/" target="_blank" rel="nofollow">Easy Fancybox
53
+ </a> or the <a href="https://wordpress.org/plugins/woocommerce-lightbox/" target="_blank" rel="nofollow">WooCommerce LightBox</a> plugin)</li>
54
  <li>the <a href="https://www.silkypress.com/i/js-featherlight" target="_blank" rel="nofollow">Featherlight.js</a> lightbox (also used by <a href="https://www.silkypress.com/i/wp-draw-attention" target="_blank" rel="nofollow">Draw Attention</a> plugin)</li>
55
  <li>the lightbox created by the Ultimate Product Catalogue by Etoile Web Design</li>
56
+ <li>the <a href="http://dimsemenov.com/plugins/magnific-popup/" target="_blank" rel="nofollow">Magnific Popup</a> lightbox (also used by <a href="https://www.silkypress.com/i/enfold-theme" target="_blank" rel="nofollow">Enfold</a> portfolio items or by the Divi gallery)</li>
57
  <li>the lightbox from the <a href="https://wordpress.org/plugins/elementor/" target="_blank" rel="nofollow">Elementor</a> Page Builder</li>
58
+ <li>the lightbox from the <a href="https://lcweb.it/media-grid/bundle-pack" target="_blank" rel="nofollow">Media Grid - Bundle Pack</a></li>
59
  </ul>
60
  </p>
61
  </div>
includes/image-zoom-admin-template.php CHANGED
@@ -1,9 +1,10 @@
1
  <?php
2
 
3
- require_once 'image-zoom-forms-helper.php';
4
 
5
  $iz_admin = new ImageZoooom_Admin;
6
- $iz_forms_helper = new ImageZoooom_FormsHelper;
 
7
 
8
  $assets_url = IMAGE_ZOOM_URL . '/assets';
9
 
@@ -13,8 +14,11 @@ if ( $settings == false ) {
13
  }
14
  $messages = $iz_admin->show_messages();
15
 
16
-
17
- include_once( 'premium-tooltips.php' );
 
 
 
18
 
19
  ?>
20
 
@@ -59,7 +63,7 @@ include_once( 'premium-tooltips.php' );
59
  <input type="radio" name="<?php echo $lensShape['name'] ?>" id="<?php echo $_id ?>" value="<?php echo $_id ?>" <?php echo ($lensShape['value'] == $_id) ? 'checked' : '' ?> />
60
  <div class="icon-in-label ndd-spot-icon icon-style-1"<?php echo $toggle; ?>>
61
  <div class="ndd-icon-main-element">
62
- <i class="<?php echo $_value[0]; ?>"></i>
63
  </div>
64
  </div>
65
  </label>
@@ -87,9 +91,6 @@ include_once( 'premium-tooltips.php' );
87
  <li class="" id="tab_zoom_window">
88
  <a href="#zoom_window_settings" data-toggle="tab" aria-expanded="false"><?php _e('Zoom Window', 'wp-image-zoooom'); ?></a>
89
  </li>
90
- <li class="" id="tab_custom_text">
91
- <a href="#custom_text" data-toggle="tab" aria-expanded="false"><?php _e('Custom Text', 'wp-image-zoooom'); ?></a>
92
- </li>
93
  </ul>
94
 
95
  <div class="tab-content">
@@ -102,6 +103,8 @@ include_once( 'premium-tooltips.php' );
102
  if ( isset( $settings[$_field] ) ) {
103
  $this_settings['value'] = $settings[$_field];
104
  }
 
 
105
  $iz_forms_helper->input($this_settings['input_form'], $this_settings);
106
  }
107
  ?>
@@ -164,28 +167,6 @@ include_once( 'premium-tooltips.php' );
164
  ?>
165
  </div>
166
 
167
- <div class="tab-pane fade" id="custom_text">
168
- <?php
169
-
170
- $fields = array(
171
- 'customText',
172
- 'customTextSize',
173
- 'customTextColor',
174
- 'customTextAlign',
175
- );
176
-
177
- foreach ( $fields as $_field ) {
178
- $this_settings = $iz_admin->get_settings( $_field);
179
- $this_settings['value'] = '';
180
- if ( isset( $settings[$_field] ) ) {
181
- $this_settings['value'] = $settings[$_field];
182
- }
183
- $iz_forms_helper->input($this_settings['input_form'], $this_settings);
184
- }
185
-
186
- ?>
187
- </div>
188
-
189
  </div><!-- close "tab-content" -->
190
 
191
 
1
  <?php
2
 
3
+ require_once 'frm/forms-helper.php';
4
 
5
  $iz_admin = new ImageZoooom_Admin;
6
+ $iz_forms_helper = new SilkyPress_FormsHelper;
7
+ $iz_forms_helper->plugin_url = IMAGE_ZOOM_URL;
8
 
9
  $assets_url = IMAGE_ZOOM_URL . '/assets';
10
 
14
  }
15
  $messages = $iz_admin->show_messages();
16
 
17
+ require_once( 'frm/premium-tooltips.php' );
18
+ $message = __('Only available in <a href="%1$s" target="_blank">PRO version</a>', 'wp-image-zoooom');
19
+ $message = wp_kses( $message, array('a' => array('href' => array(), 'target'=> array())));
20
+ $message = sprintf( $message, 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner');
21
+ new SilkyPress_PremiumTooltips($message);
22
 
23
  ?>
24
 
63
  <input type="radio" name="<?php echo $lensShape['name'] ?>" id="<?php echo $_id ?>" value="<?php echo $_id ?>" <?php echo ($lensShape['value'] == $_id) ? 'checked' : '' ?> />
64
  <div class="icon-in-label ndd-spot-icon icon-style-1"<?php echo $toggle; ?>>
65
  <div class="ndd-icon-main-element">
66
+ <?php echo $_value[0]; ?>
67
  </div>
68
  </div>
69
  </label>
91
  <li class="" id="tab_zoom_window">
92
  <a href="#zoom_window_settings" data-toggle="tab" aria-expanded="false"><?php _e('Zoom Window', 'wp-image-zoooom'); ?></a>
93
  </li>
 
 
 
94
  </ul>
95
 
96
  <div class="tab-content">
103
  if ( isset( $settings[$_field] ) ) {
104
  $this_settings['value'] = $settings[$_field];
105
  }
106
+ $iz_forms_helper->label_class = 'col-sm-4 control-label';
107
+ $iz_forms_helper->non_label_class = 'col-sm-8';
108
  $iz_forms_helper->input($this_settings['input_form'], $this_settings);
109
  }
110
  ?>
167
  ?>
168
  </div>
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  </div><!-- close "tab-content" -->
171
 
172
 
includes/image-zoom-forms-helper.php DELETED
@@ -1,137 +0,0 @@
1
- <?php
2
-
3
- class ImageZoooom_FormsHelper {
4
-
5
- public $label_class = 'col-sm-5 control-label';
6
-
7
- public function input( $type, $settings = array() ) {
8
- if ( !isset($settings['label'] )) return;
9
- if ( !isset($settings['name'] )) return;
10
- $allowed_types = array( 'radio', 'input_text', 'buttons', 'input_color', 'checkbox' );
11
-
12
- if ( ! in_array( $type, $allowed_types ) ) {
13
- return;
14
- }
15
- $this->form_group_before( $settings, $type );
16
- call_user_func( array($this, $type), $settings );
17
- $this->form_group_after( $settings );
18
- }
19
-
20
- function form_group_before( $args = array(), $type ) {
21
- $disabled = ( isset($args['pro']) && $args['pro']) ? true : false;
22
-
23
- $output = "\t\t" . '<div class="form-group';
24
- if ( $type == 'radio' || $type == 'buttons' ) {
25
- $output .= ($disabled) ? ' disabled' : '';
26
- } else {
27
- $output .= ($disabled) ? ' disabled-short' : '';
28
- }
29
- $output .= '">' . PHP_EOL;
30
-
31
- $output .= "\t\t" . '<label class="'. $this->label_class .'">'. $args['label'] . PHP_EOL;
32
- if ( $disabled ) {
33
- $output .= "\t\t" . '<img src="'.IMAGE_ZOOM_URL.'assets/images/question_mark.svg" />' . PHP_EOL;
34
- }
35
- if ( isset($args['description']) && !$disabled ) {
36
- $output .= "\t\t" . $this->tooltip( $args['description'] );
37
- }
38
- $output .= "\t\t" . '</label>' . PHP_EOL;
39
-
40
- echo $output;
41
- }
42
-
43
- function form_group_after( $args = array() ) {
44
- echo "\t\t" . '</div>' . PHP_EOL;
45
- }
46
-
47
- public function radio($args = array()) {
48
- if ( !isset($args['values'] ) || count($args['values']) == 0 ) return;
49
- if ( !isset($args['active'] ) ) $args['active'] = '';
50
- $disabled = ( isset($args['pro']) && $args['pro']) ? ' disabled="disabled"': '';
51
- ?>
52
- <?php foreach ($args['values'] as $_id => $_label) : ?>
53
- <div class="radio"><label>
54
- <input type="radio" name="<?php echo $args['name'] ?>" id="<?php echo $_id ?>" value="<?php echo $_id ?>" <?php if ($_id == $args['active']) echo 'checked=""'; ?> <?php echo $disabled; ?>>
55
- <?php echo $_label ?>
56
- </label></div>
57
- <?php endforeach; ?>
58
- <?php
59
- }
60
-
61
- public function input_text( $args = array() ) {
62
- if ( ! isset($args['value'] ) ) $args['value'] = '';
63
- if ( ! isset($args['description'] ) ) $args['description'] = '';
64
- $disabled = ( isset($args['pro']) && $args['pro']) ? ' disabled="disabled"': '';
65
- ?>
66
- <?php if (isset($args['post_input'])) : ?>
67
- <div class="input-group">
68
- <?php else : ?>
69
- <div class="input-group">
70
- <?php endif; ?>
71
- <input type="text" class="form-control" id="<?php echo $args['name']?>" name="<?php echo $args['name'] ?>" value="<?php echo $args['value'] ?>" <?php echo $disabled; ?> />
72
- <?php if (isset($args['post_input'])) : ?><span class="input-group-addon"><?php echo $args['post_input'] ?></span>
73
- <?php endif; ?>
74
- </div>
75
- <?php
76
- }
77
-
78
-
79
- public function input_color( $args = array() ) {
80
- if ( ! isset($args['value'] ) ) $args['value'] = '';
81
- ?>
82
- <div class="input-group">
83
- <input type="color" class="form-control" id="<?php echo $args['name'] ?>" name="<?php echo $args['name'] ?>" value="<?php echo $args['value'] ?>">
84
- <span class="input-group-addon" id="color-text-color-hex"><?php echo $args['value'] ?></span>
85
- </div>
86
-
87
- <?php
88
- }
89
-
90
- public function checkbox( $args = array() ) {
91
- if ( ! isset($args['value'] ) ) $args['value'] = false;
92
- $disabled = ( isset($args['pro']) && $args['pro']) ? ' disabled="disabled"': '';
93
- ?>
94
- <div class="input-group input-group-checkbox">
95
- <label>
96
- <input type="checkbox" id="<?php echo $args['name'] ?>" name="<?php echo $args['name'] ?>" <?php echo ($args['value'] == true) ? 'checked=""' : '' ?> <?php $disabled; ?>/>
97
- </label>
98
- </div>
99
- <?php
100
- }
101
-
102
- public function buttons( $args = array() ) {
103
- if ( ! isset($args['values'] ) || count($args['values']) == 0 ) return;
104
- if ( ! isset($args['value'] ) ) $args['value'] = '';
105
- if ( ! isset($args['buttons'] ) ) $args['buttons'] = 'image';
106
- $disabled = ( isset($args['pro']) && $args['pro']) ? ' disabled="disabled"': '';
107
- ?>
108
- <div class="col-sm-7">
109
- <div class="btn-group btn-group-no-margin" data-toggle="buttons" id="btn-group-style-circle">
110
- <?php foreach( $args['values'] as $_id => $_value ) : ?>
111
- <?php $toggle = ( ! empty($_value[1]) ) ? ' data-toggle="tooltip" data-placement="top" title="'.$_value[1].'" data-original-title="' . $_value[1] . '"' : ''; ?>
112
- <label class="btn btn-default<?php echo ($args['value'] == $_id) ? ' active' : ''; echo (strlen($disabled)) ? ' disabled' : ''; ?> ">
113
- <input type="radio" name="<?php echo $args['name'] ?>" id="<?php echo $_id ?>" value="<?php echo $_id ?>" <?php echo ($args['value'] == $_id) ? 'checked' : '' ?> <?php echo $disabled; ?> />
114
- <div class="icon-in-label ndd-spot-icon icon-style-1" <?php echo $toggle; ?>>
115
- <div class="ndd-icon-main-element">
116
- <?php if($args['buttons'] == 'image') : ?>
117
- <img src="<?php echo IMAGE_ZOOM_URL.'assets/' . $_value[0] ?>"<?php echo $toggle; ?> />
118
- <?php else : ?>
119
- <i class="<?php echo $_value[0]; ?>"></i>
120
- <?php endif; ?>
121
- </div>
122
- </div>
123
- </label>
124
- <?php endforeach; ?>
125
- </div>
126
- </div>
127
- <?php
128
- }
129
-
130
- public function tooltip( $description = '' ) {
131
- if ( empty($description) ) return '';
132
- return '<img src="'.IMAGE_ZOOM_URL.'assets/images/question_mark.svg" data-toggle="tooltip" data-placement="top" title="" data-original-title="'.$description.'" />';
133
- }
134
-
135
- }
136
-
137
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/image-zoom-warnings.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly
5
- }
6
-
7
- /**
8
- * ImageZoooom_Warnings
9
- */
10
- class ImageZoooom_Warnings {
11
-
12
- var $allowed_actions = array(
13
- 'iz_dismiss_ajax_product_filters',
14
- 'iz_dismiss_jetpack',
15
- 'iz_dismiss_avada',
16
- 'iz_dismiss_shopkeeper',
17
- 'iz_dismiss_bwp_minify',
18
- 'iz_dismiss_wooswipe',
19
- );
20
-
21
- var $notices = array();
22
-
23
- /**
24
- * Constructor
25
- */
26
- public function __construct() {
27
-
28
- add_action( 'wp_ajax_iz_dismiss', array( $this, 'notice_dismiss' ) );
29
-
30
- if ( ! function_exists( 'is_plugin_active' ) ) {
31
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
32
- }
33
-
34
- if ( isset( $_SERVER ) && isset( $_SERVER['REQUEST_URI'] ) ) {
35
- if ( strpos( $_SERVER['REQUEST_URI'], 'zoooom_settings' ) === false )
36
- return;
37
- }
38
-
39
- $this->iz_dismiss_ajax_product_filters();
40
- $this->iz_dismiss_jetpack();
41
- $this->iz_dismiss_avada();
42
- $this->iz_dismiss_shopkeeper();
43
- $this->iz_dismiss_bwp_minify();
44
- $this->iz_dismiss_wooswipe();
45
-
46
- add_action( 'admin_notices', array($this, 'show_admin_notice') );
47
- }
48
-
49
-
50
- /**
51
- * Warning about AJAX product filter plugins
52
- */
53
- function iz_dismiss_ajax_product_filters() {
54
- $continue = false;
55
-
56
- $general = get_option('zoooom_general');
57
- if ( isset($_POST['tab'] )) {
58
- $general['woo_cat'] = (isset($_POST['woo_cat'])) ? true : false;
59
- }
60
- if ( ! isset($general['woo_cat']) || $general['woo_cat'] != true ) return false;
61
-
62
- if ( is_plugin_active( 'woocommerce-ajax-filters/woocommerce-filters.php' ) ) $continue = true;
63
- if ( is_plugin_active( 'load-more-products-for-woocommerce/load-more-products.php' ) ) $continue = true;
64
- if ( is_plugin_active( 'wc-ajax-product-filter/wcapf.php' ) ) $continue = true;
65
-
66
- if ( !$continue ) return false;
67
-
68
- $article_url = 'https://www.silkypress.com/wp-image-zoom/zoom-woocommerce-category-page-ajax/';
69
-
70
- $message = sprintf(__( 'You are using the zoom on WooCommerce shop pages in combination with a plugin that loads more products with AJAX (a product filter plugin or a "load more" products plugin). You\'ll notice that the zoom isn\'t applied after new products are loaded with AJAX. Please read <a href="%1$s" target="_blank">this article for a solution</a>.', 'wp-image-zoooom' ), $article_url);
71
-
72
- $this->add_notice( 'iz_dismiss_ajax_product_filters', $message );
73
- }
74
-
75
-
76
- /**
77
- * Check if Jetpack Photon module is active
78
- */
79
- function iz_dismiss_jetpack() {
80
- if ( ! defined('JETPACK__VERSION' ) ) return false;
81
-
82
- if ( ! Jetpack::is_module_active( 'photon' ) ) return false;
83
-
84
- $message = __( 'WP Image Zoom plugin is not compatible with the <a href="admin.php?page=jetpack">Jetpack Photon</a> module. If you find that the zoom is not working, try to deactivate the Photon module and see if that solves it.', 'wp-image-zoooom' );
85
-
86
- $this->add_notice( 'iz_dismiss_jetpack', $message );
87
- }
88
-
89
-
90
- /**
91
- * Check if the Avada theme is active
92
- */
93
- function iz_dismiss_avada() {
94
- if ( get_template() != 'Avada' ) return false;
95
-
96
- if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) return false;
97
-
98
- $flexslider_url = 'https://woocommerce.com/flexslider/';
99
- $pro_url = 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner';
100
-
101
- $message = sprintf( __( 'The WP Image Zoom plugin <b>will not work</b> on the WooCommerce products gallery with the Avada theme. The Avada theme changes entirely the default WooCommerce gallery with the <a href="%1$s" target="_blank">Flexslider gallery</a> and the zoom plugin does not support the Flexslider gallery. Please check the <a href="%2$s" target="_blank">PRO version</a> of the plugin for compatibility with the Flexslider gallery.', 'wp-image-zoooom' ), $flexslider_url, $pro_url );
102
-
103
- $this->add_notice( 'iz_dismiss_avada', $message );
104
- }
105
-
106
-
107
- /**
108
- * Check if for the Shopkeeper theme
109
- */
110
- function iz_dismiss_shopkeeper() {
111
- if ( get_template() != 'shopkeeper' ) return false;
112
-
113
- if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) return false;
114
-
115
- $pro_url = 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner';
116
-
117
- $message = sprintf( __( 'The WP Image Zoom plugin <b>will not work</b> on the WooCommerce products gallery with the Shopkeeper theme. The Shopkeeper theme changes entirely the default WooCommerce gallery with a custom made gallery not supported by the free version of the WP Image Zoom plugin. Please check the <a href="%1$s" target="_blank">PRO version</a> of the plugin for compatibility with the Shopkeeper\'s gallery.', 'wp-image-zoooom' ), $pro_url );
118
-
119
- $this->add_notice( 'iz_dismiss_shopkeeper', $message, 'updated settings-error notice is-dismissible' );
120
- }
121
-
122
-
123
- /**
124
- * Warning about BWF Minify settings
125
- */
126
- function iz_dismiss_bwp_minify() {
127
- if ( ! is_plugin_active( 'bwp-minify/bwp-minify.php' ) ) return false;
128
-
129
- $url = 'https://www.silkypress.com/wp-content/uploads/2016/09/image-zoom-bwp.png';
130
-
131
- $message = sprintf(__( '<b>If the zoom does not show up</b> on your website, it could be because you need to add the “image_zoooom-init” and the “image_zoooom” to the “Scripts to NOT minify” option in the BWP Minify settings, as shown in <a href="%1$s" target="_blank">this screenshot</a>.', 'wp-image-zoooom' ), $url);
132
-
133
- $this->add_notice( 'iz_dismiss_bwp_minify', $message );
134
- }
135
-
136
-
137
- /**
138
- * Warning about WooSwipe plugin
139
- */
140
- function iz_dismiss_wooswipe() {
141
-
142
- if ( ! is_plugin_active( 'wooswipe/wooswipe.php' ) ) return false;
143
-
144
- $pro_url = 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner';
145
- $wooswipe_url = 'https://wordpress.org/plugins/wooswipe/';
146
-
147
- $message = sprintf( __( 'WP Image Zoom plugin is <b>not compatible with the <a href="%1$s">WooSwipe WooCommerce Gallery</a> plugin</b>. You can try the zoom plugin with the default WooCommerce gallery by deactivating the WooSwipe plugin. Alternatively, you can upgrade to the WP Image Zoom Pro version, where the issue with the WooSwipe plugin is fixed.' ), $wooswipe_url, $pro_url);
148
-
149
- $this->add_notice( 'iz_dismiss_woo_swipe', $message );
150
- }
151
-
152
-
153
- /**
154
- * Add this message to the $this->notices array
155
- */
156
- function add_notice($id, $message, $class = '') {
157
- if ( get_option($id) != false ) return false;
158
-
159
- $notice = array(
160
- 'id' => $id,
161
- 'message' => $message,
162
- );
163
- if ( !empty($class) ) $notice['class'] = $class;
164
-
165
- $this->notices[] = $notice;
166
- }
167
-
168
-
169
- /**
170
- * Show the admin notices
171
- * */
172
- function show_admin_notice() {
173
- if ( !is_array($this->notices) || count($this->notices) == 0 ) return;
174
-
175
- foreach( $this->notices as $_n ) {
176
- $nonce = wp_create_nonce( $_n['id'] );
177
- if ( !isset($_n['class'])) $_n['class'] = 'notice notice-warning is-dismissible';
178
- $_n['class'] .= ' iz-notice-dismiss';
179
- printf( '<div class="%1$s" id="%2$s" data-nonce="%3$s"><p>%4$s</p></div>', $_n['class'], $_n['id'], $nonce, $_n['message'] );
180
- }
181
- ?>
182
- <script type='text/javascript'>
183
- jQuery(function($){
184
- $(document).on( 'click', '.iz-notice-dismiss', function() {
185
- var id = $(this).attr('id');
186
- var data = {
187
- action: 'iz_dismiss',
188
- option: id,
189
- nonce: $(this).data('nonce'),
190
- };
191
- $.post(ajaxurl, data, function(response ) {
192
- $('#'+id).fadeOut('slow');
193
- });
194
- });
195
- });
196
- </script>
197
- <?php
198
- }
199
-
200
-
201
- /**
202
- * Ajax response for `notice_dismiss` action
203
- */
204
- function notice_dismiss() {
205
-
206
- $option = $_POST['option'];
207
-
208
- if ( ! in_array($option, $this->allowed_actions ) ) return;
209
-
210
- check_ajax_referer( $option, 'nonce' );
211
-
212
- update_option( $option, 1 );
213
-
214
- wp_die();
215
- }
216
-
217
- }
218
-
219
-
220
- return new ImageZoooom_Warnings();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/premium-tooltips.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
-
3
- $message = __('Only available in <a href="%1$s" target="_blank">PRO version</a>', 'wp-image-zoooom');
4
- $message = wp_kses( $message, array('a' => array('href' => array(), 'target'=> array())));
5
- $message = sprintf( $message, 'https://www.silkypress.com/wp-image-zoom-plugin/?utm_source=wordpress&utm_campaign=iz_free&utm_medium=banner');
6
-
7
-
8
- ?>
9
-
10
- <div id="wpfc-premium-tooltip" style="display:none;width: 230px; height: 60px; position: absolute; margin-left: 354px; margin-top: 112px; color: white;">
11
- <div style="float:left;width:13px;">
12
- <div style="width: 0px; height: 0px; border-top: 6px solid transparent; border-right: 6px solid #333333; border-bottom: 6px solid transparent; float: right; margin-right: 0px; margin-top: 16px;"></div>
13
- </div>
14
- <div style="font-family:sans-serif;font-size:13px;text-align: center; border-radius: 5px; float: left; background-color: rgb(51, 51, 51); color: white; width: 210px; padding: 10px 0px;">
15
- <label><?php echo $message; ?></label>
16
- </div>
17
- </div>
18
-
19
- <script type="text/javascript">
20
- jQuery(document).ready(function($){
21
- $(".form-group.disabled-short, .form-group.disabled").click(function(e){
22
- if(typeof window.tooltip != "undefined"){
23
- clearTimeout(window.tooltip);
24
- }
25
-
26
- var inputCon = $(e.currentTarget).find(".input-group");
27
- var left = 30;
28
-
29
-
30
- $(e.currentTarget).children().each(function(i, child){
31
- left += $(child).width();
32
- });
33
-
34
- var offsetTop = $(e.currentTarget).offset().top - 38;
35
- offsetTop -= $('h2').offset().top - 52;
36
-
37
- $("#wpfc-premium-tooltip").css({"margin-left" : left + "px", "margin-top" : offsetTop + "px"});
38
- $("#wpfc-premium-tooltip").fadeIn( "slow", function() {
39
- window.tooltip = setTimeout(function(){ $("#wpfc-premium-tooltip").hide(); }, 1000);
40
- });
41
- return;
42
- });
43
-
44
- $(".form-group.disabled").click(function(e){
45
- if(typeof window.tooltip != "undefined"){
46
- clearTimeout(window.tooltip);
47
- }
48
-
49
- var left = $(e.currentTarget).width();
50
- var offsetTop = $(e.currentTarget).offset().top - 38;
51
- offsetTop -= $('h2').offset().top - 52;
52
-
53
- $("#wpfc-premium-tooltip").css({"margin-left" : left + "px", "margin-top" : offsetTop + "px"});
54
- $("#wpfc-premium-tooltip").fadeIn( "slow", function() {
55
- window.tooltip = setTimeout(function(){ $("#wpfc-premium-tooltip").hide(); }, 1000);
56
- });
57
- return false;
58
- });
59
- });
60
- </script>
61
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/settings.php CHANGED
@@ -18,26 +18,26 @@ function wp_image_zoooom_settings($type) {
18
  'lensShape' => array(
19
  'label' => __('Lens Shape', $l),
20
  'values' => array(
21
- 'none' => array('icon-lens_shape_none', __('No Lens', $l)),
22
- 'round' => array('icon-lens_shape_circle', __('Circle Lens', $l)),
23
- 'square' => array('icon-lens_shape_square', __('Square Lens', $l)),
24
- 'zoom_window' => array('icon-type_zoom_window', __('With Zoom Window', $l)),
25
  ),
26
  'value' => 'zoom_window',
27
  'input_form' => 'buttons',
28
- 'buttons' => 'i',
29
  ),
30
  'cursorType' => array(
31
  'label' => __('Cursor Type', $l),
32
  'values' => array(
33
- 'default' => array('icon-cursor_type_default', __('Default', $l ) ),
34
- 'pointer' => array('icon-cursor_type_pointer', __('Pointer', $l ) ),
35
- 'crosshair' => array('icon-cursor_type_crosshair', __('Crosshair', $l ) ),
36
- 'zoom-in' => array('icon-zoom-in', __('Zoom', $l ) ),
37
  ),
38
  'value' => 'default',
39
  'input_form' => 'buttons',
40
- 'buttons' => 'i',
41
  ),
42
  'zwEasing' => array(
43
  'label' => __('Animation Easing Effect', $l ),
@@ -176,6 +176,7 @@ function wp_image_zoooom_settings($type) {
176
  'pro' => true,
177
  'input_form' => 'checkbox',
178
  'description' => __('Some themes implement a Lightbox for WooCommerce galleris that opens on click. Enabling this checkbox will remove the Lightbox on thumbnail images and leave it only on the main image', 'wp-image-zoooom'),
 
179
  ),
180
  'remove_lightbox' => array(
181
  'label' => __('Remove the Lightbox', $l),
@@ -183,18 +184,21 @@ function wp_image_zoooom_settings($type) {
183
  'pro' => true,
184
  'input_form' => 'checkbox',
185
  'description' => __('Some themes implement a Lightbox that opens on click on the image. Enabling this checkbox will remove the Lightbox'),
 
186
  ),
187
  'woo_variations' => array(
188
  'label' => __('Enable on WooCommerce variation products', $l),
189
  'value' => false,
190
  'pro' => true,
191
  'input_form' => 'checkbox',
 
192
  ),
193
  'force_attachments' => array(
194
  'label' => __('Enable on attachments pages', $l),
195
  'value' => false,
196
  'pro' => true,
197
  'input_form' => 'checkbox',
 
198
  ),
199
  'custom_class' => array(
200
  'label' => __('Apply zoom on this particular image(s)', $l),
@@ -202,12 +206,14 @@ function wp_image_zoooom_settings($type) {
202
  'pro' => true,
203
  'input_form' => 'input_text',
204
  'description' => __('CSS style selector(s) for identifying the image(s) on which to apply the zoom.', $l ),
 
205
  ),
206
  'flexslider' => array(
207
  'label' => __('FlexSlider container class', $l),
208
  'value' => '',
209
  'pro' => true,
210
  'input_form' => 'input_text',
 
211
  ),
212
  'owl' => array(
213
  'label' => __('<a href="https://www.silkypress.com/i/js-owl" target="_blank">Owl Carousel</a> container class', $l),
@@ -215,6 +221,7 @@ function wp_image_zoooom_settings($type) {
215
  'input_form' => 'input_text',
216
  'pro' => true,
217
  'description' => __('If the images are in a Owl Carousel gallery, then type in here the class of the div containing the Owl Carousel gallery', $l ),
 
218
  ),
219
  'flickity' => array(
220
  'label' => __('<a href="https://flickity.metafizzy.co/" target="_blank">Flickity Carousel</a> container class', $l),
@@ -222,6 +229,7 @@ function wp_image_zoooom_settings($type) {
222
  'input_form' => 'input_text',
223
  'pro' => true,
224
  'description' => __('If the images are in a Flickity Carousel gallery, then type in here the class of the div containing the Flickity Carousel gallery', $l ),
 
225
  ),
226
  'slick' => array(
227
  'label' => __('<a href="https://kenwheeler.github.io/slick/" target="_blank">Slick carousel</a> container class', $l),
@@ -229,34 +237,21 @@ function wp_image_zoooom_settings($type) {
229
  'input_form' => 'input_text',
230
  'description' => __('If the images are in a Slick carousel gallery, then type in here the class of the div containing the Slick carousel gallery', $l ),
231
  'pro' => true,
 
232
  ),
233
-
234
-
235
- /*
236
- 'enable_fancybox' => array(
237
- 'label' => __('Enable inside <a href="http://fancyapps.com/fancybox/" target="_blank">fancyBox</a> lightbox', $l),
238
- 'value' => false,
239
- 'pro' => true,
240
- 'input_form' => 'checkbox',
241
- ),
242
- 'enable_jetpack_carousel' => array(
243
- 'label' => __('Enable inside <a href="https://jetpack.com/ support/carousel/" target="_blank">Jetpack Carousel</a> lightbox', $l),
244
- 'value' => false,
245
- 'pro' => true,
246
- 'input_form' => 'checkbox',
247
- ),
248
- */
249
  'huge_it_gallery' => array(
250
  'label' => __('<a href="https://www.silkypress.com/i/wp-huge-it-gallery" target="_blank">Huge IT Gallery</a> id', $l),
251
  'value' => '',
252
  'pro' => true,
253
  'input_form' => 'input_text',
 
254
  ),
255
  'enable_lightbox_zoom' => array(
256
- 'label' => __('Enable inside a Lightbox. <a href="#TB_inline?width=600&height=350&inlineId=supported-lightboxes" class="thickbox">See supported lightboxes</a>', $l),
257
  'value' => false,
258
  'pro' => true,
259
  'input_form' => 'checkbox',
 
260
  ),
261
  'onClick' => array(
262
  'label' => __('Enable the zoom on ...', $l),
@@ -267,38 +262,43 @@ function wp_image_zoooom_settings($type) {
267
  'value' => 'false',
268
  'input_form' => 'radio',
269
  'pro' => true,
 
270
  ),
271
  'ratio' => array(
272
  'label' => __('Zoom Level', $l),
273
  'values' => array(
274
- 'default' => array( 'icon-zoom_level_default', __('Default', $l) ),
275
- '1.5' => array( 'icon-zoom_level_15', __('1,5 times', $l) ),
276
- '2' => array( 'icon-zoom_level_2', __('2 times', $l) ),
277
- '2.5' => array( 'icon-zoom_level_25', __('2,5 times', $l) ),
278
- '3' => array( 'icon-zoom_level_3', __('3 times', $l) ),
279
  ),
280
  'value' => 'default',
281
  'input_form' => 'buttons',
282
  'pro' => true,
283
- 'buttons' => 'i',
 
284
  ),
285
  'lensColour' => array(
286
  'label' => __('Lens Color', $l ),
287
  'value' => '#ffffff',
288
  'pro' => true,
289
  'input_form' => 'input_color',
 
290
  ),
291
  'lensOverlay' => array(
292
  'label' => __('Show as Grid', $l ),
293
  'value' => false,
294
  'pro' => true,
295
  'input_form' => 'checkbox',
 
296
  ),
297
  'zwResponsive' => array(
298
  'label' => __('Responsive', $l),
299
  'input_form' => 'checkbox',
300
  'pro' => true,
301
  'value' => false,
 
302
  ),
303
  'zwResponsiveThreshold' => array(
304
  'label' => __('Responsive Threshold', $l),
@@ -306,34 +306,39 @@ function wp_image_zoooom_settings($type) {
306
  'post_input' => 'px',
307
  'value' => '',
308
  'input_form' => 'input_text',
 
309
  ),
310
  'zwPositioning' => array(
311
  'label' => __('Positioning', $l),
312
  'values' => array(
313
- 'right_top' => array('icon-type_zoom_window_right_top', __('Right Top', $l)),
314
- 'right_bottom' => array('icon-type_zoom_window_right_bottom', __('Right Bottom', $l)),
315
- 'right_center' => array('icon-type_zoom_window_right_center', __('Right Center', $l)),
316
- 'left_top' => array('icon-type_zoom_window_left_top', __('Left Top', $l)),
317
- 'left_bottom' => array('icon-type_zoom_window_left_bottom', __('Left Bottom', $l)),
318
- 'left_center' => array('icon-type_zoom_window_left_center', __('Left Center', $l)),
319
  ),
320
  'pro' => true,
321
  'value' => '',
322
  'disabled' => true,
323
  'input_form' => 'buttons',
324
- 'buttons' => 'i',
 
325
  ),
326
  'mousewheelZoom' => array(
327
  'label' => __('Mousewheel Zoom', $l),
328
  'value' => '',
329
  'pro' => true,
330
  'input_form' => 'checkbox',
 
331
  ),
 
332
  'customText' => array(
333
  'label' => __('Text on the image', $l),
334
  'value' => __('', $l),
335
  'input_form' => 'input_text',
336
  'pro' => true,
 
337
  ),
338
  'customTextSize' => array(
339
  'label' => __('Text Size', $l),
@@ -341,28 +346,32 @@ function wp_image_zoooom_settings($type) {
341
  'value' => '',
342
  'input_form' => 'input_text',
343
  'pro' => true,
 
344
  ),
345
  'customTextColor' => array(
346
  'label' => __('Text Color', $l),
347
  'value' => '',
348
  'input_form' => 'input_color',
349
  'pro' => true,
 
350
  ),
351
  'customTextAlign' => array(
352
  'label' => __('Text Align', $l),
353
  'values' => array(
354
- 'top_left' => array('icon-text_align_top_left', __('Top Left', $l ) ),
355
- 'top_center' => array('icon-text_align_top_center', __('Top Center', $l ) ),
356
- 'top_right' => array('icon-text_align_top_right', __('Top Right', $l ) ),
357
- 'bottom_left' => array('icon-text_align_bottom_left', __('Bottom Left', $l ) ),
358
- 'bottom_center' => array('icon-text_align_bottom_center', __('Bottom Center', $l ) ),
359
- 'bottom_right' => array('icon-text_align_bottom_right', __('Bottom Right', $l ) ),
360
  ),
361
  'value' => '',
362
  'input_form' => 'buttons',
363
  'pro' => true,
364
- 'buttons' => 'i',
 
365
  ),
 
366
 
367
 
368
  );
18
  'lensShape' => array(
19
  'label' => __('Lens Shape', $l),
20
  'values' => array(
21
+ 'none' => array('<i class="icon-lens_shape_none"></i>', __('No Lens', $l)),
22
+ 'round' => array('<i class="icon-lens_shape_circle"></i>', __('Circle Lens', $l)),
23
+ 'square' => array('<i class="icon-lens_shape_square"></i>', __('Square Lens', $l)),
24
+ 'zoom_window' => array('<i class="icon-type_zoom_window"></i>', __('With Zoom Window', $l)),
25
  ),
26
  'value' => 'zoom_window',
27
  'input_form' => 'buttons',
28
+ 'style' => 'full',
29
  ),
30
  'cursorType' => array(
31
  'label' => __('Cursor Type', $l),
32
  'values' => array(
33
+ 'default' => array('<i class="icon-cursor_type_default"></i>', __('Default', $l ) ),
34
+ 'pointer' => array('<i class="icon-cursor_type_pointer"></i>', __('Pointer', $l ) ),
35
+ 'crosshair' => array('<i class="icon-cursor_type_crosshair"></i>', __('Crosshair', $l ) ),
36
+ 'zoom-in' => array('<i class="icon-zoom-in"></i>', __('Zoom', $l ) ),
37
  ),
38
  'value' => 'default',
39
  'input_form' => 'buttons',
40
+ 'style' => 'full',
41
  ),
42
  'zwEasing' => array(
43
  'label' => __('Animation Easing Effect', $l ),
176
  'pro' => true,
177
  'input_form' => 'checkbox',
178
  'description' => __('Some themes implement a Lightbox for WooCommerce galleris that opens on click. Enabling this checkbox will remove the Lightbox on thumbnail images and leave it only on the main image', 'wp-image-zoooom'),
179
+ 'disabled' => true,
180
  ),
181
  'remove_lightbox' => array(
182
  'label' => __('Remove the Lightbox', $l),
184
  'pro' => true,
185
  'input_form' => 'checkbox',
186
  'description' => __('Some themes implement a Lightbox that opens on click on the image. Enabling this checkbox will remove the Lightbox'),
187
+ 'disabled' => true,
188
  ),
189
  'woo_variations' => array(
190
  'label' => __('Enable on WooCommerce variation products', $l),
191
  'value' => false,
192
  'pro' => true,
193
  'input_form' => 'checkbox',
194
+ 'disabled' => true,
195
  ),
196
  'force_attachments' => array(
197
  'label' => __('Enable on attachments pages', $l),
198
  'value' => false,
199
  'pro' => true,
200
  'input_form' => 'checkbox',
201
+ 'disabled' => true,
202
  ),
203
  'custom_class' => array(
204
  'label' => __('Apply zoom on this particular image(s)', $l),
206
  'pro' => true,
207
  'input_form' => 'input_text',
208
  'description' => __('CSS style selector(s) for identifying the image(s) on which to apply the zoom.', $l ),
209
+ 'disabled' => true,
210
  ),
211
  'flexslider' => array(
212
  'label' => __('FlexSlider container class', $l),
213
  'value' => '',
214
  'pro' => true,
215
  'input_form' => 'input_text',
216
+ 'disabled' => true,
217
  ),
218
  'owl' => array(
219
  'label' => __('<a href="https://www.silkypress.com/i/js-owl" target="_blank">Owl Carousel</a> container class', $l),
221
  'input_form' => 'input_text',
222
  'pro' => true,
223
  'description' => __('If the images are in a Owl Carousel gallery, then type in here the class of the div containing the Owl Carousel gallery', $l ),
224
+ 'disabled' => true,
225
  ),
226
  'flickity' => array(
227
  'label' => __('<a href="https://flickity.metafizzy.co/" target="_blank">Flickity Carousel</a> container class', $l),
229
  'input_form' => 'input_text',
230
  'pro' => true,
231
  'description' => __('If the images are in a Flickity Carousel gallery, then type in here the class of the div containing the Flickity Carousel gallery', $l ),
232
+ 'disabled' => true,
233
  ),
234
  'slick' => array(
235
  'label' => __('<a href="https://kenwheeler.github.io/slick/" target="_blank">Slick carousel</a> container class', $l),
237
  'input_form' => 'input_text',
238
  'description' => __('If the images are in a Slick carousel gallery, then type in here the class of the div containing the Slick carousel gallery', $l ),
239
  'pro' => true,
240
+ 'disabled' => true,
241
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  'huge_it_gallery' => array(
243
  'label' => __('<a href="https://www.silkypress.com/i/wp-huge-it-gallery" target="_blank">Huge IT Gallery</a> id', $l),
244
  'value' => '',
245
  'pro' => true,
246
  'input_form' => 'input_text',
247
+ 'disabled' => true,
248
  ),
249
  'enable_lightbox_zoom' => array(
250
+ 'label' => __('Enable inside a Lightbox. <a href="#TB_inline?width=600&height=400&inlineId=supported-lightboxes" class="thickbox">See supported lightboxes</a>', $l),
251
  'value' => false,
252
  'pro' => true,
253
  'input_form' => 'checkbox',
254
+ 'disabled' => true,
255
  ),
256
  'onClick' => array(
257
  'label' => __('Enable the zoom on ...', $l),
262
  'value' => 'false',
263
  'input_form' => 'radio',
264
  'pro' => true,
265
+ 'disabled' => true,
266
  ),
267
  'ratio' => array(
268
  'label' => __('Zoom Level', $l),
269
  'values' => array(
270
+ 'default' => array( '<i class="icon-zoom_level_default"></i>', __('Default', $l) ),
271
+ '1.5' => array( '<i class="icon-zoom_level_15"></i>', __('1,5 times', $l) ),
272
+ '2' => array( '<i class="icon-zoom_level_2"></i>', __('2 times', $l) ),
273
+ '2.5' => array( '<i class="icon-zoom_level_25"></i>', __('2,5 times', $l) ),
274
+ '3' => array( '<i class="icon-zoom_level_3"></i>', __('3 times', $l) ),
275
  ),
276
  'value' => 'default',
277
  'input_form' => 'buttons',
278
  'pro' => true,
279
+ 'style' => 'full',
280
+ 'disabled' => true,
281
  ),
282
  'lensColour' => array(
283
  'label' => __('Lens Color', $l ),
284
  'value' => '#ffffff',
285
  'pro' => true,
286
  'input_form' => 'input_color',
287
+ 'disabled' => true,
288
  ),
289
  'lensOverlay' => array(
290
  'label' => __('Show as Grid', $l ),
291
  'value' => false,
292
  'pro' => true,
293
  'input_form' => 'checkbox',
294
+ 'disabled' => true,
295
  ),
296
  'zwResponsive' => array(
297
  'label' => __('Responsive', $l),
298
  'input_form' => 'checkbox',
299
  'pro' => true,
300
  'value' => false,
301
+ 'disabled' => true,
302
  ),
303
  'zwResponsiveThreshold' => array(
304
  'label' => __('Responsive Threshold', $l),
306
  'post_input' => 'px',
307
  'value' => '',
308
  'input_form' => 'input_text',
309
+ 'disabled' => true,
310
  ),
311
  'zwPositioning' => array(
312
  'label' => __('Positioning', $l),
313
  'values' => array(
314
+ 'right_top' => array('<i class="icon-type_zoom_window_right_top"></i>', __('Right Top', $l)),
315
+ 'right_bottom' => array('<i class="icon-type_zoom_window_right_bottom"></i>', __('Right Bottom', $l)),
316
+ 'right_center' => array('<i class="icon-type_zoom_window_right_center"></i>', __('Right Center', $l)),
317
+ 'left_top' => array('<i class="icon-type_zoom_window_left_top"></i>', __('Left Top', $l)),
318
+ 'left_bottom' => array('<i class="icon-type_zoom_window_left_bottom"></i>', __('Left Bottom', $l)),
319
+ 'left_center' => array('<i class="icon-type_zoom_window_left_center"></i>', __('Left Center', $l)),
320
  ),
321
  'pro' => true,
322
  'value' => '',
323
  'disabled' => true,
324
  'input_form' => 'buttons',
325
+ 'style' => 'full',
326
+ 'disabled' => true,
327
  ),
328
  'mousewheelZoom' => array(
329
  'label' => __('Mousewheel Zoom', $l),
330
  'value' => '',
331
  'pro' => true,
332
  'input_form' => 'checkbox',
333
+ 'disabled' => true,
334
  ),
335
+ /*
336
  'customText' => array(
337
  'label' => __('Text on the image', $l),
338
  'value' => __('', $l),
339
  'input_form' => 'input_text',
340
  'pro' => true,
341
+ 'disabled' => true,
342
  ),
343
  'customTextSize' => array(
344
  'label' => __('Text Size', $l),
346
  'value' => '',
347
  'input_form' => 'input_text',
348
  'pro' => true,
349
+ 'disabled' => true,
350
  ),
351
  'customTextColor' => array(
352
  'label' => __('Text Color', $l),
353
  'value' => '',
354
  'input_form' => 'input_color',
355
  'pro' => true,
356
+ 'disabled' => true,
357
  ),
358
  'customTextAlign' => array(
359
  'label' => __('Text Align', $l),
360
  'values' => array(
361
+ 'top_left' => array('<i class="icon-text_align_top_left"></i>', __('Top Left', $l ) ),
362
+ 'top_center' => array('<i class="icon-text_align_top_center"></i>', __('Top Center', $l ) ),
363
+ 'top_right' => array('<i class="icon-text_align_top_right"></i>', __('Top Right', $l ) ),
364
+ 'bottom_left' => array('<i class="icon-text_align_bottom_left"></i>', __('Bottom Left', $l ) ),
365
+ 'bottom_center' => array('<i class="icon-text_align_bottom_center"></i>', __('Bottom Center', $l ) ),
366
+ 'bottom_right' => array('<i class="icon-text_align_bottom_right"></i>', __('Bottom Right', $l ) ),
367
  ),
368
  'value' => '',
369
  'input_form' => 'buttons',
370
  'pro' => true,
371
+ 'style' => 'full',
372
+ 'disabled' => true,
373
  ),
374
+ */
375
 
376
 
377
  );
languages/wp-image-zoooom-fr_FR.po CHANGED
@@ -99,19 +99,19 @@ msgstr ""
99
  "soient appliqués"
100
 
101
  #. Plugin Name of the plugin/theme
102
- #: includes/image-zoom-admin.php:31 includes/image-zoom-admin.php:32
103
  msgid "WP Image Zoom"
104
  msgstr "WP Image Zoom"
105
 
106
- #: includes/image-zoom-admin.php:113 includes/image-zoom-admin.php:130
107
  msgid "Your settings have been saved."
108
  msgstr "Vos paramètres ont été sauvegardés."
109
 
110
- #: includes/image-zoom-admin.php:302 includes/image-zoom-admin.php:319
111
  msgid "Unrecognized <b>%1$s</b>. The value was reset to <b>%2$s</b>"
112
  msgstr "Ignoré <b>%1$s</b>. La valeur a été réinitialisé à <b>%2$s</b>"
113
 
114
- #: includes/image-zoom-admin.php:339
115
  msgid ""
116
  "<b>%1$s</b> accepts values between %2$s and %3$s. Your value was reset to <b>"
117
  "%4$s</b>"
99
  "soient appliqués"
100
 
101
  #. Plugin Name of the plugin/theme
102
+ #: includes/admin-side.php:31 includes/admin-side.php:32
103
  msgid "WP Image Zoom"
104
  msgstr "WP Image Zoom"
105
 
106
+ #: includes/admin-side.php:113 includes/admin-side.php:130
107
  msgid "Your settings have been saved."
108
  msgstr "Vos paramètres ont été sauvegardés."
109
 
110
+ #: includes/admin-side.php:302 includes/admin-side.php:319
111
  msgid "Unrecognized <b>%1$s</b>. The value was reset to <b>%2$s</b>"
112
  msgstr "Ignoré <b>%1$s</b>. La valeur a été réinitialisé à <b>%2$s</b>"
113
 
114
+ #: includes/admin-side.php:339
115
  msgid ""
116
  "<b>%1$s</b> accepts values between %2$s and %3$s. Your value was reset to <b>"
117
  "%4$s</b>"
languages/wp-image-zoooom-ro_RO.po CHANGED
@@ -98,19 +98,19 @@ msgid "Don't forget to save the changes in order to apply them on the website"
98
  msgstr "Nu uita sa salvezi schimbarile pentru a fi aplicate pe site"
99
 
100
  #. Plugin Name of the plugin/theme
101
- #: includes/image-zoom-admin.php:31 includes/image-zoom-admin.php:32
102
  msgid "WP Image Zoom"
103
  msgstr "WP Image Zoom"
104
 
105
- #: includes/image-zoom-admin.php:113 includes/image-zoom-admin.php:130
106
  msgid "Your settings have been saved."
107
  msgstr "Setarile au fost salvate."
108
 
109
- #: includes/image-zoom-admin.php:302 includes/image-zoom-admin.php:319
110
  msgid "Unrecognized <b>%1$s</b>. The value was reset to <b>%2$s</b>"
111
  msgstr "Valoarea <b>%1$s</b> nu e acceptabila. A fost resetata la <b>%2$s</b>."
112
 
113
- #: includes/image-zoom-admin.php:339
114
  msgid ""
115
  "<b>%1$s</b> accepts values between %2$s and %3$s. Your value was reset to <b>"
116
  "%4$s</b>"
98
  msgstr "Nu uita sa salvezi schimbarile pentru a fi aplicate pe site"
99
 
100
  #. Plugin Name of the plugin/theme
101
+ #: includes/admin-side.php:31 includes/admin-side.php:32
102
  msgid "WP Image Zoom"
103
  msgstr "WP Image Zoom"
104
 
105
+ #: includes/admin-side.php:113 includes/admin-side.php:130
106
  msgid "Your settings have been saved."
107
  msgstr "Setarile au fost salvate."
108
 
109
+ #: includes/admin-side.php:302 includes/admin-side.php:319
110
  msgid "Unrecognized <b>%1$s</b>. The value was reset to <b>%2$s</b>"
111
  msgstr "Valoarea <b>%1$s</b> nu e acceptabila. A fost resetata la <b>%2$s</b>."
112
 
113
+ #: includes/admin-side.php:339
114
  msgid ""
115
  "<b>%1$s</b> accepts values between %2$s and %3$s. Your value was reset to <b>"
116
  "%4$s</b>"
languages/wp-image-zoooom.pot CHANGED
@@ -95,19 +95,19 @@ msgstr ""
95
 
96
  #. #-#-#-#-# wp-image-zoooom.pot (WP Image Zoom 1.12) #-#-#-#-#
97
  #. Plugin Name of the plugin/theme
98
- #: includes/image-zoom-admin.php:31 includes/image-zoom-admin.php:32
99
  msgid "WP Image Zoom"
100
  msgstr ""
101
 
102
- #: includes/image-zoom-admin.php:113 includes/image-zoom-admin.php:130
103
  msgid "Your settings have been saved."
104
  msgstr ""
105
 
106
- #: includes/image-zoom-admin.php:302 includes/image-zoom-admin.php:319
107
  msgid "Unrecognized <b>%1$s</b>. The value was reset to <b>%2$s</b>"
108
  msgstr ""
109
 
110
- #: includes/image-zoom-admin.php:339
111
  msgid ""
112
  "<b>%1$s</b> accepts values between %2$s and %3$s. Your value was reset to <b>"
113
  "%4$s</b>"
95
 
96
  #. #-#-#-#-# wp-image-zoooom.pot (WP Image Zoom 1.12) #-#-#-#-#
97
  #. Plugin Name of the plugin/theme
98
+ #: includes/admin-side.php:31 includes/admin-side.php:32
99
  msgid "WP Image Zoom"
100
  msgstr ""
101
 
102
+ #: includes/admin-side.php:113 includes/admin-side.php:130
103
  msgid "Your settings have been saved."
104
  msgstr ""
105
 
106
+ #: includes/admin-side.php:302 includes/admin-side.php:319
107
  msgid "Unrecognized <b>%1$s</b>. The value was reset to <b>%2$s</b>"
108
  msgstr ""
109
 
110
+ #: includes/admin-side.php:339
111
  msgid ""
112
  "<b>%1$s</b> accepts values between %2$s and %3$s. Your value was reset to <b>"
113
  "%4$s</b>"
readme.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: diana_burduja
4
  Email: diana@burduja.eu
5
  Tags: e-commerce, featured image, hover over image zoom, image, image zoom, image zoom plugin, image magnification, image magnifier, jquery picture zoom, magnifier, magnify image, magnifying glass, mouse over image zoom, panorama, picture zoom, product image, product zoom, product magnification, product magnifier, responsive, woocommerce product zoom, woocommerce zoom, woocommerce magnifying glass, zoom, zoom image, zoom plugin, woocommerce image zoom, woocommerce product image zoom, woocommerce zoom magnifier
6
  Requires at least: 3.0.1
7
- Tested up to: 4.9
8
- Stable tag: 1.28
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Requires PHP: 5.2.4
@@ -50,7 +50,6 @@ The zoom works alright only with Image elements. Unfortunately, trying to apply
50
  * Works with Easy Digital Downloads featured images
51
  * Works with MarketPress - WordPress eCommerce
52
  * Zoom within Lightboxes and Carousels
53
- * You can place a text on the image like a watermark
54
  * You can choose the zoom window position (left or right from the image)
55
  * You can use on more than one image on the same page
56
  * Custom theme support
@@ -152,13 +151,18 @@ Alternatively you can upgrade to the Pro version, as there the zoom lens is buil
152
 
153
  == Changelog ==
154
 
 
 
 
 
155
  = 1.29 =
156
- * 02/11/2018
157
- * Check and declare compatibility with WooCommerce 3.5.0
 
158
  * Code refactoring
159
 
160
  = 1.28 =
161
- * 23/10/2018
162
  * Fix: the zoom is hidden behind a wrapper for all the Mikado-Themes
163
 
164
  = 1.27 =
@@ -167,7 +171,7 @@ Alternatively you can upgrade to the Pro version, as there the zoom lens is buil
167
  * Describe how to apply the zoom with different page builders
168
 
169
  = 1.26 =
170
- * 11/08/2018
171
  * Fix: add back prettyPhoto for the Sovereign theme
172
  * Fix: WooCommerce 3.0+ gallery with one image and with a flex gallery on the same page was not working
173
  * Fix: Flatsome theme with the default WooCommerce gallery, don't remove the gallery-slider support
@@ -175,24 +179,24 @@ Alternatively you can upgrade to the Pro version, as there the zoom lens is buil
175
  * Tweak: change the detectmobilebrowser library from jQuery to pure JS
176
 
177
  = 1.25 =
178
- * 31/03/2018
179
  * Fix: Fatal error for PHP older than 5.5
180
  * Code refactory
181
 
182
  = 1.24 =
183
- * 29/03/2018
184
  * Fix: Allow the default WooCommerce lightbox along with the zoom
185
  * Fix: WC3 with the "Remove Lightbox" option disabled showed a lingering image after closing the lightbox.
186
  * Security fix: check the option name against an array of allowed values. (https://advisories.dxw.com/advisories/wp-image-zoom-dos/)
187
  * Tweak: update the list of themes that add a whole page wrapper with the z-index higher than the zoom
188
 
189
  = 1.23 =
190
- * 08/02/2018
191
  * Fix: on window resize, show zoom on WooCommerce gallery only if the option is enabled (https://wordpress.org/support/topic/disabling-the-zoom-not-working/)
192
  * Fix: if the image's width is set to 0, then there is "division by zero" warning
193
 
194
  = 1.22 =
195
- * 30/01/2018
196
  * Fix: on window resize, show zoom on WooCommerce category pages only if the option is enabled (https://wordpress.org/support/topic/disabling-the-zoom-not-working/)
197
 
198
  = 1.21 =
4
  Email: diana@burduja.eu
5
  Tags: e-commerce, featured image, hover over image zoom, image, image zoom, image zoom plugin, image magnification, image magnifier, jquery picture zoom, magnifier, magnify image, magnifying glass, mouse over image zoom, panorama, picture zoom, product image, product zoom, product magnification, product magnifier, responsive, woocommerce product zoom, woocommerce zoom, woocommerce magnifying glass, zoom, zoom image, zoom plugin, woocommerce image zoom, woocommerce product image zoom, woocommerce zoom magnifier
6
  Requires at least: 3.0.1
7
+ Tested up to: 5.0
8
+ Stable tag: 1.30
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Requires PHP: 5.2.4
50
  * Works with Easy Digital Downloads featured images
51
  * Works with MarketPress - WordPress eCommerce
52
  * Zoom within Lightboxes and Carousels
 
53
  * You can choose the zoom window position (left or right from the image)
54
  * You can use on more than one image on the same page
55
  * Custom theme support
151
 
152
  == Changelog ==
153
 
154
+ = 1.30 =
155
+ * 12/13/2018
156
+ * Fix: remove "trunk" folder from tags. This leads to a "The plugin does not have a valid header" error during the installation
157
+
158
  = 1.29 =
159
+ * 12/09/2018
160
+ * Check and declare compatibility with WooCommerce 3.5
161
+ * Check and declare compatibility with WordPress 5.0
162
  * Code refactoring
163
 
164
  = 1.28 =
165
+ * 10/23/2018
166
  * Fix: the zoom is hidden behind a wrapper for all the Mikado-Themes
167
 
168
  = 1.27 =
171
  * Describe how to apply the zoom with different page builders
172
 
173
  = 1.26 =
174
+ * 08/11/2018
175
  * Fix: add back prettyPhoto for the Sovereign theme
176
  * Fix: WooCommerce 3.0+ gallery with one image and with a flex gallery on the same page was not working
177
  * Fix: Flatsome theme with the default WooCommerce gallery, don't remove the gallery-slider support
179
  * Tweak: change the detectmobilebrowser library from jQuery to pure JS
180
 
181
  = 1.25 =
182
+ * 03/31/2018
183
  * Fix: Fatal error for PHP older than 5.5
184
  * Code refactory
185
 
186
  = 1.24 =
187
+ * 03/29/2018
188
  * Fix: Allow the default WooCommerce lightbox along with the zoom
189
  * Fix: WC3 with the "Remove Lightbox" option disabled showed a lingering image after closing the lightbox.
190
  * Security fix: check the option name against an array of allowed values. (https://advisories.dxw.com/advisories/wp-image-zoom-dos/)
191
  * Tweak: update the list of themes that add a whole page wrapper with the z-index higher than the zoom
192
 
193
  = 1.23 =
194
+ * 02/08/2018
195
  * Fix: on window resize, show zoom on WooCommerce gallery only if the option is enabled (https://wordpress.org/support/topic/disabling-the-zoom-not-working/)
196
  * Fix: if the image's width is set to 0, then there is "division by zero" warning
197
 
198
  = 1.22 =
199
+ * 01/30/2018
200
  * Fix: on window resize, show zoom on WooCommerce category pages only if the option is enabled (https://wordpress.org/support/topic/disabling-the-zoom-not-working/)
201
 
202
  = 1.21 =