WP Image Zoom - Version 1.41

Version Description

  • 05/29/2020
  • Fix: compatibility with the WooCommerce product gallery on the Enfold theme
  • Declare compatibility with WooCommerce 4.1
Download this release

Release Info

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

Code changes from version 1.40.1 to 1.41

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.40.1
7
  * Author: SilkyPress
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
@@ -26,7 +26,7 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
26
  * @class ImageZoooom
27
  */
28
  final class ImageZoooom {
29
- public $version = '1.40.1';
30
  public $theme = '';
31
  protected static $_instance = null;
32
 
@@ -83,7 +83,8 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
83
  new ImageZoooom_Admin();
84
  }
85
  add_action( 'template_redirect', array( $this, 'template_redirect' ) );
86
- add_action( 'vc_after_init', array( $this, 'js_composer' ) );
 
87
  }
88
 
89
  /**
@@ -114,6 +115,10 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
114
  remove_action( 'thegem_woocommerce_single_product_left', 'thegem_woocommerce_single_product_gallery', 5 );
115
  add_action( 'thegem_woocommerce_single_product_left', 'woocommerce_show_product_images', 20 );
116
  }
 
 
 
 
117
  }
118
 
119
  add_filter( 'woocommerce_single_product_image_html', array( $this, 'woocommerce_single_product_image_html' ) );
@@ -125,7 +130,6 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
125
  add_filter( 'the_content', array( $this, 'find_bigger_image' ), 40 );
126
 
127
  add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
128
- add_action( 'wp_head', array( $this, 'wp_head_compatibilities' ) );
129
 
130
  add_filter( 'wp_calculate_image_srcset', array( $this, 'wp_calculate_image_srcset' ), 40, 5 );
131
  }
@@ -164,20 +168,6 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
164
  return $sources;
165
  }
166
 
167
- /**
168
- * Add zoom option in the vc_single_image shortcode in WPBakery
169
- */
170
- function js_composer() {
171
- if ( ! defined( 'WPB_VC_VERSION' ) ) {
172
- return false;
173
- }
174
- $param = WPBMap::getParam( 'vc_single_image', 'style' );
175
- if ( is_array( $param ) ) {
176
- $param['value'][ __( 'WP Image Zoooom', 'wp-image-zoooom' ) ] = 'zoooom';
177
- vc_update_shortcode_param( 'vc_single_image', $param );
178
- }
179
- }
180
-
181
  /**
182
  * Add data-thumbnail-src to the main product image
183
  */
@@ -269,105 +259,6 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
269
  }
270
 
271
 
