Version Description
- 18/12/2019 add - added lazy load
Download this release
Release Info
Developer | pickplugins |
Plugin | Woocommerce Products Slider |
Version | 1.12.23 |
Comparing to | |
See all releases |
Code changes from version 1.12.22 to 1.12.23
- includes/functions/functions-wcps-meta-box.php +72 -51
- includes/wcps-meta-box.php +5 -0
- readme.txt +4 -5
- templates/scripts.php +100 -116
- templates/variables.php +4 -1
- templates/wcps-thumb.php +9 -3
- woocommerce-products-slider.php +2 -2
includes/functions/functions-wcps-meta-box.php
CHANGED
@@ -91,6 +91,7 @@ if(!function_exists('wcps_meta_tab_content_elements')) {
|
|
91 |
|
92 |
|
93 |
$wcps_items_thumb_link_target = get_post_meta( $post_id, 'wcps_items_thumb_link_target', true );
|
|
|
94 |
|
95 |
|
96 |
$wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
|
@@ -320,74 +321,79 @@ if(!function_exists('wcps_meta_tab_content_elements')) {
|
|
320 |
</select>
|
321 |
</div>
|
322 |
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
|
331 |
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
-
|
352 |
-
|
353 |
|
354 |
-
|
355 |
|
356 |
-
|
357 |
|
358 |
-
|
359 |
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
|
382 |
-
|
383 |
-
|
384 |
|
385 |
-
|
386 |
|
387 |
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
|
392 |
|
393 |
|
@@ -1311,6 +1317,8 @@ if(!function_exists('wcps_meta_tab_content_options')) {
|
|
1311 |
$wcps_slider_pagination_text_color = get_post_meta( $post_id, 'wcps_slider_pagination_text_color', true );
|
1312 |
$wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
|
1313 |
|
|
|
|
|
1314 |
$wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
|
1315 |
$wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
|
1316 |
$wcps_slider_rtl = get_post_meta( $post_id, 'wcps_slider_rtl', true );
|
@@ -1611,8 +1619,21 @@ if(!function_exists('wcps_meta_tab_content_options')) {
|
|
1611 |
|
1612 |
$settings_tabs_field->generate_field($args);
|
1613 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1614 |
|
1615 |
-
|
1616 |
|
1617 |
$args = array(
|
1618 |
'id' => 'wcps_slider_touch_drag',
|
91 |
|
92 |
|
93 |
$wcps_items_thumb_link_target = get_post_meta( $post_id, 'wcps_items_thumb_link_target', true );
|
94 |
+
$wcps_items_thumb_lazy_src = get_post_meta( $post_id, 'wcps_items_thumb_lazy_src', true );
|
95 |
|
96 |
|
97 |
$wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
|
321 |
</select>
|
322 |
</div>
|
323 |
|
324 |
+
<div class="option-box">
|
325 |
+
<p class="option-title"><?php _e('Lazy load image', 'woocommerce-products-slider');?></p>
|
326 |
+
<p class="option-info"></p>
|
327 |
+
<input type="text" name="wcps_items_thumb_lazy_src" placeholder="" id="wcps_items_thumb_lazy_src" value="<?php echo $wcps_items_thumb_lazy_src; ?>" />
|
328 |
+
</div>
|
329 |
|
330 |
+
<div class="option-box">
|
331 |
+
<p class="option-title"><?php _e('Empty Thumbnail', 'woocommerce-products-slider');?></p>
|
332 |
+
<p class="option-info"><?php _e('Custom thumbnail image url', 'woocommerce-products-slider');?></p>
|
333 |
+
<input type="text" name="wcps_items_empty_thumb" id="wcps_items_empty_thumb" value="<?php echo $wcps_items_empty_thumb; ?>" /><br /><br />
|
334 |
+
<input id="wcps_items_empty_thumb_upload" class="wcps_items_empty_thumb_upload button" type="button" value="Upload Image" />
|
335 |
+
<br /><br />
|
336 |
|
337 |
|
338 |
+
<?php
|
339 |
+
if(empty($wcps_items_empty_thumb))
|
340 |
+
{
|
341 |
+
?>
|
342 |
+
<img class="wcps_items_empty_thumb_display" width="300px" src="<?php echo wcps_plugin_url.'assets/front/images/no-thumb.png'; ?>" />
|
343 |
+
<?php
|
344 |
+
}
|
345 |
+
else
|
346 |
+
{
|
347 |
+
?>
|
348 |
+
<img class="wcps_items_empty_thumb_display" width="300px" src="<?php echo $wcps_items_empty_thumb; ?>" />
|
349 |
+
<?php
|
350 |
+
}
|
351 |
+
?>
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
+
<script>
|
358 |
+
jQuery(document).ready(function($){
|
359 |
|
360 |
+
var custom_uploader;
|
361 |
|
362 |
+
jQuery('#wcps_items_empty_thumb_upload').click(function(e) {
|
363 |
|
364 |
+
e.preventDefault();
|
365 |
|
366 |
+
//If the uploader object has already been created, reopen the dialog
|
367 |
+
if (custom_uploader) {
|
368 |
+
custom_uploader.open();
|
369 |
+
return;
|
370 |
+
}
|
371 |
|
372 |
+
//Extend the wp.media object
|
373 |
+
custom_uploader = wp.media.frames.file_frame = wp.media({
|
374 |
+
title: 'Choose Image',
|
375 |
+
button: {
|
376 |
+
text: 'Choose Image'
|
377 |
+
},
|
378 |
+
multiple: false
|
379 |
+
});
|
380 |
|
381 |
+
//When a file is selected, grab the URL and set it as the text field's value
|
382 |
+
custom_uploader.on('select', function() {
|
383 |
+
attachment = custom_uploader.state().get('selection').first().toJSON();
|
384 |
+
jQuery('#wcps_items_empty_thumb').val(attachment.url);
|
385 |
+
jQuery('.wcps_items_empty_thumb_display').attr('src',attachment.url);
|
386 |
+
});
|
387 |
|
388 |
+
//Open the uploader dialog
|
389 |
+
custom_uploader.open();
|
390 |
|
391 |
+
});
|
392 |
|
393 |
|
394 |
+
})
|
395 |
+
</script>
|
396 |
+
</div>
|
397 |
|
398 |
|
399 |
|
1317 |
$wcps_slider_pagination_text_color = get_post_meta( $post_id, 'wcps_slider_pagination_text_color', true );
|
1318 |
$wcps_slider_pagination_count = get_post_meta( $post_id, 'wcps_slider_pagination_count', true );
|
1319 |
|
1320 |
+
$wcps_slider_lazy_load = get_post_meta( $post_id, 'wcps_slider_lazy_load', true );
|
1321 |
+
|
1322 |
$wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
|
1323 |
$wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
|
1324 |
$wcps_slider_rtl = get_post_meta( $post_id, 'wcps_slider_rtl', true );
|
1619 |
|
1620 |
$settings_tabs_field->generate_field($args);
|
1621 |
|
1622 |
+
$args = array(
|
1623 |
+
'id' => 'wcps_slider_lazy_load',
|
1624 |
+
//'parent' => '',
|
1625 |
+
'title' => __('Lazy load enable','woocommerce-products-slider'),
|
1626 |
+
'details' => __('Enable or disable lazy load for thumbnails.','woocommerce-products-slider'),
|
1627 |
+
'type' => 'select',
|
1628 |
+
'value' => $wcps_slider_lazy_load,
|
1629 |
+
'default' => 'true',
|
1630 |
+
'args' => array(
|
1631 |
+
'true'=>__('True','woocommerce-products-slider'),
|
1632 |
+
'false'=>__('False','woocommerce-products-slider'),
|
1633 |
+
),
|
1634 |
+
);
|
1635 |
|
1636 |
+
$settings_tabs_field->generate_field($args);
|
1637 |
|
1638 |
$args = array(
|
1639 |
'id' => 'wcps_slider_touch_drag',
|
includes/wcps-meta-box.php
CHANGED
@@ -480,6 +480,8 @@ function meta_boxes_wcps_save( $post_id ) {
|
|
480 |
$wcps_slider_pagination_bg = sanitize_text_field( $_POST['wcps_slider_pagination_bg'] );
|
481 |
$wcps_slider_pagination_text_color = sanitize_text_field( $_POST['wcps_slider_pagination_text_color'] );
|
482 |
|
|
|
|
|
483 |
|
484 |
if(empty($_POST['wcps_slider_touch_drag']))
|
485 |
{
|
@@ -647,6 +649,7 @@ function meta_boxes_wcps_save( $post_id ) {
|
|
647 |
|
648 |
$wcps_hide_out_of_stock = sanitize_text_field( $_POST['wcps_hide_out_of_stock'] );
|
649 |
$wcps_items_thumb_link_target = sanitize_text_field( $_POST['wcps_items_thumb_link_target'] );
|
|
|
650 |
|
651 |
|
652 |
|
@@ -697,6 +700,7 @@ function meta_boxes_wcps_save( $post_id ) {
|
|
697 |
|
698 |
update_post_meta( $post_id, 'wcps_slider_pagination_bg', $wcps_slider_pagination_bg );
|
699 |
update_post_meta( $post_id, 'wcps_slider_pagination_text_color', $wcps_slider_pagination_text_color );
|
|
|
700 |
|
701 |
update_post_meta( $post_id, 'wcps_slider_touch_drag', $wcps_slider_touch_drag );
|
702 |
update_post_meta( $post_id, 'wcps_slider_mouse_drag', $wcps_slider_mouse_drag );
|
@@ -779,6 +783,7 @@ function meta_boxes_wcps_save( $post_id ) {
|
|
779 |
|
780 |
|
781 |
update_post_meta( $post_id, 'wcps_items_thumb_link_target', $wcps_items_thumb_link_target );
|
|
|
782 |
|
783 |
update_post_meta( $post_id, 'wcps_sale_count_text', $wcps_sale_count_text );
|
784 |
|
480 |
$wcps_slider_pagination_bg = sanitize_text_field( $_POST['wcps_slider_pagination_bg'] );
|
481 |
$wcps_slider_pagination_text_color = sanitize_text_field( $_POST['wcps_slider_pagination_text_color'] );
|
482 |
|
483 |
+
$wcps_slider_lazy_load = sanitize_text_field( $_POST['wcps_slider_lazy_load'] );
|
484 |
+
|
485 |
|
486 |
if(empty($_POST['wcps_slider_touch_drag']))
|
487 |
{
|
649 |
|
650 |
$wcps_hide_out_of_stock = sanitize_text_field( $_POST['wcps_hide_out_of_stock'] );
|
651 |
$wcps_items_thumb_link_target = sanitize_text_field( $_POST['wcps_items_thumb_link_target'] );
|
652 |
+
$wcps_items_thumb_lazy_src = sanitize_text_field( $_POST['wcps_items_thumb_lazy_src'] );
|
653 |
|
654 |
|
655 |
|
700 |
|
701 |
update_post_meta( $post_id, 'wcps_slider_pagination_bg', $wcps_slider_pagination_bg );
|
702 |
update_post_meta( $post_id, 'wcps_slider_pagination_text_color', $wcps_slider_pagination_text_color );
|
703 |
+
update_post_meta( $post_id, 'wcps_slider_lazy_load', $wcps_slider_lazy_load );
|
704 |
|
705 |
update_post_meta( $post_id, 'wcps_slider_touch_drag', $wcps_slider_touch_drag );
|
706 |
update_post_meta( $post_id, 'wcps_slider_mouse_drag', $wcps_slider_mouse_drag );
|
783 |
|
784 |
|
785 |
update_post_meta( $post_id, 'wcps_items_thumb_link_target', $wcps_items_thumb_link_target );
|
786 |
+
update_post_meta( $post_id, 'wcps_items_thumb_lazy_src', $wcps_items_thumb_lazy_src );
|
787 |
|
788 |
update_post_meta( $post_id, 'wcps_sale_count_text', $wcps_sale_count_text );
|
789 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Tags: carousel, product, slider, woocommerce, carousel slider, product slider, woocommerce slider, Woocommerce Product slider
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 1.12.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -94,6 +94,9 @@ then paste this shortcode anywhere in your page to display slider<br />
|
|
94 |
== Changelog ==
|
95 |
|
96 |
|
|
|
|
|
|
|
97 |
= 1.12.22 =
|
98 |
* 21/10/2019 update - update slider settings.
|
99 |
* 21/10/2019 add - product query by categories added
|
@@ -102,10 +105,6 @@ then paste this shortcode anywhere in your page to display slider<br />
|
|
102 |
* 21/10/2019 add - Items Category separator
|
103 |
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
= 1.12.21 =
|
110 |
* 16/05/2018 fix - remove last comma on categories.
|
111 |
|
4 |
Tags: carousel, product, slider, woocommerce, carousel slider, product slider, woocommerce slider, Woocommerce Product slider
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 1.12.23
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
94 |
== Changelog ==
|
95 |
|
96 |
|
97 |
+
= 1.12.23 =
|
98 |
+
* 18/12/2019 add - added lazy load
|
99 |
+
|
100 |
= 1.12.22 =
|
101 |
* 21/10/2019 update - update slider settings.
|
102 |
* 21/10/2019 add - product query by categories added
|
105 |
* 21/10/2019 add - Items Category separator
|
106 |
|
107 |
|
|
|
|
|
|
|
|
|
108 |
= 1.12.21 =
|
109 |
* 16/05/2018 fix - remove last comma on categories.
|
110 |
|
templates/scripts.php
CHANGED
@@ -16,64 +16,48 @@ $html.= '<script>';
|
|
16 |
|
17 |
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$html.= 'rewind: '.$wcps_rewind.',';
|
62 |
-
$html.= 'center: '.$wcps_center.',';
|
63 |
-
$html.= 'rtl: '.$wcps_slider_rtl.',';
|
64 |
-
$html.= 'animateOut: "'.$wcps_slider_animateout.'",';
|
65 |
-
$html.= 'animateIn: "'.$wcps_slider_animatein.'",';
|
66 |
-
|
67 |
-
|
68 |
-
if($wcps_auto_play=="true")
|
69 |
-
{
|
70 |
-
|
71 |
-
|
72 |
-
$html.= 'autoplay: true,';
|
73 |
-
$html.= 'autoplayHoverPause: '.$wcps_stop_on_hover.',';
|
74 |
-
$html.= 'autoplaySpeed: '.$wcps_auto_play_speed.',';
|
75 |
-
$html.= 'autoplayTimeout: '.$wcps_auto_play_timeout.',';
|
76 |
-
}
|
77 |
|
78 |
|
79 |
|
@@ -84,72 +68,72 @@ $html.= '<script>';
|
|
84 |
|
85 |
|
86 |
|
87 |
-
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
|
95 |
|
96 |
-
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
|
105 |
-
|
106 |
|
107 |
-
|
108 |
|
109 |
-
|
110 |
|
111 |
|
112 |
-
|
113 |
|
114 |
-
|
115 |
|
116 |
-
|
117 |
|
118 |
|
119 |
-
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
|
129 |
|
130 |
|
131 |
-
|
132 |
|
133 |
-
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
-
|
146 |
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
|
152 |
-
|
153 |
|
154 |
|
155 |
|
@@ -157,34 +141,34 @@ $html.= '<script>';
|
|
157 |
$html.= '});';
|
158 |
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
|
184 |
|
185 |
|
186 |
-
|
187 |
-
|
188 |
|
189 |
|
190 |
|
@@ -197,7 +181,7 @@ $html.= '});';
|
|
197 |
|
198 |
|
199 |
|
200 |
-
|
201 |
|
202 |
|
203 |
if($wcps_slider_navigation_position == 'topright') {
|
16 |
|
17 |
|
18 |
|
19 |
+
$html.= '
|
20 |
+
jQuery(document).ready(function($){
|
21 |
+
$("#wcps-'.$post_id.'").owlCarousel({
|
22 |
+
items : '.$wcps_column_number.',
|
23 |
+
lazyLoad : true,
|
24 |
+
responsiveClass:true,
|
25 |
+
responsive:{
|
26 |
+
0:{
|
27 |
+
items:'.$wcps_column_number_mobile.',
|
28 |
+
},
|
29 |
+
600:{
|
30 |
+
items:'.$wcps_column_number_tablet.',
|
31 |
+
},
|
32 |
+
900:{
|
33 |
+
items:'.$wcps_column_number_tablet.',
|
34 |
+
},
|
35 |
+
1000:{
|
36 |
+
items:'.$wcps_column_number.',
|
37 |
+
}
|
38 |
+
},';
|
39 |
+
$html.= 'slideBy: '.$wcps_slideBy.',';
|
40 |
+
$html.= 'loop: '.$wcps_loop.',';
|
41 |
+
$html.= 'rewind: '.$wcps_rewind.',';
|
42 |
+
$html.= 'center: '.$wcps_center.',';
|
43 |
+
$html.= 'rtl: '.$wcps_slider_rtl.',';
|
44 |
+
$html.= 'animateOut: "'.$wcps_slider_animateout.'",';
|
45 |
+
$html.= 'animateIn: "'.$wcps_slider_animatein.'",';
|
46 |
+
|
47 |
+
if($wcps_slider_lazy_load == 'true'){
|
48 |
+
$html.= 'lazyLoad: true,';
|
49 |
+
$html.= 'lazyLoadEager: 5000,';
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
if($wcps_auto_play=="true")
|
54 |
+
{
|
55 |
+
|
56 |
+
$html.= 'autoplay: true,';
|
57 |
+
$html.= 'autoplayHoverPause: '.$wcps_stop_on_hover.',';
|
58 |
+
$html.= 'autoplaySpeed: '.$wcps_auto_play_speed.',';
|
59 |
+
$html.= 'autoplayTimeout: '.$wcps_auto_play_timeout.',';
|
60 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
|
63 |
|
68 |
|
69 |
|
70 |
|
71 |
+
if($wcps_slider_navigation=="true"){
|
72 |
|
73 |
+
$html.= '
|
74 |
+
navText : ["",""],
|
75 |
+
nav: true,';
|
76 |
|
77 |
+
}
|
78 |
|
79 |
|
80 |
+
if(($wcps_slider_pagination=="true")){
|
81 |
|
82 |
+
$html.= 'dots: true,';
|
83 |
|
84 |
+
}
|
85 |
+
else{
|
86 |
+
$html.= 'dots: false,';
|
87 |
+
}
|
88 |
|
89 |
+
if(!empty($wcps_slide_speed)){
|
90 |
|
91 |
+
$html.= 'navSpeed: '.$wcps_slide_speed.',';
|
92 |
|
93 |
+
}
|
94 |
|
95 |
|
96 |
+
if(!empty($wcps_pagination_slide_speed)){
|
97 |
|
98 |
+
$html.= 'dotsSpeed: '.$wcps_pagination_slide_speed.',';
|
99 |
|
100 |
+
}
|
101 |
|
102 |
|
103 |
+
if(($wcps_slider_touch_drag=="true")){
|
104 |
|
105 |
+
$html.= 'touchDrag : true,';
|
106 |
|
107 |
+
}
|
108 |
+
else
|
109 |
+
{
|
110 |
+
$html.= 'touchDrag: false,';
|
111 |
+
}
|
112 |
|
113 |
|
114 |
|
115 |
+
if(($wcps_slider_mouse_drag=="true" )){
|
116 |
|
117 |
+
$html.= 'mouseDrag : true,';
|
118 |
|
119 |
+
}
|
120 |
+
else
|
121 |
+
{
|
122 |
+
$html.= 'mouseDrag : false,';
|
123 |
+
}
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
+
$html.= '});';
|
130 |
|
131 |
|
132 |
+
if($wcps_cart_display_quantity == 'yes'){
|
133 |
+
//$html.= "$('.wcps-items-cart p').prepend('<input value=1 class=quantity type=number> ');";
|
134 |
+
$html.= "$('#wcps-".$post_id." .wcps-items-cart p').prepend('<input value=1 class=quantity type=number> ');";
|
135 |
|
136 |
+
}
|
137 |
|
138 |
|
139 |
|
141 |
$html.= '});';
|
142 |
|
143 |
|
144 |
+
if($wcps_slider_navigation_position == 'topright')
|
145 |
+
{
|
146 |
+
$html.= 'jQuery(document).ready(function($)
|
147 |
+
{
|
148 |
+
$("#wcps-'.$post_id.' .owl-nav").addClass("topright");
|
149 |
|
150 |
|
151 |
+
})';
|
152 |
+
}
|
153 |
+
elseif($wcps_slider_navigation_position == 'middle')
|
154 |
+
{
|
155 |
+
$html.= 'jQuery(document).ready(function($)
|
156 |
+
{
|
157 |
+
$("#wcps-'.$post_id.' .owl-nav").addClass("middle");
|
158 |
|
159 |
|
160 |
+
})';
|
161 |
+
}
|
162 |
+
elseif($wcps_slider_navigation_position == 'middle-fixed')
|
163 |
+
{
|
164 |
+
$html.= 'jQuery(document).ready(function($)
|
165 |
+
{
|
166 |
+
$("#wcps-'.$post_id.' .owl-nav").addClass("middle-fixed");
|
167 |
|
168 |
|
169 |
|
170 |
+
})';
|
171 |
+
}
|
172 |
|
173 |
|
174 |
|
181 |
|
182 |
|
183 |
|
184 |
+
$html.= '</script>';
|
185 |
|
186 |
|
187 |
if($wcps_slider_navigation_position == 'topright') {
|
templates/variables.php
CHANGED
@@ -99,7 +99,9 @@ if ( ! defined('ABSPATH')) exit; // if direct access
|
|
99 |
$wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
|
100 |
$wcps_slider_pagination_text_color = get_post_meta( $post_id, 'wcps_slider_pagination_text_color', true );
|
101 |
|
102 |
-
|
|
|
|
|
103 |
$wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
|
104 |
|
105 |
$wcps_slider_rtl = get_post_meta( $post_id, 'wcps_slider_rtl', true );
|
@@ -184,6 +186,7 @@ $wcps_query_order = get_post_meta( $post_id, 'wcps_query_order', true );
|
|
184 |
$wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
|
185 |
|
186 |
$wcps_items_thumb_link_target = get_post_meta( $post_id, 'wcps_items_thumb_link_target', true );
|
|
|
187 |
|
188 |
|
189 |
$wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
|
99 |
$wcps_slider_pagination_bg = get_post_meta( $post_id, 'wcps_slider_pagination_bg', true );
|
100 |
$wcps_slider_pagination_text_color = get_post_meta( $post_id, 'wcps_slider_pagination_text_color', true );
|
101 |
|
102 |
+
$wcps_slider_lazy_load = get_post_meta( $post_id, 'wcps_slider_lazy_load', true );
|
103 |
+
|
104 |
+
$wcps_slider_touch_drag = get_post_meta( $post_id, 'wcps_slider_touch_drag', true );
|
105 |
$wcps_slider_mouse_drag = get_post_meta( $post_id, 'wcps_slider_mouse_drag', true );
|
106 |
|
107 |
$wcps_slider_rtl = get_post_meta( $post_id, 'wcps_slider_rtl', true );
|
186 |
$wcps_items_thumb_size = get_post_meta( $post_id, 'wcps_items_thumb_size', true );
|
187 |
|
188 |
$wcps_items_thumb_link_target = get_post_meta( $post_id, 'wcps_items_thumb_link_target', true );
|
189 |
+
$wcps_items_thumb_lazy_src = get_post_meta( $post_id, 'wcps_items_thumb_lazy_src', true );
|
190 |
|
191 |
|
192 |
$wcps_items_thumb_max_hieght = get_post_meta( $post_id, 'wcps_items_thumb_max_hieght', true );
|
templates/wcps-thumb.php
CHANGED
@@ -51,10 +51,16 @@ if ( ! defined('ABSPATH')) exit; // if direct access
|
|
51 |
$html.= '<div class="wcps-items-thumb">';
|
52 |
|
53 |
$html_thumb = '';
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
$html.= apply_filters( 'wcps_filter_thumb', $html_thumb );
|
59 |
|
60 |
$html_zoom = apply_filters('wcps_filter_zoom', '<i class="fa fa-search-plus"></i>');
|
51 |
$html.= '<div class="wcps-items-thumb">';
|
52 |
|
53 |
$html_thumb = '';
|
|
|
54 |
|
55 |
+
if($wcps_slider_lazy_load == 'true'){
|
56 |
+
$html_thumb = '<a target="'.$wcps_items_thumb_link_target.'" href="'.$permalink.'"><img class="owl-lazy" alt="'.get_the_title().'" data-src="'.$wcps_thumb_url.'" src="'.$wcps_items_thumb_lazy_src.'" /></a>';
|
57 |
+
|
58 |
+
}else{
|
59 |
+
$html_thumb = '<a target="'.$wcps_items_thumb_link_target.'" href="'.$permalink.'"><img alt="'.get_the_title().'" src="'.$wcps_thumb_url.'" /></a>';
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
$html.= apply_filters( 'wcps_filter_thumb', $html_thumb );
|
65 |
|
66 |
$html_zoom = apply_filters('wcps_filter_zoom', '<i class="fa fa-search-plus"></i>');
|
woocommerce-products-slider.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: PickPlugins Product Slider for WooCommerce
|
4 |
Plugin URI: http://pickplugins.com/items/woocommerce-product-slider-for-wordpress/
|
5 |
Description: Fully responsive and mobile ready Carousel Slider for your WooCommerce product. unlimited slider anywhere via short-codes and easy admin setting.
|
6 |
-
Version: 1.12.
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 3.7
|
9 |
Author: PickPlugins
|
@@ -24,7 +24,7 @@ class WoocommerceProductsSlider{
|
|
24 |
define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
|
25 |
define('wcps_wp_url', 'https://wordpress.org/plugins/woocommerce-products-slider/' );
|
26 |
define('wcps_plugin_name', 'PickPlugins Product Slider' );
|
27 |
-
define('wcps_version', '1.12.
|
28 |
define('wcps_server_url', 'https://www.pickplugins.com' );
|
29 |
define('wcps_plugin_basename', plugin_basename( __FILE__ ) );
|
30 |
|
3 |
Plugin Name: PickPlugins Product Slider for WooCommerce
|
4 |
Plugin URI: http://pickplugins.com/items/woocommerce-product-slider-for-wordpress/
|
5 |
Description: Fully responsive and mobile ready Carousel Slider for your WooCommerce product. unlimited slider anywhere via short-codes and easy admin setting.
|
6 |
+
Version: 1.12.23
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 3.7
|
9 |
Author: PickPlugins
|
24 |
define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
|
25 |
define('wcps_wp_url', 'https://wordpress.org/plugins/woocommerce-products-slider/' );
|
26 |
define('wcps_plugin_name', 'PickPlugins Product Slider' );
|
27 |
+
define('wcps_version', '1.12.23' );
|
28 |
define('wcps_server_url', 'https://www.pickplugins.com' );
|
29 |
define('wcps_plugin_basename', plugin_basename( __FILE__ ) );
|
30 |
|