Woocommerce Products Slider - Version 1.13.8

Version Description

  • 2020-03-31 fix - product short description remove html issue fixed.
    • 2020-03-31 fix - Custom CSS issue fixed.
Download this release

Release Info

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

Code changes from version 1.13.7 to 1.13.8

includes/class-metabox-wcps-hook.php CHANGED
@@ -581,7 +581,7 @@ if(!function_exists('wcps_metabox_content_query_product')) {
581
  $terms = isset($taxonomies[$taxonomy]['terms']) ? $taxonomies[$taxonomy]['terms'] : array();
582
  $terms_relation = isset($taxonomies[$taxonomy]['terms_relation']) ? $taxonomies[$taxonomy]['terms_relation'] : 'IN';
583
 
584
- //if(!in_array($taxonomy, $wcps_allowed_taxonomies)) continue;
585
  //if($taxonomy != 'product_cat' && $taxonomy != 'product_tag') continue;
586
 
587
  $the_taxonomy = get_taxonomy($taxonomy);
@@ -1459,8 +1459,9 @@ if(!function_exists('wcps_metabox_content_custom_scripts')) {
1459
 
1460
  $settings_tabs_field = new settings_tabs_field();
1461
 
 
 
1462
 
1463
- $wcps_items_custom_css = get_post_meta( $post_id, 'wcps_items_custom_css', true );
1464
 
1465
 
1466
  ?>
@@ -1474,9 +1475,9 @@ if(!function_exists('wcps_metabox_content_custom_scripts')) {
1474
  'id' => 'custom_css',
1475
  'parent' => 'wcps_options',
1476
  'title' => __('Custom CSS','woocommerce-products-slider'),
1477
- 'details' => __('Add your own CSS..','woocommerce-products-slider'),
1478
  'type' => 'scripts_css',
1479
- 'value' => $wcps_items_custom_css,
1480
  'default' => '.wcps-container #wcps-133{}
 .wcps-container #wcps-133 .wcps-items{}
.wcps-container #wcps-133 .wcps-items-thumb{}
',
1481
  );
1482
 
581
  $terms = isset($taxonomies[$taxonomy]['terms']) ? $taxonomies[$taxonomy]['terms'] : array();
582
  $terms_relation = isset($taxonomies[$taxonomy]['terms_relation']) ? $taxonomies[$taxonomy]['terms_relation'] : 'IN';
583
 
584
+ if(!in_array($taxonomy, $wcps_allowed_taxonomies)) continue;
585
  //if($taxonomy != 'product_cat' && $taxonomy != 'product_tag') continue;
586
 
587
  $the_taxonomy = get_taxonomy($taxonomy);
1459
 
1460
  $settings_tabs_field = new settings_tabs_field();
1461
 
1462
+ $wcps_options = get_post_meta( $post_id, 'wcps_options', true );
1463
+ $custom_css = isset($wcps_options['custom_css']) ? $wcps_options['custom_css'] : '';
1464
 
 
1465
 
1466
 
1467
  ?>
1475
  'id' => 'custom_css',
1476
  'parent' => 'wcps_options',
1477
  'title' => __('Custom CSS','woocommerce-products-slider'),
1478
+ 'details' => __('Write custom CSS to override default style, do not use <code>&lt;style>&lt;/style></code> tag. use <code>__ID__</code> to replace by wcps id <code>'.$post_id.'</code>.','woocommerce-products-slider'),
1479
  'type' => 'scripts_css',
1480
+ 'value' => $custom_css,
1481
  'default' => '.wcps-container #wcps-133{}&#10; .wcps-container #wcps-133 .wcps-items{}&#10;.wcps-container #wcps-133 .wcps-items-thumb{}&#10;',
1482
  );
1483
 
includes/class-settings-tabs.php CHANGED
@@ -1149,6 +1149,8 @@ class settings_tabs_field{
1149
  $field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
1150
 
1151
 
 
 
1152
  ob_start();
1153
  ?>
1154
  <textarea name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
1149
  $field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
1150
 
1151
 
1152
+
1153
+
1154
  ob_start();
1155
  ?>
1156
  <textarea name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
includes/functions-layout-element.php CHANGED
@@ -3,7 +3,7 @@ if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
 
5
 
6
- add_action('wcps_layout_element_post_title', 'wcps_layout_element_post_title');
7
  function wcps_layout_element_post_title($args){
8
 
9
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -25,7 +25,7 @@ function wcps_layout_element_post_title($args){
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>';
@@ -62,7 +62,7 @@ function wcps_layout_element_title_text($post_title, $args){
62
 
63
 
64
 
65
- add_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail');
66
  function wcps_layout_element_thumbnail($args){
67
 
68
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -106,7 +106,7 @@ function wcps_layout_element_thumbnail($args){
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>';
@@ -143,7 +143,7 @@ function wcps_layout_element_thumbnail_url($permalink, $args){
143
 
144
 
145
 
146
- add_action('wcps_layout_element_content', 'wcps_layout_element_content');
147
  function wcps_layout_element_content($args){
148
 
149
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -163,21 +163,28 @@ function wcps_layout_element_content($args){
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
 
168
  $content_html = '';
169
 
170
  if($content_source=='content'){
 
171
  $content_html.= do_shortcode($content);
172
  }elseif($content_source=='excerpt'){
 
173
 
174
  $content_html.= wp_trim_words( $content , $word_count, ' <a class="read-more" href="'. $product_url .'">'.$read_more_text.'</a>' );
 
175
  }elseif($content_source=='short_description'){
176
 
177
  $post_excerpt = isset($post_data->post_excerpt) ? $post_data->post_excerpt : '';
178
 
179
- $content_html.= wp_trim_words( $post_excerpt , $word_count, ' <a class="read-more" href="'. $product_url .'">'.$read_more_text.'</a>' );
 
 
 
 
180
  }else{
 
181
  $content_html.= wp_trim_words( $content , $word_count, ' <a class="read-more" href="'. $product_url .'">'.$read_more_text.'</a>' );
182
  }
183
 
@@ -195,7 +202,7 @@ function wcps_layout_element_content($args){
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>';
@@ -238,7 +245,7 @@ function wcps_layout_element_content_link($permalink, $args){
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
 
244
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -298,7 +305,7 @@ function wcps_layout_element_product_category($args){
298
 
299
 
300
 
301
- add_action('wcps_layout_element_product_tag', 'wcps_layout_element_product_tag');
302
  function wcps_layout_element_product_tag($args){
303
 
304
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -357,7 +364,7 @@ function wcps_layout_element_product_tag($args){
357
  }
358
 
359
 
360
- add_action('wcps_layout_element_sale_count', 'wcps_layout_element_sale_count');
361
  function wcps_layout_element_sale_count($args){
362
 
363
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -384,7 +391,7 @@ function wcps_layout_element_sale_count($args){
384
 
385
 
386
 
387
- add_action('wcps_layout_element_add_to_cart', 'wcps_layout_element_add_to_cart');
388
  function wcps_layout_element_add_to_cart($args){
389
 
390
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -408,7 +415,7 @@ function wcps_layout_element_add_to_cart($args){
408
 
409
 
410
 
411
- add_action('wcps_layout_element_product_price', 'wcps_layout_element_product_price');
412
  function wcps_layout_element_product_price($args){
413
 
414
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -464,7 +471,7 @@ function wcps_layout_element_product_price($args){
464
 
465
 
466
 
467
- add_action('wcps_layout_element_on_sale_mark', 'wcps_layout_element_on_sale_mark');
468
  function wcps_layout_element_on_sale_mark($args){
469
 
470
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -495,7 +502,7 @@ function wcps_layout_element_on_sale_mark($args){
495
 
496
 
497
 
498
- add_action('wcps_layout_element_featured_mark', 'wcps_layout_element_featured_mark');
499
  function wcps_layout_element_featured_mark($args){
500
 
501
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -525,7 +532,7 @@ function wcps_layout_element_featured_mark($args){
525
 
526
 
527
 
528
- add_action('wcps_layout_element_product_id', 'wcps_layout_element_product_id');
529
  function wcps_layout_element_product_id($args){
530
 
531
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -543,7 +550,7 @@ function wcps_layout_element_product_id($args){
543
  }
544
 
545
 
546
- add_action('wcps_layout_element_rating', 'wcps_layout_element_rating');
547
  function wcps_layout_element_rating($args){
548
 
549
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -574,7 +581,7 @@ function wcps_layout_element_rating($args){
574
 
575
 
576
 
577
- add_action('wcps_layout_element_wrapper_start', 'wcps_layout_element_wrapper_start');
578
  function wcps_layout_element_wrapper_start($args){
579
 
580
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
@@ -594,7 +601,7 @@ function wcps_layout_element_wrapper_start($args){
594
  }
595
 
596
 
597
- add_action('wcps_layout_element_wrapper_end', 'wcps_layout_element_wrapper_end');
598
  function wcps_layout_element_wrapper_end($args){
599
 
600
 
@@ -608,7 +615,7 @@ function wcps_layout_element_wrapper_end($args){
608
 
609
 
610
 
611
- add_action('wcps_layout_element_css_post_title', 'wcps_layout_element_css_post_title');
612
  function wcps_layout_element_css_post_title($args){
613
 
614
 
@@ -655,7 +662,7 @@ function wcps_layout_element_css_post_title($args){
655
 
656
 
657
 
658
- add_action('wcps_layout_element_css_product_category', 'wcps_layout_element_css_product_category');
659
  function wcps_layout_element_css_product_category($args){
660
 
661
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -698,7 +705,7 @@ function wcps_layout_element_css_product_category($args){
698
 
699
 
700
 
701
- add_action('wcps_layout_element_css_product_tag', 'wcps_layout_element_css_product_tag');
702
  function wcps_layout_element_css_product_tag($args){
703
 
704
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -741,7 +748,7 @@ function wcps_layout_element_css_product_tag($args){
741
 
742
 
743
 
744
- add_action('wcps_layout_element_css_sale_count', 'wcps_layout_element_css_sale_count');
745
  function wcps_layout_element_css_sale_count($args){
746
 
747
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -768,7 +775,7 @@ function wcps_layout_element_css_sale_count($args){
768
  <?php
769
  }
770
 
771
- add_action('wcps_layout_element_css_on_sale_mark', 'wcps_layout_element_css_on_sale_mark');
772
  function wcps_layout_element_css_on_sale_mark($args){
773
 
774
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -804,7 +811,7 @@ function wcps_layout_element_css_on_sale_mark($args){
804
  <?php
805
  }
806
 
807
- add_action('wcps_layout_element_css_featured_mark', 'wcps_layout_element_css_featured_mark');
808
  function wcps_layout_element_css_featured_mark($args){
809
 
810
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -841,7 +848,7 @@ function wcps_layout_element_css_featured_mark($args){
841
 
842
 
843
 
844
- add_action('wcps_layout_element_css_product_id', 'wcps_layout_element_css_product_id');
845
  function wcps_layout_element_css_product_id($args){
846
 
847
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -881,7 +888,7 @@ function wcps_layout_element_css_product_id($args){
881
 
882
 
883
 
884
- add_action('wcps_layout_element_css_add_to_cart', 'wcps_layout_element_css_add_to_cart');
885
  function wcps_layout_element_css_add_to_cart($args){
886
 
887
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -932,7 +939,7 @@ function wcps_layout_element_css_add_to_cart($args){
932
 
933
 
934
 
935
- add_action('wcps_layout_element_css_rating', 'wcps_layout_element_css_rating');
936
  function wcps_layout_element_css_rating($args){
937
 
938
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -1007,7 +1014,7 @@ function wcps_layout_element_css_product_price($args){
1007
 
1008
 
1009
 
1010
- add_action('wcps_layout_element_css_content', 'wcps_layout_element_css_content');
1011
  function wcps_layout_element_css_content($args){
1012
 
1013
  //echo '<pre>'.var_export($args, true).'</pre>';
@@ -1056,7 +1063,7 @@ function wcps_layout_element_css_content($args){
1056
 
1057
 
1058
 
1059
- add_action('wcps_layout_element_css_thumbnail', 'wcps_layout_element_css_thumbnail');
1060
  function wcps_layout_element_css_thumbnail($args){
1061
 
1062
  //echo '<pre>'.var_export($args, true).'</pre>';
3
 
4
 
5
 
6
+ add_action('wcps_layout_element_post_title', 'wcps_layout_element_post_title', 10);
7
  function wcps_layout_element_post_title($args){
8
 
9
  //echo '<pre>'.var_export($args, true).'</pre>';
25
 
26
  }
27
 
28
+ add_filter('wcps_layout_element_title_text', 'wcps_layout_element_title_text', 10, 2);
29
  function wcps_layout_element_title_text($post_title, $args){
30
 
31
  //echo '<pre>'.var_export($args, true).'</pre>';
62
 
63
 
64
 
65
+ add_action('wcps_layout_element_thumbnail', 'wcps_layout_element_thumbnail', 10);
66
  function wcps_layout_element_thumbnail($args){
67
 
68
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
106
 
107
 
108
 
109
+ add_filter('wcps_layout_element_thumbnail_url', 'wcps_layout_element_thumbnail_url', 10, 2);
110
  function wcps_layout_element_thumbnail_url($permalink, $args){
111
 
112
  //echo '<pre>'.var_export($args, true).'</pre>';
143
 
144
 
145
 
146
+ add_action('wcps_layout_element_content', 'wcps_layout_element_content', 10);
147
  function wcps_layout_element_content($args){
148
 
149
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
163
  $product_url = get_permalink($product_id);
164
  $product_url = apply_filters('wcps_layout_element_content_link', $product_url, $args);
165
 
 
166
 
167
  $content_html = '';
168
 
169
  if($content_source=='content'){
170
+ $content = isset($post_data->post_content) ? $post_data->post_content : '';
171
  $content_html.= do_shortcode($content);
172
  }elseif($content_source=='excerpt'){
173
+ $content = isset($post_data->post_content) ? $post_data->post_content : '';
174
 
175
  $content_html.= wp_trim_words( $content , $word_count, ' <a class="read-more" href="'. $product_url .'">'.$read_more_text.'</a>' );
176
+
177
  }elseif($content_source=='short_description'){
178
 
179
  $post_excerpt = isset($post_data->post_excerpt) ? $post_data->post_excerpt : '';
180
 
181
+ if(!empty($word_count) && $word_count > 0){
182
+ $content_html.= wp_trim_words( $post_excerpt , $word_count, ' <a class="read-more" href="'. $product_url .'">'.$read_more_text.'</a>' );
183
+ }else{
184
+ $content_html.= $post_excerpt;
185
+ }
186
  }else{
187
+ $content = isset($post_data->post_content) ? $post_data->post_content : '';
188
  $content_html.= wp_trim_words( $content , $word_count, ' <a class="read-more" href="'. $product_url .'">'.$read_more_text.'</a>' );
189
  }
190
 
202
 
203
 
204
 
205
+ add_filter('wcps_layout_element_content_link', 'wcps_layout_element_content_link', 10, 2);
206
  function wcps_layout_element_content_link($permalink, $args){
207
 
208
  //echo '<pre>'.var_export($args, true).'</pre>';
245
 
246
 
247
 
248
+ add_action('wcps_layout_element_product_category', 'wcps_layout_element_product_category', 10);
249
  function wcps_layout_element_product_category($args){
250
 
251
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
305
 
306
 
307
 
308
+ add_action('wcps_layout_element_product_tag', 'wcps_layout_element_product_tag', 10);
309
  function wcps_layout_element_product_tag($args){
310
 
311
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
364
  }
365
 
366
 
367
+ add_action('wcps_layout_element_sale_count', 'wcps_layout_element_sale_count', 10);
368
  function wcps_layout_element_sale_count($args){
369
 
370
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
391
 
392
 
393
 
394
+ add_action('wcps_layout_element_add_to_cart', 'wcps_layout_element_add_to_cart', 10);
395
  function wcps_layout_element_add_to_cart($args){
396
 
397
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
415
 
416
 
417
 
418
+ add_action('wcps_layout_element_product_price', 'wcps_layout_element_product_price', 10);
419
  function wcps_layout_element_product_price($args){
420
 
421
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
471
 
472
 
473
 
474
+ add_action('wcps_layout_element_on_sale_mark', 'wcps_layout_element_on_sale_mark', 10);
475
  function wcps_layout_element_on_sale_mark($args){
476
 
477
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
502
 
503
 
504
 
505
+ add_action('wcps_layout_element_featured_mark', 'wcps_layout_element_featured_mark', 10);
506
  function wcps_layout_element_featured_mark($args){
507
 
508
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
532
 
533
 
534
 
535
+ add_action('wcps_layout_element_product_id', 'wcps_layout_element_product_id', 10);
536
  function wcps_layout_element_product_id($args){
537
 
538
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
550
  }
551
 
552
 
553
+ add_action('wcps_layout_element_rating', 'wcps_layout_element_rating', 10);
554
  function wcps_layout_element_rating($args){
555
 
556
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
581
 
582
 
583
 
584
+ add_action('wcps_layout_element_wrapper_start', 'wcps_layout_element_wrapper_start', 10);
585
  function wcps_layout_element_wrapper_start($args){
586
 
587
  $element_index = isset($args['element_index']) ? $args['element_index'] : '';
601
  }
602
 
603
 
604
+ add_action('wcps_layout_element_wrapper_end', 'wcps_layout_element_wrapper_end', 10);
605
  function wcps_layout_element_wrapper_end($args){
606
 
607
 
615
 
616
 
617
 
618
+ add_action('wcps_layout_element_css_post_title', 'wcps_layout_element_css_post_title', 10);
619
  function wcps_layout_element_css_post_title($args){
620
 
621
 
662
 
663
 
664
 
665
+ add_action('wcps_layout_element_css_product_category', 'wcps_layout_element_css_product_category', 10);
666
  function wcps_layout_element_css_product_category($args){
667
 
668
  //echo '<pre>'.var_export($args, true).'</pre>';
705
 
706
 
707
 
708
+ add_action('wcps_layout_element_css_product_tag', 'wcps_layout_element_css_product_tag', 10);
709
  function wcps_layout_element_css_product_tag($args){
710
 
711
  //echo '<pre>'.var_export($args, true).'</pre>';
748
 
749
 
750
 
751
+ add_action('wcps_layout_element_css_sale_count', 'wcps_layout_element_css_sale_count', 10);
752
  function wcps_layout_element_css_sale_count($args){
753
 
754
  //echo '<pre>'.var_export($args, true).'</pre>';
775
  <?php
776
  }
777
 
778
+ add_action('wcps_layout_element_css_on_sale_mark', 'wcps_layout_element_css_on_sale_mark', 10);
779
  function wcps_layout_element_css_on_sale_mark($args){
780
 
781
  //echo '<pre>'.var_export($args, true).'</pre>';
811
  <?php
812
  }
813
 
814
+ add_action('wcps_layout_element_css_featured_mark', 'wcps_layout_element_css_featured_mark', 10);
815
  function wcps_layout_element_css_featured_mark($args){
816
 
817
  //echo '<pre>'.var_export($args, true).'</pre>';
848
 
849
 
850
 
851
+ add_action('wcps_layout_element_css_product_id', 'wcps_layout_element_css_product_id', 10);
852
  function wcps_layout_element_css_product_id($args){
853
 
854
  //echo '<pre>'.var_export($args, true).'</pre>';
888
 
889
 
890
 
891
+ add_action('wcps_layout_element_css_add_to_cart', 'wcps_layout_element_css_add_to_cart', 10);
892
  function wcps_layout_element_css_add_to_cart($args){
893
 
894
  //echo '<pre>'.var_export($args, true).'</pre>';
939
 
940
 
941
 
942
+ add_action('wcps_layout_element_css_rating', 'wcps_layout_element_css_rating', 10);
943
  function wcps_layout_element_css_rating($args){
944
 
945
  //echo '<pre>'.var_export($args, true).'</pre>';
1014
 
1015
 
1016
 
1017
+ add_action('wcps_layout_element_css_content', 'wcps_layout_element_css_content', 10);
1018
  function wcps_layout_element_css_content($args){
1019
 
1020
  //echo '<pre>'.var_export($args, true).'</pre>';
1063
 
1064
 
1065
 
1066
+ add_action('wcps_layout_element_css_thumbnail', 'wcps_layout_element_css_thumbnail', 10);
1067
  function wcps_layout_element_css_thumbnail($args){
1068
 
1069
  //echo '<pre>'.var_export($args, true).'</pre>';
includes/functions.php CHANGED
@@ -3,7 +3,6 @@ if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
 
5
 
6
-
7
  add_filter('the_content','wcps_preview_content');
8
 
9
  function wcps_preview_content($content){
3
 
4
 
5
 
 
6
  add_filter('the_content','wcps_preview_content');
7
 
8
  function wcps_preview_content($content){
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.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -141,6 +141,11 @@ then paste this shortcode anywhere in your page to display slider<br />
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.
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
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
141
 
142
  == Changelog ==
143
 
144
+
145
+ = 1.13.8 =
146
+ * 2020-03-31 fix - product short description remove html issue fixed.
147
+ * 2020-03-31 fix - Custom CSS issue fixed.
148
+
149
  = 1.13.7 =
150
  * 2020-03-28 fix - Product title link issue fixed.
151
  * 2020-03-28 fix - Product thumbnail link issue fixed.
templates/wcps-slider/wcps-slider-hook.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
- add_action('wcps_slider_main', 'wcps_slider_main_ribbon');
5
  function wcps_slider_main_ribbon($args){
6
  $wcps_id = isset($args['wcps_id']) ? (int) $args['wcps_id'] : 0;
7
  $wcps_options = get_post_meta( $wcps_id, 'wcps_options', true );
@@ -60,7 +60,7 @@ function wcps_slider_main_ribbon($args){
60
 
61
 
62
 
63
- add_action('wcps_slider_main', 'wcps_slider_main_items');
64
 
65
  function wcps_slider_main_items($args){
66
 
@@ -240,14 +240,17 @@ function wcps_slider_main_items($args){
240
  <div id="wcps-<?php echo $wcps_id; ?>" class="<?php echo $wcps_items_class; ?>">
241
  <?php
242
 
 
243
  while ( $wcps_query->have_posts() ) : $wcps_query->the_post();
244
 
245
  $product_id = get_the_id();
246
  $args['product_id'] = $product_id;
 
247
 
248
  //echo '<pre>'.var_export($product_id, true).'</pre>';
249
  do_action('wcps_slider_item', $args);
250
 
 
251
  endwhile;
252
 
253
  wp_reset_query();
@@ -274,7 +277,7 @@ function wcps_slider_main_items($args){
274
 
275
 
276
 
277
- add_action('wcps_slider_item', 'wcps_slider_item');
278
 
279
  function wcps_slider_item($args){
280
 
@@ -321,7 +324,7 @@ function wcps_slider_item($args){
321
 
322
 
323
 
324
- add_filter('wcps_slider_main', 'wcps_slider_main_scripts');
325
 
326
  function wcps_slider_main_scripts( $args){
327
 
@@ -668,10 +671,14 @@ function wcps_slider_main_scripts( $args){
668
  width: 45px;
669
  }
670
  <?php
 
 
 
 
671
  $custom_scripts = get_post_meta($item_layout_id,'custom_scripts', true);
672
- $custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
673
 
674
- echo str_replace('__ID__', 'layout-'.$item_layout_id, $custom_css);
675
 
676
  ?>
677
  </style>
@@ -691,7 +698,7 @@ function wcps_slider_main_scripts( $args){
691
 
692
 
693
 
694
- add_filter('wcps_slider_main', 'wcps_slider_main_enqueue_scripts');
695
 
696
  function wcps_slider_main_enqueue_scripts( $args){
697
 
1
  <?php
2
  if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
+ add_action('wcps_slider_main', 'wcps_slider_main_ribbon', 10);
5
  function wcps_slider_main_ribbon($args){
6
  $wcps_id = isset($args['wcps_id']) ? (int) $args['wcps_id'] : 0;
7
  $wcps_options = get_post_meta( $wcps_id, 'wcps_options', true );
60
 
61
 
62
 
63
+ add_action('wcps_slider_main', 'wcps_slider_main_items', 20);
64
 
65
  function wcps_slider_main_items($args){
66
 
240
  <div id="wcps-<?php echo $wcps_id; ?>" class="<?php echo $wcps_items_class; ?>">
241
  <?php
242
 
243
+ $loop_count = 1;
244
  while ( $wcps_query->have_posts() ) : $wcps_query->the_post();
245
 
246
  $product_id = get_the_id();
247
  $args['product_id'] = $product_id;
248
+ $args['loop_count'] = $loop_count;
249
 
250
  //echo '<pre>'.var_export($product_id, true).'</pre>';
251
  do_action('wcps_slider_item', $args);
252
 
253
+ $loop_count++;
254
  endwhile;
255
 
256
  wp_reset_query();
277
 
278
 
279
 
280
+ add_action('wcps_slider_item', 'wcps_slider_item', 10);
281
 
282
  function wcps_slider_item($args){
283
 
324
 
325
 
326
 
327
+ add_filter('wcps_slider_main', 'wcps_slider_main_scripts', 90);
328
 
329
  function wcps_slider_main_scripts( $args){
330
 
671
  width: 45px;
672
  }
673
  <?php
674
+
675
+ $custom_css = isset($wcps_options['custom_css']) ? $wcps_options['custom_css'] : '';
676
+ echo str_replace('__ID__', $wcps_id, $custom_css);
677
+
678
  $custom_scripts = get_post_meta($item_layout_id,'custom_scripts', true);
679
+ $layout_custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
680
 
681
+ echo str_replace('__ID__', 'layout-'.$item_layout_id, $layout_custom_css);
682
 
683
  ?>
684
  </style>
698
 
699
 
700
 
701
+ add_filter('wcps_slider_main', 'wcps_slider_main_enqueue_scripts', 99);
702
 
703
  function wcps_slider_main_enqueue_scripts( $args){
704
 
woocommerce-products-slider.php CHANGED
@@ -3,9 +3,9 @@
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
10
  Text Domain: woocommerce-products-slider
11
  Author URI: http://pickplugins.com
@@ -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.7' );
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.8
7
  WC requires at least: 3.0.0
8
+ WC tested up to: 4.0
9
  Author: PickPlugins
10
  Text Domain: woocommerce-products-slider
11
  Author URI: http://pickplugins.com
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.8' );
27
 
28
  require_once( wcps_plugin_dir . 'includes/class-post-types.php');
29
  require_once( wcps_plugin_dir . 'includes/class-metabox-wcps.php');