272
- /**
273
- * wp_head compatibilities
274
- */
275
- function wp_head_compatibilities() {
276
- $theme = get_template();
277
-
278
- $opt = $this->get_option_general();
279
-
280
- // These themes add a wrapper on the whole page with index higher than the zoom
281
- $wrapper_themes = array(
282
- array(
283
- 'rule' => '.wrapper { z-index: 40 !important; }',
284
- 'themes' => array( 'bridge', 'nouveau', 'stockholm', 'tactile', 'vigor', 'homa', 'hudsonwp', 'borderland', 'moose' ),
285
- ),
286
- array(
287
- 'rule' => '.qodef-wrapper { z-index: 200 !important; }',
288
- 'themes' => array( 'kloe', 'startit', 'kudos', 'moments', 'ayro', 'suprema', 'ultima', 'geko', 'target', 'coney', 'aton', 'ukiyo', 'zenit', 'mixtape', 'scribbler', 'alecta', 'cityrama', 'bazaar' ),
289
- ),
290
- array(
291
- 'rule' => '.edgtf-wrapper { z-index: 40 !important; }',
292
- 'themes' => array( 'quadric', 'oxides', 'kvadrat', 'magazinevibe', 'kolumn', 'skyetheme', 'conall', 'dorianwp', 'node', 'ratio', 'escher', 'fair', 'assemble', 'any', 'walker', 'freestyle', 'shuffle', 'vangard', 'fuzion', 'crimson', 'cozy', 'xpo', 'onschedule', 'illustrator', 'oberon', 'fluid', 'barista', 'kamera', 'revolver', 'baker', 'rebellion', 'goodwish', 'maison', 'silverscreen', 'sovereign', 'atmosphere', 'dekko', 'objektiv', 'okami', 'coyote', 'bumblebee', 'blaze', 'mediadesk', 'penumbra', 'pxlz', 'gastrobar', 'aalto', 'dishup', 'voevod', 'orkan', 'fierce', 'grayson', 'hyperon', 'pintsandcrafts', 'haar', 'polyphonic', 'offbeat', 'hereford', 'kvell', 'sarto', 'journo', 'cinerama', 'ottar', 'playerx', 'kenozoik', 'elaine', 'entropia', 'tetsuo', 'bitpal', 'tahoe', 'urbango', 'smilte', 'neralbo', 'galatia', 'mintus', 'manon' ),
293
- ),
294
- array(
295
- 'rule' => '.edge-wrapper { z-index: 40 !important; }',
296
- 'themes' => array( 'dieter', 'anders', 'adorn', 'creedence', 'noizzy' ),
297
- ),
298
- array(
299
- 'rule' => '.edgt-wrapper { z-index: 40 !important; }',
300
- 'themes' => array( 'shade', 'eldritch', 'morsel', 'educator', 'milieu' ),
301
- ),
302
- array(
303
- 'rule' => '.sidebar-menu-push { z-index: 40 !important; }',
304
- 'themes' => array( 'artcore' ),
305
- ),
306
- array(
307
- 'rule' => '.eltdf-wrapper { z-index: 40 !important; }',
308
- 'themes' => array( 'readanddigest', 'tomasdaisy', 'virtuoso', 'blu', 'superfood', 'ambient', 'koto', 'azaleawp', 'all4home', 'mrseo', 'vibez', 'sweettooth', 'halogen', 'vino', 'ion', 'satine', 'nightshade', 'esmarts', 'makoto', 'mane', 'imogen', 'yvette', 'gourmand', 'sceon', 'calla', 'corretto', 'allston' ),
309
- ),
310
- array(
311
- 'rule' => '.eltd-wrapper { z-index: 40 !important; }',
312
- 'themes' => array( 'woly', 'averly', 'search-and-go', 'flow', 'kreate', 'allure', 'chandelier', 'malmo', 'minnesota', 'newsroom', 'kendall', 'savory', 'creator', 'awake', 'diorama', 'medipoint', 'audrey', 'findme', 'april', 'bizfinder', 'bjorn', 'trackstore', 'albergo', 'vakker', 'tamashi', 'bonvoyage' ),
313
- ),
314
- // Next three rules are to the Mikado-Themes
315
- array(
316
- 'rule' => '.wrapper {z-index: 20 !important; }',
317
- 'themes' => array( 'mikado1', 'onyx', 'hornet', 'burst' ),
318
- ),
319
- array(
320
- 'rule' => '.mkdf-wrapper {z-index: 20 !important; }',
321
- 'themes' => array( 'chillnews', 'deploy', 'piquant', 'optimizewp', 'wellspring', 'siennawp', 'hashmag', 'voyagewp', 'gotravel', 'verdict', 'mediclinic', 'iacademy', 'newsflash', 'evently', 'cortex', 'roam', 'lumiere', 'aviana', 'zuhaus', 'staffscout', 'kastell', 'fivestar', 'janeandmark', 'neva', 'klippe', 'rosebud', 'endurer', 'wanderers', 'anwalt', 'equine', 'verdure', 'brewski', 'curly', 'fiorello', 'bardwp', 'lilo', 'gluck', 'dotwork', 'eola', 'cocco', 'housemed', 'ande', 'foton', 'overton', 'kanna', 'attika', 'backpacktraveller' ),
322
- ),
323
- array(
324
- 'rule' => '.mkd-wrapper {z-index: 20 !important; }',
325
- 'themes' => array( 'libero', 'discussionwp', 'hue', 'medigroup', 'newshub', 'affinity', 'hotspot', 'industrialist', 'pinata', 'cornerstone', 'connectwp', 'opportunity', 'highrise', 'anahata', 'hoshi', 'fleur', 'sparks', 'topfit', 'depot', 'trophy', 'motorepair', 'citycruise', 'indigo', 'servicemaster', 'lister', 'renovator', 'ecologist', 'buro', 'cyberstore', 'appetito', 'grillandchow', 'baumeister', 'kalos', 'fuego', 'entre' ),
326
- ),
327
-
328
- array(
329
- 'rule' => '#boxed { z-index: 840 !important; }',
330
- 'themes' => array( 'salient' ),
331
- ),
332
- );
333
-
334
- foreach ( $wrapper_themes as $_v ) {
335
- if ( in_array( $theme, $_v['themes'] ) ) {
336
- echo '<style type="text/css">' . $_v['rule'] . '</style>' . PHP_EOL;
337
- }
338
- }
339
-
340
- if ( $this->theme( 'thegem' ) && $opt['enable_woocommerce'] && class_exists( 'woocommerce' ) && version_compare( WC_VERSION, '3.0', '>' ) ) { ?>
341
- <style type="text/css">
342
- .single-product div.product .woocommerce-product-gallery .attachment-shop_thumbnail {width: 100%;height: 100%;}
343
- .single-product div.product .woocommerce-product-gallery .flex-control-thumbs {margin: 0;padding: 0;margin-top: 10px;}
344
- .single-product div.product .woocommerce-product-gallery .flex-control-thumbs::before {content: "";display: table;}
345
- .single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li {width: 24.2857142857%;float: left;}
346
- .single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {list-style: none;margin-bottom: 1.618em;cursor: pointer;}
347
- </style>
348
- <?php
349
- }
350
-
351
- if ( $this->theme( 'brooklyn' ) && $opt['enable_woocommerce'] && class_exists( 'woocommerce' ) && version_compare( WC_VERSION, '3.0', '>' ) ) {
352
- ?>
353
- <style type="text/css">
354
- .woocommerce div.product div.images .woocommerce-product-gallery__wrapper { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: start; }
355
- </style>
356
- <?php
357
- }
358
-
359
- if ( defined( 'LP_PLUGIN_FILE' ) ) {
360
- echo '<style type="text/css">body.content-item-only .learn-press-content-item-only { z-index: 990; } .single-lp_course #wpadminbar{z-index:900;}</style>' . PHP_EOL;
361
- }
362
- if ( class_exists( 'WP_Image_Hotspot' ) ) {
363
- echo '<style type="text/css">.point_style.ihotspot_tooltop_html {z-index: 1003}</style>';
364
- }
365
- if ( defined( 'ELEMENTOR_VERSION' ) ) {
366
- echo '<style type="text/css">.dialog-lightbox-widget-content[style] { top: 0 !important; left: 0 !important;}</style>' . PHP_EOL;
367
- }
368
-
369
- }
370
-
371
 
