Woocommerce Products Slider - Version 1.5

Version Description

  • 09/05/2015 add - added ribbons.
Download this release

Release Info

Developer paratheme
Plugin Icon 128x128 Woocommerce Products Slider
Version 1.5
Comparing to
See all releases

Code changes from version 1.4 to 1.5

includes/wcps-meta.php CHANGED
@@ -103,7 +103,7 @@ function meta_boxes_wcps_input( $post ) {
103
  $wcps_items_empty_thumb = get_post_meta( $post->ID, 'wcps_items_empty_thumb', true );
104
 
105
 
106
-
107
 
108
 
109
 
@@ -294,7 +294,56 @@ function meta_boxes_wcps_input( $post ) {
294
 
295
  </select>
296
  </div>
297
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
 
299
  <div class="option-box">
300
  <p class="option-title">Slider Thumbnail Size</p>
@@ -701,7 +750,7 @@ function meta_boxes_wcps_save( $post_id ) {
701
  $wcps_items_thumb_max_hieght = sanitize_text_field( $_POST['wcps_items_thumb_max_hieght'] );
702
 
703
  $wcps_items_empty_thumb = sanitize_text_field( $_POST['wcps_items_empty_thumb'] );
704
-
705
 
706
 
707
  // Update the meta field in the database.
@@ -741,7 +790,7 @@ function meta_boxes_wcps_save( $post_id ) {
741
 
742
  update_post_meta( $post_id, 'wcps_items_empty_thumb', $wcps_items_empty_thumb );
743
 
744
-
745
 
746
  }
747
  add_action( 'save_post', 'meta_boxes_wcps_save' );
103
  $wcps_items_empty_thumb = get_post_meta( $post->ID, 'wcps_items_empty_thumb', true );
104
 
105
 
106
+ $wcps_ribbon_name = get_post_meta( $post->ID, 'wcps_ribbon_name', true );
107
 
108
 
109
 
294
 
295
  </select>
296
  </div>
297
+
298
+
299
+ <div class="option-box">
300
+ <p class="option-title">Slider Ribbon</p>
301
+ <p class="option-info"></p>
302
+ <?php
303
+
304
+ echo '<select name="wcps_ribbon_name" >';
305
+
306
+ if(empty($wcps_ribbon_name))
307
+ {
308
+ $wcps_ribbon_name = "";
309
+ }
310
+ echo '<option value="none" '.(($wcps_ribbon_name=="none" ) ? "selected" : "").' >None</option>';
311
+ echo '<option value="free" '.(($wcps_ribbon_name=="free" ) ? "selected" : "").' >Free</option>';
312
+ echo '<option value="save" '.(($wcps_ribbon_name=="save" ) ? "selected" : "").' >Save</option>';
313
+ echo '<option value="hot" '.(($wcps_ribbon_name=="hot" ) ? "selected" : "").' >Hot</option>';
314
+ echo '<option value="pro" '.(($wcps_ribbon_name=="pro" ) ? "selected" : "").' >Pro</option>';
315
+ echo '<option value="best" '.(($wcps_ribbon_name=="best" ) ? "selected" : "").' >Best</option>';
316
+ echo '<option value="gift" '.(($wcps_ribbon_name=="gift" ) ? "selected" : "").' >Gift</option>';
317
+ echo '<option value="sale" '.(($wcps_ribbon_name=="sale" ) ? "selected" : "").' >Sale</option>';
318
+ echo '<option value="new" '.(($wcps_ribbon_name=="new" ) ? "selected" : "").' >New</option>';
319
+ echo '<option value="top" '.(($wcps_ribbon_name=="top" ) ? "selected" : "").' >Top</option>';
320
+ echo '<option value="fresh" '.(($wcps_ribbon_name=="fresh" ) ? "selected" : "").' >Fresh</option>';
321
+
322
+ echo '<option value="dis-10" '.(($wcps_ribbon_name=="dis-10" ) ? "selected" : "").' >-10%</option>';
323
+ echo '<option value="dis-20" '.(($wcps_ribbon_name=="dis-20" ) ? "selected" : "").' >-20%</option>';
324
+ echo '<option value="dis-30" '.(($wcps_ribbon_name=="dis-30" ) ? "selected" : "").' >-30%</option>';
325
+ echo '<option value="dis-40" '.(($wcps_ribbon_name=="dis-40" ) ? "selected" : "").' >-40%</option>';
326
+
327
+ echo '<option value="dis-50" '.(($wcps_ribbon_name=="dis-50" ) ? "selected" : "").' >-50%</option>';
328
+
329
+ echo '<option value="dis-60" '.(($wcps_ribbon_name=="dis-60" ) ? "selected" : "").' >-60%</option>';
330
+
331
+ echo '<option value="dis-70" '.(($wcps_ribbon_name=="dis-70" ) ? "selected" : "").' >-70%</option>';
332
+
333
+ echo '<option value="dis-80" '.(($wcps_ribbon_name=="dis-80" ) ? "selected" : "").' >-80%</option>';
334
+
335
+ echo '<option value="dis-90" '.(($wcps_ribbon_name=="dis-90" ) ? "selected" : "").' >-90%</option>';
336
+
337
+ echo '<option value="dis-100" '.(($wcps_ribbon_name=="dis-100" ) ? "selected" : "").' >-100%</option>';
338
+
339
+
340
+ echo '</select><br />';
341
+
342
+
343
+
344
+ ?>
345
+ </div>
346
+
347
 
348
  <div class="option-box">
349
  <p class="option-title">Slider Thumbnail Size</p>
750
  $wcps_items_thumb_max_hieght = sanitize_text_field( $_POST['wcps_items_thumb_max_hieght'] );
751
 
752
  $wcps_items_empty_thumb = sanitize_text_field( $_POST['wcps_items_empty_thumb'] );
753
+ $wcps_ribbon_name = sanitize_text_field( $_POST['wcps_ribbon_name'] );
754
 
755
 
756
  // Update the meta field in the database.
790
 
791
  update_post_meta( $post_id, 'wcps_items_empty_thumb', $wcps_items_empty_thumb );
792
 
793
+ update_post_meta( $post_id, 'wcps_ribbon_name', $wcps_ribbon_name );
794
 
795
  }
796
  add_action( 'save_post', 'meta_boxes_wcps_save' );
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Woocommerce Products Slider ===
2
  Contributors: paratheme
3
  Donate link: http://paratheme.com
4
- Tags: carousel, product, slider, woocommerce, carousel slider, product slider, woocommerce slider, Woocommerce Product slider, featured product slider, sale product slider, best sale product slider, top product slider
5
  Requires at least: 3.8
6
- Tested up to: 4.2
7
- Stable tag: 1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -92,7 +92,9 @@ then paste this shortcode anywhere in your page to display slider<br />
92
 
93
  == Changelog ==
94
 
95
-
 
 
96
  = 1.4 =
97
  * 23/02/2015 fix - Fixed issue with infinite loop.
98
 
1
  === Woocommerce Products Slider ===
2
  Contributors: paratheme
3
  Donate link: http://paratheme.com
4
+ Tags: product slider,carousel, product, slider, woocommerce, carousel slider, woocommerce slider, Woocommerce Product slider, featured product slider, sale product slider
5
  Requires at least: 3.8
6
+ Tested up to: 4.2.2
7
+ Stable tag: 1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
92
 
93
  == Changelog ==
94
 
95
+ = 1.5 =
96
+ * 09/05/2015 add - added ribbons.
97
+
98
  = 1.4 =
99
  * 23/02/2015 fix - Fixed issue with infinite loop.
100
 
themes/flat/index.php CHANGED
@@ -3,7 +3,7 @@
3
  function wcps_body_flat($post_id)
4
  {
5
 
6
- $wcps_ribbons = array('none'=>'none');
7
 
8
 
9
  $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
@@ -44,9 +44,9 @@ function wcps_body_flat($post_id)
44
 
45
  $wcps_items_empty_thumb = get_post_meta( $post_id, 'wcps_items_empty_thumb', true );
46
 
47
- $wcps_ribbon_name = 'none';
48
-
49
 
 
50
 
51
 
52
  $wcps_body = '';
3
  function wcps_body_flat($post_id)
4
  {
5
 
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
 
8
 
9
  $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
44
 
45
  $wcps_items_empty_thumb = get_post_meta( $post_id, 'wcps_items_empty_thumb', true );
46
 
47
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
 
48
 
49
+
50
 
51
 
52
  $wcps_body = '';
themes/rossi/index.php CHANGED
@@ -3,7 +3,7 @@
3
  function wcps_body_rossi($post_id)
4
  {
5
 
6
- $wcps_ribbons = array('none'=>'none');
7
 
8
 
9
  $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
@@ -43,7 +43,7 @@ function wcps_body_rossi($post_id)
43
 
44
  $wcps_items_empty_thumb = get_post_meta( $post_id, 'wcps_items_empty_thumb', true );
45
 
46
- $wcps_ribbon_name = 'none';
47
 
48
 
49
 
3
  function wcps_body_rossi($post_id)
4
  {
5
 
6
+ $wcps_ribbons = get_option( 'wcps_ribbons' );
7
 
8
 
9
  $wcps_bg_img = get_post_meta( $post_id, 'wcps_bg_img', true );
43
 
44
  $wcps_items_empty_thumb = get_post_meta( $post_id, 'wcps_items_empty_thumb', true );
45
 
46
+ $wcps_ribbon_name = get_post_meta( $post_id, 'wcps_ribbon_name', true );
47
 
48
 
49
 
wcps-settings.php CHANGED
@@ -71,9 +71,7 @@
71
 
72
 
73
  $wcps_ribbons_des = array(
74
-
75
-
76
-
77
  'dis-10'=>'Discount 10%',
78
  'dis-20'=>'Discount 20%',
79
  'dis-30'=>'Discount 30%',
@@ -94,12 +92,7 @@
94
  'sale'=>'Sale',
95
  'pro'=>'Pro',
96
  'best'=>'Best',
97
-
98
-
99
-
100
-
101
-
102
-
103
 
104
  );
105
 
71
 
72
 
73
  $wcps_ribbons_des = array(
74
+
 
 
75
  'dis-10'=>'Discount 10%',
76
  'dis-20'=>'Discount 20%',
77
  'dis-30'=>'Discount 30%',
92
  'sale'=>'Sale',
93
  'pro'=>'Pro',
94
  'best'=>'Best',
95
+
 
 
 
 
 
96
 
97
  );
98
 
woocommerce-products-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Woocommerce Products Slider
4
  Plugin URI: http://paratheme.com/items/woocommerce-product-slider-for-wordpress/
5
  Description: Fully responsive and mobile ready Carousel Slider for your woo-commerce product. unlimited slider anywhere via short-codes and easy admin setting.
6
- Version: 1.4
7
  Author: paratheme
8
  Author URI: http://paratheme.com
9
  License: GPLv2 or later
@@ -72,7 +72,7 @@ register_activation_hook(__FILE__, 'wcps_activation');
72
 
73
  function wcps_activation()
74
  {
75
- $wcps_version= "1.4";
76
  update_option('wcps_version', $wcps_version); //update plugin version.
77
 
78
  $wcps_customer_type= "free"; //customer_type "free"
3
  Plugin Name: Woocommerce Products Slider
4
  Plugin URI: http://paratheme.com/items/woocommerce-product-slider-for-wordpress/
5
  Description: Fully responsive and mobile ready Carousel Slider for your woo-commerce product. unlimited slider anywhere via short-codes and easy admin setting.
6
+ Version: 1.5
7
  Author: paratheme
8
  Author URI: http://paratheme.com
9
  License: GPLv2 or later
72
 
73
  function wcps_activation()
74
  {
75
+ $wcps_version= "1.5";
76
  update_option('wcps_version', $wcps_version); //update plugin version.
77
 
78
  $wcps_customer_type= "free"; //customer_type "free"