Version Description
- 2020-03-05 add - New Layout element Product ID added
- 2020-03-05 fix - autoplay speed issue fixed.
Download this release
Release Info
Developer | pickplugins |
Plugin | Woocommerce Products Slider |
Version | 1.13.2 |
Comparing to | |
See all releases |
Code changes from version 1.13.1 to 1.13.2
includes/functions-layout-element.php
CHANGED
@@ -407,6 +407,22 @@ function wcps_layout_element_featured_mark($args){
|
|
407 |
|
408 |
|
409 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
|
412 |
add_action('wcps_layout_element_rating', 'wcps_layout_element_rating');
|
@@ -702,6 +718,47 @@ function wcps_layout_element_css_featured_mark($args){
|
|
702 |
}
|
703 |
|
704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
add_action('wcps_layout_element_css_add_to_cart', 'wcps_layout_element_css_add_to_cart');
|
706 |
function wcps_layout_element_css_add_to_cart($args){
|
707 |
|
407 |
|
408 |
|
409 |
|
410 |
+
add_action('wcps_layout_element_product_id', 'wcps_layout_element_product_id');
|
411 |
+
function wcps_layout_element_product_id($args){
|
412 |
+
|
413 |
+
$element_index = isset($args['element_index']) ? $args['element_index'] : '';
|
414 |
+
$element_class = !empty($element_index) ? 'element-'.$element_index : '';
|
415 |
+
|
416 |
+
//echo '<pre>'.var_export($args, true).'</pre>';
|
417 |
+
$product_id = isset($args['product_id']) ? $args['product_id'] : '';
|
418 |
+
$elementData = isset($args['elementData']) ? $args['elementData'] : array();
|
419 |
+
$wrapper_html = !empty($elementData['wrapper_html']) ? $elementData['wrapper_html'] : '%s';
|
420 |
+
|
421 |
+
?>
|
422 |
+
<div class="featured-mark <?php echo $element_class; ?>"><?php echo sprintf($wrapper_html, $product_id); ?></div>
|
423 |
+
<?php
|
424 |
+
|
425 |
+
}
|
426 |
|
427 |
|
428 |
add_action('wcps_layout_element_rating', 'wcps_layout_element_rating');
|
718 |
}
|
719 |
|
720 |
|
721 |
+
|
722 |
+
add_action('wcps_layout_element_css_product_id', 'wcps_layout_element_css_product_id');
|
723 |
+
function wcps_layout_element_css_product_id($args){
|
724 |
+
|
725 |
+
//echo '<pre>'.var_export($args, true).'</pre>';
|
726 |
+
$element_index = isset($args['element_index']) ? $args['element_index'] : '';
|
727 |
+
$elementData = isset($args['elementData']) ? $args['elementData'] : array();
|
728 |
+
$layout_id = isset($args['layout_id']) ? $args['layout_id'] : '';
|
729 |
+
|
730 |
+
$background_color = isset($elementData['background_color']) ? $elementData['background_color'] : '';
|
731 |
+
$text_color = isset($elementData['text_color']) ? $elementData['text_color'] : '';
|
732 |
+
$font_size = isset($elementData['font_size']) ? $elementData['font_size'] : '';
|
733 |
+
$margin = isset($elementData['margin']) ? $elementData['margin'] : '';
|
734 |
+
|
735 |
+
|
736 |
+
?>
|
737 |
+
<style type="text/css">
|
738 |
+
.layout-<?php echo $layout_id; ?> .element-<?php echo $element_index; ?>{
|
739 |
+
<?php if(!empty($background_color)): ?>
|
740 |
+
background-color: <?php echo $background_color; ?>;
|
741 |
+
<?php endif; ?>
|
742 |
+
<?php if(!empty($text_color)): ?>
|
743 |
+
color: <?php echo $text_color; ?>;
|
744 |
+
<?php endif; ?>
|
745 |
+
<?php if(!empty($font_size)): ?>
|
746 |
+
font-size: <?php echo $font_size; ?>;
|
747 |
+
<?php endif; ?>
|
748 |
+
line-height: normal;
|
749 |
+
<?php if(!empty($margin)): ?>
|
750 |
+
padding: <?php echo $margin; ?>;
|
751 |
+
<?php endif; ?>
|
752 |
+
}
|
753 |
+
</style>
|
754 |
+
<?php
|
755 |
+
}
|
756 |
+
|
757 |
+
|
758 |
+
|
759 |
+
|
760 |
+
|
761 |
+
|
762 |
add_action('wcps_layout_element_css_add_to_cart', 'wcps_layout_element_css_add_to_cart');
|
763 |
function wcps_layout_element_css_add_to_cart($args){
|
764 |
|
includes/functions-layout-hook.php
CHANGED
@@ -1212,7 +1212,7 @@ function wcps_layout_elements_option_featured_mark($parameters){
|
|
1212 |
'id' => 'padding',
|
1213 |
'css_id' => $element_index.'_padding',
|
1214 |
'parent' => $input_name.'[featured_mark]',
|
1215 |
-
'title' => __('
|
1216 |
'details' => __('Choose padding.','woocommerce-products-slider'),
|
1217 |
'type' => 'text',
|
1218 |
'value' => $padding,
|
@@ -1355,7 +1355,7 @@ function wcps_layout_elements_option_on_sale_mark($parameters){
|
|
1355 |
'id' => 'padding',
|
1356 |
'css_id' => $element_index.'_padding',
|
1357 |
'parent' => $input_name.'[on_sale_mark]',
|
1358 |
-
'title' => __('
|
1359 |
'details' => __('Choose padding.','woocommerce-products-slider'),
|
1360 |
'type' => 'text',
|
1361 |
'value' => $padding,
|
@@ -1376,6 +1376,117 @@ function wcps_layout_elements_option_on_sale_mark($parameters){
|
|
1376 |
}
|
1377 |
|
1378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1379 |
|
1380 |
add_action('wcps_layout_elements_option_add_to_cart','wcps_layout_elements_option_add_to_cart');
|
1381 |
function wcps_layout_elements_option_add_to_cart($parameters){
|
1212 |
'id' => 'padding',
|
1213 |
'css_id' => $element_index.'_padding',
|
1214 |
'parent' => $input_name.'[featured_mark]',
|
1215 |
+
'title' => __('Padding','woocommerce-products-slider'),
|
1216 |
'details' => __('Choose padding.','woocommerce-products-slider'),
|
1217 |
'type' => 'text',
|
1218 |
'value' => $padding,
|
1355 |
'id' => 'padding',
|
1356 |
'css_id' => $element_index.'_padding',
|
1357 |
'parent' => $input_name.'[on_sale_mark]',
|
1358 |
+
'title' => __('Padding','woocommerce-products-slider'),
|
1359 |
'details' => __('Choose padding.','woocommerce-products-slider'),
|
1360 |
'type' => 'text',
|
1361 |
'value' => $padding,
|
1376 |
}
|
1377 |
|
1378 |
|
1379 |
+
add_action('wcps_layout_elements_option_product_id','wcps_layout_elements_option_product_id');
|
1380 |
+
function wcps_layout_elements_option_product_id($parameters){
|
1381 |
+
|
1382 |
+
$settings_tabs_field = new settings_tabs_field();
|
1383 |
+
|
1384 |
+
$input_name = isset($parameters['input_name']) ? $parameters['input_name'] : '{input_name}';
|
1385 |
+
$element_data = isset($parameters['element_data']) ? $parameters['element_data'] : array();
|
1386 |
+
$element_index = isset($parameters['index']) ? $parameters['index'] : '';
|
1387 |
+
|
1388 |
+
$wrapper_html = isset($element_data['wrapper_html']) ? $element_data['wrapper_html'] : '';
|
1389 |
+
$font_size = isset($element_data['font_size']) ? $element_data['font_size'] : '';
|
1390 |
+
$background_color = isset($element_data['background_color']) ? $element_data['background_color'] : '';
|
1391 |
+
$text_color = isset($element_data['text_color']) ? $element_data['text_color'] : '';
|
1392 |
+
$margin = isset($element_data['margin']) ? $element_data['margin'] : '';
|
1393 |
+
|
1394 |
+
?>
|
1395 |
+
<div class="item">
|
1396 |
+
<div class="element-title header ">
|
1397 |
+
<span class="remove" onclick="jQuery(this).parent().parent().remove()"><i class="fas fa-times"></i></span>
|
1398 |
+
<span class="sort"><i class="fas fa-sort"></i></span>
|
1399 |
+
|
1400 |
+
<span class="expand"><?php echo __('Product ID','woocommerce-products-slider'); ?></span>
|
1401 |
+
</div>
|
1402 |
+
<div class="element-options options">
|
1403 |
+
|
1404 |
+
<?php
|
1405 |
+
|
1406 |
+
$args = array(
|
1407 |
+
'id' => 'wrapper_html',
|
1408 |
+
'css_id' => $element_index.'_wrapper_html',
|
1409 |
+
'parent' => $input_name.'[product_id]',
|
1410 |
+
'title' => __('Wrapper html','woocommerce-products-slider'),
|
1411 |
+
'details' => __('Write wrapper html, use <code>%s</code> to replace on-sale output.','woocommerce-products-slider'),
|
1412 |
+
'type' => 'text',
|
1413 |
+
'value' => $wrapper_html,
|
1414 |
+
'default' => '',
|
1415 |
+
'placeholder' => 'Product ID: %s',
|
1416 |
+
);
|
1417 |
+
|
1418 |
+
$settings_tabs_field->generate_field($args);
|
1419 |
+
|
1420 |
+
|
1421 |
+
$args = array(
|
1422 |
+
'id' => 'background_color',
|
1423 |
+
'css_id' => $element_index.'_background_color',
|
1424 |
+
'parent' => $input_name.'[product_id]',
|
1425 |
+
'title' => __('Background color','woocommerce-products-slider'),
|
1426 |
+
'details' => __('Choose background color.','woocommerce-products-slider'),
|
1427 |
+
'type' => 'colorpicker',
|
1428 |
+
'value' => $background_color,
|
1429 |
+
'default' => '',
|
1430 |
+
);
|
1431 |
+
|
1432 |
+
$settings_tabs_field->generate_field($args);
|
1433 |
+
|
1434 |
+
$args = array(
|
1435 |
+
'id' => 'text_color',
|
1436 |
+
'css_id' => $element_index.'_text_color',
|
1437 |
+
'parent' => $input_name.'[product_id]',
|
1438 |
+
'title' => __('Text color','woocommerce-products-slider'),
|
1439 |
+
'details' => __('Choose text color.','woocommerce-products-slider'),
|
1440 |
+
'type' => 'colorpicker',
|
1441 |
+
'value' => $text_color,
|
1442 |
+
'default' => '',
|
1443 |
+
);
|
1444 |
+
|
1445 |
+
$settings_tabs_field->generate_field($args);
|
1446 |
+
|
1447 |
+
|
1448 |
+
|
1449 |
+
$args = array(
|
1450 |
+
'id' => 'font_size',
|
1451 |
+
'css_id' => $element_index.'_font_size',
|
1452 |
+
'parent' => $input_name.'[product_id]',
|
1453 |
+
'title' => __('Font size','woocommerce-products-slider'),
|
1454 |
+
'details' => __('Choose text font size.','woocommerce-products-slider'),
|
1455 |
+
'type' => 'text',
|
1456 |
+
'value' => $font_size,
|
1457 |
+
'default' => '',
|
1458 |
+
'placeholder' => '16px',
|
1459 |
+
);
|
1460 |
+
|
1461 |
+
$settings_tabs_field->generate_field($args);
|
1462 |
+
|
1463 |
+
$args = array(
|
1464 |
+
'id' => 'margin',
|
1465 |
+
'css_id' => $element_index.'_padding',
|
1466 |
+
'parent' => $input_name.'[product_id]',
|
1467 |
+
'title' => __('Margin','woocommerce-products-slider'),
|
1468 |
+
'details' => __('Choose padding.','woocommerce-products-slider'),
|
1469 |
+
'type' => 'text',
|
1470 |
+
'value' => $margin,
|
1471 |
+
'default' => '',
|
1472 |
+
'placeholder' => '5px 10px',
|
1473 |
+
);
|
1474 |
+
|
1475 |
+
$settings_tabs_field->generate_field($args);
|
1476 |
+
|
1477 |
+
|
1478 |
+
|
1479 |
+
?>
|
1480 |
+
|
1481 |
+
</div>
|
1482 |
+
</div>
|
1483 |
+
<?php
|
1484 |
+
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
|
1488 |
+
|
1489 |
+
|
1490 |
|
1491 |
add_action('wcps_layout_elements_option_add_to_cart','wcps_layout_elements_option_add_to_cart');
|
1492 |
function wcps_layout_elements_option_add_to_cart($parameters){
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Tags: product slider, woocommerce slider, woo slider, woo product carousel slider, woocommerce product slider
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 1.13.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -141,10 +141,17 @@ then paste this shortcode anywhere in your page to display slider<br />
|
|
141 |
|
142 |
== Changelog ==
|
143 |
|
|
|
|
|
|
|
|
|
|
|
144 |
= 1.13.1 =
|
145 |
* 2020-03-05 fix - Data import ribbon issue fixed.
|
146 |
* 2020-03-05 fix - Text domain issue fixed.
|
147 |
* 2020-03-05 add - Layout element Featured mark, On sale mark padding added
|
|
|
|
|
148 |
|
149 |
= 1.13.0 =
|
150 |
* 2020-03-04 add - Layout builder added.
|
4 |
Tags: product slider, woocommerce slider, woo slider, woo product carousel slider, woocommerce product slider
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 1.13.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
141 |
|
142 |
== Changelog ==
|
143 |
|
144 |
+
= 1.13.2 =
|
145 |
+
* 2020-03-05 add - New Layout element Product ID added
|
146 |
+
* 2020-03-05 fix - autoplay speed issue fixed.
|
147 |
+
|
148 |
+
|
149 |
= 1.13.1 =
|
150 |
* 2020-03-05 fix - Data import ribbon issue fixed.
|
151 |
* 2020-03-05 fix - Text domain issue fixed.
|
152 |
* 2020-03-05 add - Layout element Featured mark, On sale mark padding added
|
153 |
+
* 2020-03-05 add - New Layout element Product ID added
|
154 |
+
|
155 |
|
156 |
= 1.13.0 =
|
157 |
* 2020-03-04 add - Layout builder added.
|
templates/wcps-slider/wcps-slider-hook.php
CHANGED
@@ -316,7 +316,7 @@ function wcps_slider_main_scripts( $args){
|
|
316 |
$auto_play_speed = !empty($slider_option['auto_play_speed']) ? $slider_option['auto_play_speed'] : 1000;
|
317 |
$auto_play_timeout = !empty($slider_option['auto_play_timeout']) ? $slider_option['auto_play_timeout'] : 1200;
|
318 |
|
319 |
-
$auto_play_timeout = ($auto_play_speed
|
320 |
|
321 |
$slider_rewind = !empty($slider_option['rewind']) ? $slider_option['rewind'] : 'true';
|
322 |
$slider_loop = !empty($slider_option['loop']) ? $slider_option['loop'] : 'true';
|
316 |
$auto_play_speed = !empty($slider_option['auto_play_speed']) ? $slider_option['auto_play_speed'] : 1000;
|
317 |
$auto_play_timeout = !empty($slider_option['auto_play_timeout']) ? $slider_option['auto_play_timeout'] : 1200;
|
318 |
|
319 |
+
$auto_play_timeout = ($auto_play_speed >= $auto_play_timeout) ? $auto_play_speed + 1000 : $auto_play_timeout;
|
320 |
|
321 |
$slider_rewind = !empty($slider_option['rewind']) ? $slider_option['rewind'] : 'true';
|
322 |
$slider_loop = !empty($slider_option['loop']) ? $slider_option['loop'] : 'true';
|
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.13.
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 3.9
|
9 |
Author: PickPlugins
|
@@ -23,7 +23,7 @@ class WoocommerceProductsSlider{
|
|
23 |
define('wcps_plugin_url', plugins_url('/', __FILE__) );
|
24 |
define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
|
25 |
define('wcps_plugin_name', 'PickPlugins Product Slider' );
|
26 |
-
define('wcps_plugin_version', '1.13.
|
27 |
|
28 |
require_once( wcps_plugin_dir . 'includes/class-post-types.php');
|
29 |
require_once( wcps_plugin_dir . 'includes/class-metabox-wcps.php');
|
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.13.2
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 3.9
|
9 |
Author: PickPlugins
|
23 |
define('wcps_plugin_url', plugins_url('/', __FILE__) );
|
24 |
define('wcps_plugin_dir', plugin_dir_path( __FILE__ ) );
|
25 |
define('wcps_plugin_name', 'PickPlugins Product Slider' );
|
26 |
+
define('wcps_plugin_version', '1.13.2' );
|
27 |
|
28 |
require_once( wcps_plugin_dir . 'includes/class-post-types.php');
|
29 |
require_once( wcps_plugin_dir . 'includes/class-metabox-wcps.php');
|