372
  /**
373
  * Enqueue the jquery.image_zoom.js
@@ -548,8 +439,6 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
548
  $general['enable_mobile'] = false;
549
  }
550
 
551
- $general['force_woocommerce'] = false;
552
-
553
  if ( ! isset( $general['woo_cat'] ) ) {
554
  $general['woo_cat'] = false;
555
  }
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
7
  * Author: SilkyPress
8
  * Author URI: https://www.silkypress.com
9
  * License: GPL2
26
  * @class ImageZoooom
27
  */
28
  final class ImageZoooom {
29
+ public $version = '1.41';
30
  public $theme = '';
31
  protected static $_instance = null;
32
 
83
  new ImageZoooom_Admin();
84
  }
85
  add_action( 'template_redirect', array( $this, 'template_redirect' ) );
86
+
87
+ include_once 'includes/class-iz-compatibilities.php';
88
  }
89
 
90
  /**
115
  remove_action( 'thegem_woocommerce_single_product_left', 'thegem_woocommerce_single_product_gallery', 5 );
116
  add_action( 'thegem_woocommerce_single_product_left', 'woocommerce_show_product_images', 20 );
117
  }
118
+
119
+ if ( $this->theme( 'enfold' ) ) {
120
+ add_action( 'wp_head', 'IZ_Compatibilities::wc3gallery_css', 40 );
121
+ }
122
  }
123
 
124
  add_filter( 'woocommerce_single_product_image_html', array( $this, 'woocommerce_single_product_image_html' ) );
130
  add_filter( 'the_content', array( $this, 'find_bigger_image' ), 40 );
131
 
132
  add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
 
133
 
134
  add_filter( 'wp_calculate_image_srcset', array( $this, 'wp_calculate_image_srcset' ), 40, 5 );
135
  }
168
  return $sources;
169
  }
170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  /**
172
  * Add data-thumbnail-src to the main product image
173
  */
