Version Description
- Restored: Image size options on WC 2.1.x
- Fixed: Items number option on thumb slider
- Fixed: Hard crop issue on WC 2.1.x
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Zoom Magnifier |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- README.txt +7 -1
- assets/js/frontend.js +1 -1
- assets/js/frontend.min.js +1 -1
- class.yith-wcmg-admin.php +41 -47
- class.yith-wcmg-frontend.php +1 -1
- class.yith-wcmg.php +2 -2
- functions.yith-wcmg.php +1 -1
- init.php +2 -2
- templates/single-product/product-image-magnifier.php +2 -1
- templates/single-product/product-thumbnails-magnifier.php +1 -1
- uninstall.php +1 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
|
|
4 |
Tags: zoom, magnifier, woocommerce, products, themes, yit, e-commerce, shop
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -70,6 +70,12 @@ The size of the Zoom Image is automatically setted. If you want to change these
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
= 1.1.1 =
|
74 |
|
75 |
* Fixed: Thumbnails slider direction on single product page
|
4 |
Tags: zoom, magnifier, woocommerce, products, themes, yit, e-commerce, shop
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.1.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 1.1.2 =
|
74 |
+
|
75 |
+
* Restored: Image size options on WC 2.1.x
|
76 |
+
* Fixed: Items number option on thumb slider
|
77 |
+
* Fixed: Hard crop issue on WC 2.1.x
|
78 |
+
|
79 |
= 1.1.1 =
|
80 |
|
81 |
* Fixed: Thumbnails slider direction on single product page
|
assets/js/frontend.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*
|
4 |
* @author Your Inspiration Themes
|
5 |
* @package YITH WooCommerce Zoom Magnifier
|
6 |
-
* @version 1.1.
|
7 |
*/
|
8 |
jQuery(document).ready(function($){
|
9 |
|
3 |
*
|
4 |
* @author Your Inspiration Themes
|
5 |
* @package YITH WooCommerce Zoom Magnifier
|
6 |
+
* @version 1.1.2
|
7 |
*/
|
8 |
jQuery(document).ready(function($){
|
9 |
|
assets/js/frontend.min.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*
|
4 |
* @author Your Inspiration Themes
|
5 |
* @package YITH WooCommerce Zoom Magnifier
|
6 |
-
* @version 1.1.
|
7 |
*/
|
8 |
jQuery(document).ready(function(b){var a=b(".images"),d=b(".yith_magnifier_zoom"),f=b(".yith_magnifier_zoom img"),e=a.find(".yith_magnifier_zoom").attr("href"),g=a.find(".yith_magnifier_zoom img").attr("src");a.yith_magnifier(yith_magnifier_options);b(document).on("found_variation","form.variations_form",function(b,c){var h=c.image_src?c.image_src:g;d.attr("href",c.image_magnifier?c.image_magnifier:e);f.attr("src",h);a.data("yith_magnifier")&&a.yith_magnifier("destroy");a.yith_magnifier(yith_magnifier_options)}).on("reset_image",
|
9 |
function(b){d.attr("href",e);a.data("yith_magnifier")&&a.yith_magnifier("destroy");a.yith_magnifier(yith_magnifier_options)});b("form.variations_form .variations select").trigger("change")});
|
3 |
*
|
4 |
* @author Your Inspiration Themes
|
5 |
* @package YITH WooCommerce Zoom Magnifier
|
6 |
+
* @version 1.1.2
|
7 |
*/
|
8 |
jQuery(document).ready(function(b){var a=b(".images"),d=b(".yith_magnifier_zoom"),f=b(".yith_magnifier_zoom img"),e=a.find(".yith_magnifier_zoom").attr("href"),g=a.find(".yith_magnifier_zoom img").attr("src");a.yith_magnifier(yith_magnifier_options);b(document).on("found_variation","form.variations_form",function(b,c){var h=c.image_src?c.image_src:g;d.attr("href",c.image_magnifier?c.image_magnifier:e);f.attr("src",h);a.data("yith_magnifier")&&a.yith_magnifier("destroy");a.yith_magnifier(yith_magnifier_options)}).on("reset_image",
|
9 |
function(b){d.attr("href",e);a.data("yith_magnifier")&&a.yith_magnifier("destroy");a.yith_magnifier(yith_magnifier_options)});b("form.variations_form .variations select").trigger("change")});
|
class.yith-wcmg-admin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'YITH_WCMG' ) ) {
|
@@ -78,7 +78,9 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
78 |
|
79 |
//Filters
|
80 |
add_filter( 'woocommerce_settings_tabs_array', array( $this, 'add_tab_woocommerce' ), 30 );
|
81 |
-
|
|
|
|
|
82 |
|
83 |
//Apply filters
|
84 |
$this->banner_url = apply_filters( 'yith_wcmg_banner_url', $this->banner_url );
|
@@ -210,6 +212,29 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
210 |
* @since 1.0.0
|
211 |
*/
|
212 |
protected function _initOptions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
$options = array(
|
214 |
'general' => array(
|
215 |
array(
|
@@ -265,6 +290,8 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
265 |
'type' => 'text',
|
266 |
),
|
267 |
|
|
|
|
|
268 |
array(
|
269 |
'name' => __( 'Zoom Area Position', 'yit' ),
|
270 |
'desc' => __( 'The magnifier position', 'yit' ),
|
@@ -300,28 +327,7 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
300 |
'default' => __( 'Loading...', 'yit' ),
|
301 |
'type' => 'text',
|
302 |
),
|
303 |
-
|
304 |
-
array(
|
305 |
-
'name' => __( 'Tint', 'yit' ),
|
306 |
-
'desc' => '',
|
307 |
-
'id' => 'yith_wcmg_tint',
|
308 |
-
'std' => '',
|
309 |
-
'default' => '',
|
310 |
-
'type' => 'picker',
|
311 |
-
),
|
312 |
-
|
313 |
-
array(
|
314 |
-
'name' => __( 'Tint Opacity', 'yit' ),
|
315 |
-
'desc' => '',
|
316 |
-
'id' => 'yith_wcmg_tint_opacity',
|
317 |
-
'std' => 0.5,
|
318 |
-
'default' => 0.5,
|
319 |
-
'type' => 'slider',
|
320 |
-
'min' => 0,
|
321 |
-
'max' => 1,
|
322 |
-
'step' => .1
|
323 |
-
),
|
324 |
-
*/
|
325 |
array(
|
326 |
'name' => __( 'Lens Opacity', 'yit' ),
|
327 |
'desc' => '',
|
@@ -333,19 +339,7 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
333 |
'max' => 1,
|
334 |
'step' => .1
|
335 |
),
|
336 |
-
|
337 |
-
array(
|
338 |
-
'name' => __( 'Smoothness', 'yit' ),
|
339 |
-
'desc' => '',
|
340 |
-
'id' => 'yith_wcmg_smooth',
|
341 |
-
'std' => 3,
|
342 |
-
'default' => 3,
|
343 |
-
'type' => 'slider',
|
344 |
-
'min' => 1,
|
345 |
-
'max' => 5,
|
346 |
-
'step' => 1
|
347 |
-
),
|
348 |
-
*/
|
349 |
array(
|
350 |
'name' => __( 'Blur', 'yit' ),
|
351 |
'desc' => __( 'Add a blur effect to the small image on mouse hover.', 'yit' ),
|
@@ -512,15 +506,15 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
512 |
|
513 |
?>
|
514 |
<tr valign="top">
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
</tr>
|
525 |
<?php
|
526 |
}
|
@@ -564,7 +558,7 @@ if ( ! class_exists( 'YITH_WCMG_Admin' ) ) {
|
|
564 |
$force = get_option( 'yith_wcmg_force_sizes' ) == 'yes';
|
565 |
|
566 |
if ( $force ) {
|
567 |
-
$value['desc'] = 'These values
|
568 |
}
|
569 |
|
570 |
if ( $force && isset( $_GET['page'] ) && isset( $_GET['tab'] ) && ( $_GET['page'] == 'woocommerce_settings' || $_GET['page'] == 'wc-settings' ) && $_GET['tab'] == 'catalog' ): ?>
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'YITH_WCMG' ) ) {
|
78 |
|
79 |
//Filters
|
80 |
add_filter( 'woocommerce_settings_tabs_array', array( $this, 'add_tab_woocommerce' ), 30 );
|
81 |
+
if ( ! function_exists( 'WC' ) ) {
|
82 |
+
add_filter( 'woocommerce_catalog_settings', array( $this, 'add_catalog_image_size' ) );
|
83 |
+
}
|
84 |
|
85 |
//Apply filters
|
86 |
$this->banner_url = apply_filters( 'yith_wcmg_banner_url', $this->banner_url );
|
212 |
* @since 1.0.0
|
213 |
*/
|
214 |
protected function _initOptions() {
|
215 |
+
$image_size = array();
|
216 |
+
|
217 |
+
if ( function_exists( 'WC' ) ) {
|
218 |
+
$image_size = array(
|
219 |
+
'name' => __( 'Catalog Zoom Images', 'yit' ),
|
220 |
+
'desc' => __( 'The size of images used within the magnifier box', 'yit' ),
|
221 |
+
'id' => 'woocommerce_magnifier_image',
|
222 |
+
'css' => '',
|
223 |
+
'type' => 'image_width',
|
224 |
+
'default' => array(
|
225 |
+
'width' => 600,
|
226 |
+
'height' => 600,
|
227 |
+
'crop' => true
|
228 |
+
),
|
229 |
+
'std' => array(
|
230 |
+
'width' => 600,
|
231 |
+
'height' => 600,
|
232 |
+
'crop' => true
|
233 |
+
),
|
234 |
+
'desc_tip' => true
|
235 |
+
);
|
236 |
+
}
|
237 |
+
|
238 |
$options = array(
|
239 |
'general' => array(
|
240 |
array(
|
290 |
'type' => 'text',
|
291 |
),
|
292 |
|
293 |
+
$image_size,
|
294 |
+
|
295 |
array(
|
296 |
'name' => __( 'Zoom Area Position', 'yit' ),
|
297 |
'desc' => __( 'The magnifier position', 'yit' ),
|
327 |
'default' => __( 'Loading...', 'yit' ),
|
328 |
'type' => 'text',
|
329 |
),
|
330 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
array(
|
332 |
'name' => __( 'Lens Opacity', 'yit' ),
|
333 |
'desc' => '',
|
339 |
'max' => 1,
|
340 |
'step' => .1
|
341 |
),
|
342 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
array(
|
344 |
'name' => __( 'Blur', 'yit' ),
|
345 |
'desc' => __( 'Add a blur effect to the small image on mouse hover.', 'yit' ),
|
506 |
|
507 |
?>
|
508 |
<tr valign="top">
|
509 |
+
<th scope="row" class="titledesc">
|
510 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo $value['name']; ?></label>
|
511 |
+
</th>
|
512 |
+
<td class="forminp">
|
513 |
+
<div class="color_box"><strong><?php echo $value['name']; ?></strong>
|
514 |
+
<input name="<?php echo esc_attr( $value['id'] ) ?>" id="<?php echo esc_attr( $value['id'] ) ?>" type="text" value="<?php echo $picker_value ?>" class="colorpick" />
|
515 |
+
|
516 |
+
<div id="colorPickerDiv_<?php echo esc_attr( $value['id'] ) ?>" class="colorpickdiv"></div>
|
517 |
+
</div> <?php echo $value['desc']; ?></td>
|
518 |
</tr>
|
519 |
<?php
|
520 |
}
|
558 |
$force = get_option( 'yith_wcmg_force_sizes' ) == 'yes';
|
559 |
|
560 |
if ( $force ) {
|
561 |
+
$value['desc'] = 'These values ??are automatically calculated based on the values ??of the Single product. If you\'d like to customize yourself the values, please disable the "Forcing Zoom Image sizes" in "Magnifier" tab.';
|
562 |
}
|
563 |
|
564 |
if ( $force && isset( $_GET['page'] ) && isset( $_GET['tab'] ) && ( $_GET['page'] == 'woocommerce_settings' || $_GET['page'] == 'wc-settings' ) && $_GET['tab'] == 'catalog' ): ?>
|
class.yith-wcmg-frontend.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
|
class.yith-wcmg.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
|
@@ -22,7 +22,7 @@ if( !class_exists( 'YITH_WCMG' ) ) {
|
|
22 |
* @var string
|
23 |
* @since 1.0.0
|
24 |
*/
|
25 |
-
public $version = '1.1.
|
26 |
|
27 |
/**
|
28 |
* Plugin object
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
|
22 |
* @var string
|
23 |
* @since 1.0.0
|
24 |
*/
|
25 |
+
public $version = '1.1.2';
|
26 |
|
27 |
/**
|
28 |
* Plugin object
|
functions.yith-wcmg.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
if ( !defined( 'YITH_WCMG' ) ) { exit; } // Exit if accessed directly
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images.
|
6 |
-
* Version: 1.1.
|
7 |
* Author: Your Inspiration Themes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yit
|
@@ -11,7 +11,7 @@
|
|
11 |
*
|
12 |
* @author Your Inspiration Themes
|
13 |
* @package YITH WooCommerce Magnifier
|
14 |
-
* @version 1.1.
|
15 |
*/
|
16 |
/* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
|
3 |
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images.
|
6 |
+
* Version: 1.1.2
|
7 |
* Author: Your Inspiration Themes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yit
|
11 |
*
|
12 |
* @author Your Inspiration Themes
|
13 |
* @package YITH WooCommerce Magnifier
|
14 |
+
* @version 1.1.2
|
15 |
*/
|
16 |
/* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
|
templates/single-product/product-image-magnifier.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author YIThemes
|
6 |
* @package YITH_Magnifier/Templates
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
@@ -68,6 +68,7 @@ $enable_slider = get_option('yith_wcmg_enableslider') == 'yes' ? true : false;
|
|
68 |
visible: <?php echo apply_filters( 'woocommerce_product_thumbnails_columns', get_option( 'yith_wcmg_slider_items', 3 ) ) ?>
|
69 |
}
|
70 |
},
|
|
|
71 |
<?php endif ?>
|
72 |
|
73 |
showTitle: false,
|
4 |
*
|
5 |
* @author YIThemes
|
6 |
* @package YITH_Magnifier/Templates
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
68 |
visible: <?php echo apply_filters( 'woocommerce_product_thumbnails_columns', get_option( 'yith_wcmg_slider_items', 3 ) ) ?>
|
69 |
}
|
70 |
},
|
71 |
+
|
72 |
<?php endif ?>
|
73 |
|
74 |
showTitle: false,
|
templates/single-product/product-thumbnails-magnifier.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author YIThemes
|
6 |
* @package YITH_Magnifier/Templates
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
4 |
*
|
5 |
* @author YIThemes
|
6 |
* @package YITH_Magnifier/Templates
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
uninstall.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
-
* @version 1.1.
|
8 |
*/
|
9 |
|
10 |
// If uninstall not called from WordPress exit
|
4 |
*
|
5 |
* @author Your Inspiration Themes
|
6 |
* @package YITH WooCommerce Zoom Magnifier
|
7 |
+
* @version 1.1.2
|
8 |
*/
|
9 |
|
10 |
// If uninstall not called from WordPress exit
|