WP Image Zoom - Version 1.42

Version Description

  • 07/10/2020
  • Fix: remove PHP warning
  • Show warning for incompatibility with Smart Image Resize for WooCommerce plugin
  • Fix: the zoom was making it hard to select the image element in Elementor, Divi Builder and WPBakery
Download this release

Release Info

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

Code changes from version 1.41.1 to 1.42

assets/js/image_zoom-init.js CHANGED
@@ -15,6 +15,11 @@ jQuery(document).ready(function( $ ){
15
  return;
16
  }
17
 
 
 
 
 
 
18
  var options = IZ.options;
19
 
20
  // Fix for the Lazy Load plugin with jQuery.sonar
15
  return;
16
  }
17
 
18
+ // Is this an Elementor editor iframe.
19
+ if ( $('body.elementor-editor-active').length > 0 || window.location.href.indexOf('vc_action=vc_inline') > 0 || window.location.href.indexOf('vc_editable=true') > 0 || window.location.href.indexOf('et_fb=') > 0 ) {
20
+ return;
21
+ }
22
+
23
  var options = IZ.options;
24
 
25
  // Fix for the Lazy Load plugin with jQuery.sonar
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.41.1
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: 4.1
16
  */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) {
@@ -26,7 +26,7 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
26
  * @class ImageZoooom
27
  */
28
  final class ImageZoooom {
29
- public $version = '1.41.1';
30
  public $theme = '';
31
  protected static $_instance = null;
32
 
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.42
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: 4.3
16
  */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) {
26
  * @class ImageZoooom
27
  */
28
  final class ImageZoooom {
29
+ public $version = '1.42';
30
  public $theme = '';
31
  protected static $_instance = null;
32
 
includes/admin-side.php CHANGED
@@ -231,14 +231,16 @@ class ImageZoooom_Admin {
231
  */
232
  public static function gutenberg_style() {
233
  echo '<style type="text/css">
234
- .edit-post-layout__content figure.is-style-zoooom::before{
235
- content: "\f179 Zoom applied to the image. Check on the frontend";
 
236
  position: absolute;
237
  margin-top: 12px;
238
  text-align: right;
239
  background-color: white;
 
 
240
  padding: 0 10px 6px;
241
- right: 0;
242
  font-family: dashicons;
243
  font-size: 0.9em;
244
  font-style: italic;
@@ -263,6 +265,7 @@ class ImageZoooom_Admin {
263
  'iz_dismiss_wooswipe',
264
  'iz_dismiss_avada_woo_gallery',
265
  'iz_dismiss_flatsome_theme',
 
266
  );
267
 
268
  $w = new SilkyPress_Warnings( $allowed_actions );
@@ -331,6 +334,12 @@ class ImageZoooom_Admin {
331
  $w->add_notice( 'iz_dismiss_flatsome_theme', $message );
332
  }
333
 
 
 
 
 
 
 
334
  $w->show_warnings();
335
  }
336
 
231
  */
232
  public static function gutenberg_style() {
233
  echo '<style type="text/css">
234
+ .wp-block-image.is-style-zoooom .components-resizable-box__container::before,
235
+ .wp-block-image.zoooom .components-resizable-box__container::before {
236
+ content: "\f179 ' . __( 'Zoom applied to the image. Check on the frontend', 'wp-image-zoooom' ) . '";
237
  position: absolute;
238
  margin-top: 12px;
239
  text-align: right;
240
  background-color: white;
241
+ line-height: 1.4em;
242
+ left: 5%;
243
  padding: 0 10px 6px;
 
244
  font-family: dashicons;
245
  font-size: 0.9em;
246
  font-style: italic;
265
  'iz_dismiss_wooswipe',
266
  'iz_dismiss_avada_woo_gallery',
267
  'iz_dismiss_flatsome_theme',
268
+ 'iz_dismiss_smart_image_resize',
269
  );
270
 
271
  $w = new SilkyPress_Warnings( $allowed_actions );
334
  $w->add_notice( 'iz_dismiss_flatsome_theme', $message );
335
  }
336
 
337
+ // Warning about Smart Image Resize plugin.
338
+ if ( is_plugin_active( 'smart-image-resize/plugpix-smart-image-resize.php' ) && $w->is_url( 'zoooom_settings' ) ) {
339
+ $message = __( 'The <b>Smart Image Resize for WooCommerce</b> plugin modifies the WooCommerce product images, which will result in a distorted zoom lens on those images. Unfortunately, if you plan to use the <b>WP Image Zoom PRO</b> plugin on the WooCommerce product images, then, you\'ll need to deactivate the <b>Smart Image Resize</b> plugin.', 'wp-image-zoooom-pro' );
340
+ $w->add_notice( 'iz_dismiss_smart_image_resize', $message );
341
+ }
342
+
343
  $w->show_warnings();
344
  }
345
 
includes/class-iz-compatibilities.php CHANGED
@@ -132,6 +132,25 @@ class IZ_Compatibilities {
132
  $style .= '.dialog-lightbox-widget-content[style] { top: 0 !important; left: 0 !important;}';
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  $type = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
136
  if ( ! empty( $style ) ) {
137
  echo '<style' . $type . '>' . $style . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
132
  $style .= '.dialog-lightbox-widget-content[style] { top: 0 !important; left: 0 !important;}';
133
  }
134
 
135
+ /**
136
+ * No active zoom in Elementor, WPBakery, Divi active editors.
137
+ */
138
+ $zoom_class_in_editor = ' { content: "\f179 ' . __( 'Zoom applied to the image. Check on the frontend', 'wp-image-zoooom' ) . '"; ' .
139
+ 'position: absolute; margin-top: 12px; text-align: right; background-color: white; line-height: 1.4em; left: 5%; ' .
140
+ 'padding: 0 10px 6px; font-family: dashicons; font-size: 0.9em; font-style: italic; z-index: 20; }';
141
+
142
+ if ( defined( 'ELEMENTOR_VERSION' ) ) {
143
+ $style .= 'body.elementor-editor-active .zoooom::before' . $zoom_class_in_editor;
144
+ }
145
+
146
+ if ( defined( 'WPB_VC_VERSION' ) ) {
147
+ $style .= '.vc_editor.compose-mode .zoooom::before' . $zoom_class_in_editor;
148
+ }
149
+
150
+ if ( strpos( $theme, 'divi' ) !== false ) {
151
+ $style .= 'body.et_pb_pagebuilder_layout.et-fb .zoooom::before' . $zoom_class_in_editor;
152
+ }
153
+
154
  $type = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
155
  if ( ! empty( $style ) ) {
156
  echo '<style' . $type . '>' . $style . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
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: 5.4
8
- Stable tag: 1.41.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Requires PHP: 5.2.4
@@ -154,9 +154,11 @@ Alternatively you can upgrade to the Pro version, as there the zoom lens is buil
154
 
155
  == Changelog ==
156
 
157
- = 1.41.1 =
158
- * 06/01/2020
159
  * Fix: remove PHP warning
 
 
160
 
161
  = 1.41 =
162
  * 05/29/2020
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.5
8
+ Stable tag: 1.42
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Requires PHP: 5.2.4
154
 
155
  == Changelog ==
156
 
157
+ = 1.42 =
158
+ * 07/10/2020
159
  * Fix: remove PHP warning
160
+ * Show warning for incompatibility with Smart Image Resize for WooCommerce plugin
161
+ * Fix: the zoom was making it hard to select the image element in Elementor, Divi Builder and WPBakery
162
 
163
  = 1.41 =
164
  * 05/29/2020