259
  }
260
 
261
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
 
263
  /**
264
  * Enqueue the jquery.image_zoom.js
439
  $general['enable_mobile'] = false;
440
  }
441
 
 
 
442
  if ( ! isset( $general['woo_cat'] ) ) {
443
  $general['woo_cat'] = false;
444
  }
includes/class-iz-compatibilities.php ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IZ_Compatibilities. Compatibilities with other themes or plugins.
4
+ *
5
+ * @package WP_Image_Zoooom
6
+ */
7
+
8
+ defined( 'ABSPATH' ) || exit;
9
+
10
+ /**
11
+ * IZ_Compatibilities class.
12
+ */
13
+ class IZ_Compatibilities {
14
+
15
+ /**
16
+ * Initiate the class.
17
+ */
18
+ public static function init() {
19
+ add_action( 'wp_head', 'IZ_Compatibilities::wp_head', 40 );
20
+ add_action( 'vc_after_init', 'IZ_Compatibilities::vc_after_init' );
21
+ add_action( 'after_setup_theme', 'IZ_Compatibilities::after_setup_theme' );
22
+ }
23
+
24
+
25
+ /**
26
+ * CSS modifications.
27
+ */
28
+ public static function wp_head() {
29
+ $theme = strtolower( get_template() );
30
+
31
+ $opt = get_option( 'zoooom_general' );
32
+ $opt['enable_woocommerce'] = isset( $opt['enable_woocommerce'] ) ? $opt['enable_woocommerce'] : true;
33
+
34
+ $style = '';
35
+
36
+ // These themes add a wrapper on the whole page with index higher than the zoom.
37
+ $wrapper_themes = array(
38
+ array(
39
+ 'rule' => '.wrapper { z-index: 40 !important; }',
40
+ 'themes' => array( 'bridge', 'nouveau', 'stockholm', 'tactile', 'vigor', 'homa', 'hudsonwp', 'borderland', 'moose' ),
41
+ ),
42
+ array(
43
+ 'rule' => '.qodef-wrapper { z-index: 200 !important; }',
44
+ 'themes' => array( 'kloe', 'startit', 'kudos', 'moments', 'ayro', 'suprema', 'ultima', 'geko', 'target', 'coney', 'aton', 'ukiyo', 'zenit', 'mixtape', 'scribbler', 'alecta', 'cityrama', 'bazaar' ),
45
+ ),
46
+ array(
47
+ 'rule' => '.edgtf-wrapper { z-index: 40 !important; }',
48
+ 'themes' => array( 'quadric', 'oxides', 'kvadrat', 'magazinevibe', 'kolumn', 'skyetheme', 'conall', 'dorianwp', 'node', 'ratio', 'escher', 'fair', 'assemble', 'any', 'walker', 'freestyle', 'shuffle', 'vangard', 'fuzion', 'crimson', 'cozy', 'xpo', 'onschedule', 'illustrator', 'oberon', 'fluid', 'barista', 'kamera', 'revolver', 'baker', 'rebellion', 'goodwish', 'maison', 'silverscreen', 'sovereign', 'atmosphere', 'dekko', 'objektiv', 'okami', 'coyote', 'bumblebee', 'blaze', 'mediadesk', 'penumbra', 'pxlz', 'gastrobar', 'aalto', 'dishup', 'voevod', 'orkan', 'fierce', 'grayson', 'hyperon', 'pintsandcrafts', 'haar', 'polyphonic', 'offbeat', 'hereford', 'kvell', 'sarto', 'journo', 'cinerama', 'ottar', 'playerx', 'kenozoik', 'elaine', 'entropia', 'tetsuo', 'bitpal', 'tahoe', 'urbango', 'smilte', 'neralbo', 'galatia', 'mintus', 'manon' ),
49
+ ),
50
+ array(
51
+ 'rule' => '.edge-wrapper { z-index: 40 !important; }',
52
+ 'themes' => array( 'dieter', 'anders', 'adorn', 'creedence', 'noizzy' ),
53
+ ),
54
+ array(
55
+ 'rule' => '.edgt-wrapper { z-index: 40 !important; }',
56
+ 'themes' => array( 'shade', 'eldritch', 'morsel', 'educator', 'milieu' ),
57
+ ),
58
+ array(
59
+ 'rule' => '.sidebar-menu-push { z-index: 40 !important; }',
60
+ 'themes' => array( 'artcore' ),
61
+ ),
62
+ array(
63
+ 'rule' => '.eltdf-wrapper { z-index: 40 !important; }',
64
+ 'themes' => array( 'readanddigest', 'tomasdaisy', 'virtuoso', 'blu', 'superfood', 'ambient', 'koto', 'azaleawp', 'all4home', 'mrseo', 'vibez', 'sweettooth', 'halogen', 'vino', 'ion', 'satine', 'nightshade', 'esmarts', 'makoto', 'mane', 'imogen', 'yvette', 'gourmand', 'sceon', 'calla', 'corretto', 'allston' ),
65
+ ),
66
+ array(
67
+ 'rule' => '.eltd-wrapper { z-index: 40 !important; }',
68
+ 'themes' => array( 'woly', 'averly', 'search-and-go', 'flow', 'kreate', 'allure', 'chandelier', 'malmo', 'minnesota', 'newsroom', 'kendall', 'savory', 'creator', 'awake', 'diorama', 'medipoint', 'audrey', 'findme', 'april', 'bizfinder', 'bjorn', 'trackstore', 'albergo', 'vakker', 'tamashi', 'bonvoyage' ),
69
+ ),
70
+ // Next three rules are to the Mikado-Themes.
71
+ array(
72
+ 'rule' => '.wrapper {z-index: 20 !important; }',
73
+ 'themes' => array( 'mikado1', 'onyx', 'hornet', 'burst' ),
74
+ ),
75
+ array(
76
+ 'rule' => '.mkdf-wrapper {z-index: 20 !important; }',
77
+ 'themes' => array( 'chillnews', 'deploy', 'piquant', 'optimizewp', 'wellspring', 'siennawp', 'hashmag', 'voyagewp', 'gotravel', 'verdict', 'mediclinic', 'iacademy', 'newsflash', 'evently', 'cortex', 'roam', 'lumiere', 'aviana', 'zuhaus', 'staffscout', 'kastell', 'fivestar', 'janeandmark', 'neva', 'klippe', 'rosebud', 'endurer', 'wanderers', 'anwalt', 'equine', 'verdure', 'brewski', 'curly', 'fiorello', 'bardwp', 'lilo', 'gluck', 'dotwork', 'eola', 'cocco', 'housemed', 'ande', 'foton', 'overton', 'kanna', 'attika', 'backpacktraveller' ),
78
+ ),
79
+ array(
80
+ 'rule' => '.mkd-wrapper {z-index: 20 !important; }',
81
+ 'themes' => array( 'libero', 'discussionwp', 'hue', 'medigroup', 'newshub', 'affinity', 'hotspot', 'industrialist', 'pinata', 'cornerstone', 'connectwp', 'opportunity', 'highrise', 'anahata', 'hoshi', 'fleur', 'sparks', 'topfit', 'depot', 'trophy', 'motorepair', 'citycruise', 'indigo', 'servicemaster', 'lister', 'renovator', 'ecologist', 'buro', 'cyberstore', 'appetito', 'grillandchow', 'baumeister', 'kalos', 'fuego', 'entre' ),
82
+ ),
83
+
84
+ array(
85
+ 'rule' => '#boxed { z-index: 840 !important; }',
86
+ 'themes' => array( 'salient' ),
87
+ ),
88
+ );
89
+
90
+ foreach ( $wrapper_themes as $_v ) {
91
+ if ( in_array( $theme, $_v['themes'], true ) ) {
92
+ $style .= $_v['rule'];
93
+ }
94
+ }
95
+
96
+ /**
97
+ * TheGem theme, WooCommerce product gallery.
98
+ */
99
+ if ( strpos( $theme, 'thegem' ) !== false && $opt['enable_woocommerce'] && class_exists( 'woocommerce' ) && version_compare( WC_VERSION, '3.0', '>' ) ) {
100
+ $style .= '.single-product div.product .woocommerce-product-gallery .attachment-shop_thumbnail {width: 100%;height: 100%;}';
101
+ $style .= '.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {margin: 0;padding: 0;margin-top: 10px;}';
102
+ $style .= '.single-product div.product .woocommerce-product-gallery .flex-control-thumbs::before {content: "";display: table;}';
103
+ $style .= '.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li {width: 24.2857142857%;float: left;}';
104
+ $style .= '.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {list-style: none;margin-bottom: 1.618em;cursor: pointer;}';
105
+ }
106
+
107
+ /**
108
+ * Brooklyn theme, WooCommerce product gallery.
109
+ */
110
+ if ( strpos( $theme, 'brooklyn' ) !== false && $opt['enable_woocommerce'] && class_exists( 'woocommerce' ) && version_compare( WC_VERSION, '3.0', '>' ) ) {
111
+ $style .= '.woocommerce div.product div.images .woocommerce-product-gallery__wrapper { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: start; }';
112
+ }
113
+
114
+ /**
115
+ * LearnPress plugin.
116
+ */
117
+ if ( defined( 'LP_PLUGIN_FILE' ) ) {
118
+ $style .= 'body.content-item-only .learn-press-content-item-only { z-index: 990; } .single-lp_course #wpadminbar{z-index:900;}';
119
+ }
120
+
121
+ /**
122
+ * Image Hotspot plugin.
123
+ */
124
+ if ( class_exists( 'WP_Image_Hotspot' ) ) {
125
+ $style .= '.point_style.ihotspot_tooltop_html {z-index: 1003}';
126
+ }
127
+
128
+ /**
129
+ * Elementor Page Builder plugin.
130
+ */
131
+ if ( defined( 'ELEMENTOR_VERSION' ) ) {
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
138
+ }
139
+ }
140
+
141
+
142
+ /**
143
+ * CSS for themes that remove the WooCommerce wc-product-gallery-slider CSS.
144
+ */
145
+ public static function wc3gallery_css() {
146
+
147
+ $style = '.woocommerce div.product div.images{margin-bottom:2em}.woocommerce div.product div.images img{display:block;width:100%;height:auto;box-shadow:none}.woocommerce div.product div.images div.thumbnails{padding-top:1em}.woocommerce div.product div.images.woocommerce-product-gallery{position:relative}.woocommerce div.product div.images .woocommerce-product-gallery__wrapper{-webkit-transition:all cubic-bezier(.795,-.035,0,1) .5s;transition:all cubic-bezier(.795,-.035,0,1) .5s;margin:0;padding:0}.woocommerce div.product div.images .woocommerce-product-gallery__wrapper .zoomImg{background-color:#fff;opacity:0}.woocommerce div.product div.images .woocommerce-product-gallery__image--placeholder{border:1px solid #f2f2f2}.woocommerce div.product div.images .woocommerce-product-gallery__image:nth-child(n+2){width:25%;display:inline-block}.woocommerce div.product div.images .woocommerce-product-gallery__trigger{position:absolute;top:.5em;right:.5em;font-size:2em;z-index:9;width:36px;height:36px;background:#fff;text-indent:-9999px;border-radius:100%;box-sizing:content-box}.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before{content:"";display:block;width:10px;height:10px;border:2px solid #000;border-radius:100%;position:absolute;top:9px;left:9px;box-sizing:content-box}.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after{content:"";display:block;width:2px;height:8px;background:#000;border-radius:6px;position:absolute;top:19px;left:22px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);box-sizing:content-box}.woocommerce div.product div.images .flex-control-thumbs{overflow:hidden;zoom:1;margin:0;padding:0}.woocommerce div.product div.images .flex-control-thumbs li{width:25%;float:left;margin:0;list-style:none}.woocommerce div.product div.images .flex-control-thumbs li img{cursor:pointer;opacity:.5;margin:0}.woocommerce div.product div.images .flex-control-thumbs li img.flex-active,.woocommerce div.product div.images .flex-control-thumbs li img:hover{opacity:1}.woocommerce div.product .woocommerce-product-gallery--columns-3 .flex-control-thumbs li:nth-child(3n+1){clear:left}.woocommerce div.product .woocommerce-product-gallery--columns-4 .flex-control-thumbs li:nth-child(4n+1){clear:left}.woocommerce div.product .woocommerce-product-gallery--columns-5 .flex-control-thumbs li:nth-child(5n+1){clear:left}';
148
+
149
+ $type = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
150
+ echo '<style' . $type . '>' . $style . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
151
+ }
152
+
153
+
154
+ /**
155
+ * Adjust hooks after the theme loaded.
156
+ */
157
+ public static function after_setup_theme() {
158
+ $theme = strtolower( get_template() );
159
+
160
+ $opt = get_option( 'zoooom_general' );
161
+ $opt['enable_woocommerce'] = isset( $opt['enable_woocommerce'] ) ? $opt['enable_woocommerce'] : true;
162
+
163
+ if ( strpos( $theme, 'enfold' ) !== false && $opt['enable_woocommerce'] && class_exists( 'woocommerce' ) && version_compare( WC_VERSION, '3.0', '>' ) ) {
164
+ remove_action( 'woocommerce_product_thumbnails', 'avia_product_gallery_thumbnail_opener', 19 );
165
+ remove_action( 'woocommerce_product_thumbnails', 'avia_close_div', 21 );
166
+ remove_filter( 'woocommerce_single_product_image_thumbnail_html', 'avia_woocommerce_gallery_thumbnail_description', 10, 4 );
167
+ }
168
+ }
169
+
170
+
171
+ /**
172
+ * Add zoom option in the vc_single_image shortcode in WPBakery
173
+ */
174
+ public static function vc_after_init() {
175
+ if ( ! defined( 'WPB_VC_VERSION' ) ) {
176
+ return false;
177
+ }
178
+ $param = WPBMap::getParam( 'vc_single_image', 'style' );
179
+ if ( is_array( $param ) ) {
180
+ $param['value'][ __( 'WP Image Zoooom', 'wp-image-zoooom' ) ] = 'zoooom';
181
+ vc_update_shortcode_param( 'vc_single_image', $param );
182
+ }
183
+ }
184
+ }
185
+
186
+ IZ_Compatibilities::init();
includes/settings.php CHANGED
@@ -369,12 +369,6 @@ if ( ! function_exists( 'wp_image_zoooom_settings' ) ) {
369
  'input_form' => 'checkbox',
370
  'section' => 'general',
371
  ),
