Woocommerce Products Slider - Version 1.13.7

Version Description

  • 2020-03-28 fix - Product title link issue fixed.
    • 2020-03-28 fix - Product thumbnail link issue fixed.
    • 2020-03-28 fix - Product excerpt read more link issue fixed.
Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Woocommerce Products Slider
Version 1.13.7
Comparing to
See all releases

Code changes from version 1.13.6 to 1.13.7

includes/functions-layout-element.php CHANGED
@@ -25,6 +25,41 @@ function wcps_layout_element_post_title($args){
25
 
26
  }
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
 
30
  add_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail');
@@ -71,6 +106,34 @@ function wcps_layout_element_thumbnail($args){
71
 
72
 
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
 
76
 
@@ -98,7 +161,7 @@ function wcps_layout_element_content($args){
98
  $post_data= get_post($product_id);
99
 
100
  $product_url = get_permalink($product_id);
101
- $product_url = apply_filters('wcps_layout_element_content_link',$product_url, $args);
102
 
103
  $content = isset($post_data->post_content) ? $post_data->post_content : '';
104
 
@@ -127,6 +190,54 @@ function wcps_layout_element_content($args){
127
 
128
 
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  add_action('wcps_layout_element_product_category', 'wcps_layout_element_product_category');
131
  function wcps_layout_element_product_category($args){
132
 
25
 
26
  }
27
 
28
+ add_filter('wcps_layout_element_title_text', 'wcps_layout_element_title_text', 99, 2);
29
+ function wcps_layout_element_title_text($post_title, $args){
30
+
31
+ //echo '<pre>'.var_export($args, true).'</pre>';
32
+ $product_id = isset($args['product_id']) ? $args['product_id'] : '';
33
+ $elementData = isset($args['elementData']) ? $args['elementData'] : array();
34
+ $link_to = isset($elementData['link_to']) ? $elementData['link_to'] : '';
35
+
36
+ $product = wc_get_product( $product_id );
37
+
38
+
39
+ if($link_to == 'product_link'){
40
+ $permalink = get_permalink($product_id);
41
+
42
+ $post_title = "<a href='".$permalink."'>".$post_title."</a>";
43
+ }elseif ($link_to == 'external_product_url'){
44
+
45
+ if($product->is_type('external')){
46
+ $permalink = get_post_meta($product_id,'_product_url', true);
47
+ }else{
48
+ $permalink = get_permalink($product_id);
49
+ }
50
+
51
+
52
+
53
+ $post_title = "<a href='".$permalink."'>".$post_title."</a>";
54
+ }
55
+
56
+ return $post_title;
57
+
58
+ }
59
+
60
+
61
+
62
+
63
 
64
 
65
  add_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail');
106
 
107
 
108
 
109
+ add_filter('wcps_layout_element_thumbnail_url', 'wcps_layout_element_thumbnail_url', 99, 2);
110
+ function wcps_layout_element_thumbnail_url($permalink, $args){
111
+
112
+ //echo '<pre>'.var_export($args, true).'</pre>';
113
+ $product_id = isset($args['product_id']) ? $args['product_id'] : '';
114
+ $elementData = isset($args['elementData']) ? $args['elementData'] : array();
115
+ $link_to = isset($elementData['link_to']) ? $elementData['link_to'] : '';
116
+
117
+ $product = wc_get_product( $product_id );
118
+
119
+ if($link_to == 'product_link'){
120
+ $permalink = get_permalink($product_id);
121
+
122
+ }elseif ($link_to == 'external_product_url'){
123
+
124
+ if($product->is_type('external')){
125
+ $permalink = get_post_meta($product_id,'_product_url', true);
126
+ }else{
127
+ $permalink = get_permalink($product_id);
128
+ }
129
+
130
+ }
131
+
132
+ return $permalink;
133
+
134
+ }
135
+
136
+
137
 
138
 
139
 
161
  $post_data= get_post($product_id);
162
 
163
  $product_url = get_permalink($product_id);
164
+ $product_url = apply_filters('wcps_layout_element_content_link', $product_url, $args);
165
 
166
  $content = isset($post_data->post_content) ? $post_data->post_content : '';
167
 
190
 
191
 
192
 
193
+
194
+
195
+
196
+
197
+
198
+ add_filter('wcps_layout_element_content_link', 'wcps_layout_element_content_link', 99, 2);
199
+ function wcps_layout_element_content_link($permalink, $args){
200
+
201
+ //echo '<pre>'.var_export($args, true).'</pre>';
202
+ $product_id = isset($args['product_id']) ? $args['product_id'] : '';
203
+ $elementData = isset($args['elementData']) ? $args['elementData'] : array();
204
+ $link_to = isset($elementData['link_to']) ? $elementData['link_to'] : '';
205
+
206
+ $product = wc_get_product( $product_id );
207
+
208
+
209
+ if($link_to == 'product_link'){
210
+ $permalink = get_permalink($product_id);
211
+
212
+ }elseif ($link_to == 'external_product_url'){
213
+
214
+ if($product->is_type('external')){
215
+ $permalink = get_post_meta($product_id,'_product_url', true);
216
+ }else{
217
+ $permalink = get_permalink($product_id);
218
+ }
219
+
220
+ }
221
+
222
+ return $permalink;
223
+
224
+ }
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
  add_action('wcps_layout_element_product_category', 'wcps_layout_element_product_category');
242
  function wcps_layout_element_product_category($args){
243
 
includes/functions-layout-hook.php CHANGED
@@ -121,7 +121,13 @@ function wcps_layout_elements_option_post_title($parameters){
121
  'type' => 'select',
122
  'value' => $link_to,
123
  'default' => 'product_link',
124
- 'args' => array('none'=> __('None', 'woocommerce-products-slider'),'external_product_url'=> __('External product', 'woocommerce-products-slider'), 'product_link'=> __('product link', 'woocommerce-products-slider'), 'popup_box'=> __('Popup box', 'woocommerce-products-slider'), 'custom_link'=> __('Custom link', 'woocommerce-products-slider') ),
 
 
 
 
 
 
125
  );
126
 
127
  $settings_tabs_field->generate_field($args);
@@ -323,25 +329,33 @@ function wcps_layout_elements_option_thumbnail($parameters){
323
  'type' => 'select',
324
  'value' => $link_to,
325
  'default' => 'product_link',
326
- 'args' => array('none'=> __('None', 'woocommerce-products-slider'),'product_link'=> __('Product link', 'woocommerce-products-slider'),'popup_box'=> __('Popup box', 'woocommerce-products-slider'), 'custom_link'=> __('Custom link', 'woocommerce-products-slider'), 'meta_value'=> __('Meta value', 'woocommerce-products-slider') ),
 
 
 
 
 
 
 
 
327
  );
328
 
329
  $settings_tabs_field->generate_field($args);
330
 
331
 
332
- $args = array(
333
- 'id' => 'link_to_meta_key',
334
- 'css_id' => $element_index.'_margin',
335
- 'parent' => $input_name.'[thumbnail]',
336
- 'title' => __('Link to meta key','woocommerce-products-slider'),
337
- 'details' => __('Write meta key for meta value link.','woocommerce-products-slider'),
338
- 'type' => 'text',
339
- 'value' => $link_to_meta_key,
340
- 'default' => '',
341
- 'placeholder' => '',
342
- );
343
-
344
- $settings_tabs_field->generate_field($args);
345
 
346
  ?>
347
 
@@ -555,7 +569,13 @@ function wcps_layout_elements_option_content($parameters){
555
  'type' => 'select',
556
  'value' => $link_to,
557
  'default' => 'product_link',
558
- 'args' => array('none'=> __('None', 'woocommerce-products-slider'),'product_link'=> __('Product link', 'woocommerce-products-slider'),'popup_box'=> __('Popup box', 'woocommerce-products-slider'), 'custom_link'=> __('Custom link', 'woocommerce-products-slider') ),
 
 
 
 
 
 
559
  );
560
 
561
  $settings_tabs_field->generate_field($args);
121
  'type' => 'select',
122
  'value' => $link_to,
123
  'default' => 'product_link',
124
+ 'args' => array(
125
+ 'none'=> __('None', 'woocommerce-products-slider'),
126
+ 'product_link'=> __('product link', 'woocommerce-products-slider'),
127
+ 'external_product_url'=> __('External product', 'woocommerce-products-slider'),
128
+ // 'popup_box'=> __('Popup box', 'woocommerce-products-slider'),
129
+ // 'custom_link'=> __('Custom link', 'woocommerce-products-slider')
130
+ ),
131
  );
132
 
133
  $settings_tabs_field->generate_field($args);
329
  'type' => 'select',
330
  'value' => $link_to,
331
  'default' => 'product_link',
332
+ 'args' => array(
333
+
334
+ 'none'=> __('None', 'woocommerce-products-slider'),
335
+ 'product_link'=> __('Product link', 'woocommerce-products-slider'),
336
+ 'external_product_url'=> __('External product', 'woocommerce-products-slider'),
337
+ // 'popup_box'=> __('Popup box', 'woocommerce-products-slider'),
338
+ // 'custom_link'=> __('Custom link', 'woocommerce-products-slider'),
339
+ // 'meta_value'=> __('Meta value', 'woocommerce-products-slider')
340
+ ),
341
  );
342
 
343
  $settings_tabs_field->generate_field($args);
344
 
345
 
346
+ // $args = array(
347
+ // 'id' => 'link_to_meta_key',
348
+ // 'css_id' => $element_index.'_margin',
349
+ // 'parent' => $input_name.'[thumbnail]',
350
+ // 'title' => __('Link to meta key','woocommerce-products-slider'),
351
+ // 'details' => __('Write meta key for meta value link.','woocommerce-products-slider'),
352
+ // 'type' => 'text',
353
+ // 'value' => $link_to_meta_key,
354
+ // 'default' => '',
355
+ // 'placeholder' => '',
356
+ // );
357
+ //
358
+ // $settings_tabs_field->generate_field($args);
359
 
360
  ?>
361
 
569
  'type' => 'select',
570
  'value' => $link_to,
571
  'default' => 'product_link',
572
+ 'args' => array(
573
+ 'none'=> __('None', 'woocommerce-products-slider'),
574
+ 'product_link'=> __('Product link', 'woocommerce-products-slider'),
575
+ 'external_product_url'=> __('External product', 'woocommerce-products-slider'),
576
+ // 'popup_box'=> __('Popup box', 'woocommerce-products-slider'),
577
+ // 'custom_link'=> __('Custom link', 'woocommerce-products-slider')
578
+ ),
579
  );
580
 
581
  $settings_tabs_field->generate_field($args);
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.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -141,6 +141,12 @@ then paste this shortcode anywhere in your page to display slider<br />
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
 
144
  = 1.13.6 =
145
  * 2020-03-27 add - Product content source short-description added.
146
  * 2020-03-27 add - Import default layouts notice 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.7
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.7 =
145
+ * 2020-03-28 fix - Product title link issue fixed.
146
+ * 2020-03-28 fix - Product thumbnail link issue fixed.
147
+ * 2020-03-28 fix - Product excerpt read more link issue fixed.
148
+
149
+
150
  = 1.13.6 =
151
  * 2020-03-27 add - Product content source short-description added.
152
  * 2020-03-27 add - Import default layouts notice added.
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.6
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.6' );
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.7
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.7' );
27
 
28
  require_once( wcps_plugin_dir . 'includes/class-post-types.php');
29
  require_once( wcps_plugin_dir . 'includes/class-metabox-wcps.php');