372
- 'force_woocommerce' => array(
373
- 'label' => __( 'Force it to work on WooCommerce', 'wp-image-zoooom' ),
374
- 'value' => true,
375
- 'input_form' => 'checkbox',
376
- 'section' => 'general',
377
- ),
378
  'remove_lightbox_thumbnails' => array(
379
  'label' => __( 'Remove the Lightbox on thumbnail images', 'wp-image-zoooom' ),
380
  'value' => true,
369
  'input_form' => 'checkbox',
370
  'section' => 'general',
371
  ),
 
 
 
 
 
 
372
  'remove_lightbox_thumbnails' => array(
373
  'label' => __( 'Remove the Lightbox on thumbnail images', 'wp-image-zoooom' ),
374
  'value' => true,
readme.txt CHANGED
@@ -5,7 +5,7 @@ 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.40.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
  Requires PHP: 5.2.4
@@ -154,8 +154,9 @@ Alternatively you can upgrade to the Pro version, as there the zoom lens is buil
154
 
155
  == Changelog ==
156
 
157
- = 1.40.1 =
158
- * 05/05/2020
 
159
  * Declare compatibility with WooCommerce 4.1
160
 
161
  = 1.40 =
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
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.41 =
158
+ * 05/29/2020
159
+ * Fix: compatibility with the WooCommerce product gallery on the Enfold theme
160
  * Declare compatibility with WooCommerce 4.1
161
 
162
  = 1.40 =