Responsive Pricing Table - Version 3.4.0

Version Description

  • SAFE UPDATE: No data loss for those upgrading from version 3.0 or higher
  • Possible to hide the currency symbol
  • Allow pricing tables with no button
  • Allow special characters in the button link (third party sites/payments)
  • Allow
    tags in the features (adjust line breaks to your liking)
  • Allow
    tags in the description
  • Allow
    tags in the subtitle
Download this release

Release Info

Developer spwebguy
Plugin Icon 128x128 Responsive Pricing Table
Version 3.4.0
Comparing to
See all releases

Code changes from version 3.3.0 to 3.4.0

Files changed (2) hide show
  1. readme.txt +9 -0
  2. rpt.php +20 -9
readme.txt CHANGED
@@ -72,6 +72,15 @@ The free version of the Responsive Pricing Table plugin is **not limited** and d
72
 
73
 
74
  == Changelog ==
 
 
 
 
 
 
 
 
 
75
  = 3.3.0 =
76
  * SAFE UPDATE: No data loss for those upgrading from version 3.0 or higher
77
  * Added a new font-size preset for the price element
72
 
73
 
74
  == Changelog ==
75
+ = 3.4.0 =
76
+ * SAFE UPDATE: No data loss for those upgrading from version 3.0 or higher
77
+ * Possible to hide the currency symbol
78
+ * Allow pricing tables with no button
79
+ * Allow special characters in the button link (third party sites/payments)
80
+ * Allow <br> tags in the features (adjust line breaks to your liking)
81
+ * Allow <br> tags in the description
82
+ * Allow <br> tags in the subtitle
83
+
84
  = 3.3.0 =
85
  * SAFE UPDATE: No data loss for those upgrading from version 3.0 or higher
86
  * Added a new font-size preset for the price element
rpt.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Responsive Pricing Table
4
  * Plugin URI: http://wpdarko.com/responsive-pricing-table/
5
  * Description: A responsive, easy and elegant way to present your offer to your visitors. Just create a new pricing table (custom type) and copy-paste the shortcode into your posts/pages. Find support and information on the <a href="http://wpdarko.com/responsive-pricing-table/">plugin's page</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='http://wpdarko.com/responsive-pricing-table-pro/'>PRO version</a> for more great features.
6
- * Version: 3.3.0
7
  * Author: WP Darko
8
  * Author URI: http://wpdarko.com
9
  * License: GPL2
@@ -105,11 +105,13 @@ function rpt_metaboxes( array $meta_boxes ) {
105
  'name' => 'Subtitle',
106
  'id' => $prefix . 'subtitle',
107
  'type' => 'text',
 
108
  ),
109
  array(
110
  'name' => 'Description',
111
  'id' => $prefix . 'description',
112
  'type' => 'text',
 
113
  ),
114
  array(
115
  'name' => 'Price',
@@ -127,6 +129,7 @@ function rpt_metaboxes( array $meta_boxes ) {
127
  'name' => 'Recurrence',
128
  'id' => $prefix . 'recurrence',
129
  'type' => 'text',
 
130
  'attributes' => array(
131
  'placeholder' => 'eg. per month, one time fee',
132
  ),
@@ -170,6 +173,7 @@ function rpt_metaboxes( array $meta_boxes ) {
170
  'name' => 'Button link',
171
  'id' => $prefix . 'btn_link',
172
  'type' => 'text',
 
173
  'attributes' => array(
174
  'placeholder' => 'eg. http://anything.com',
175
  ),
@@ -231,7 +235,6 @@ function rpt_metaboxes( array $meta_boxes ) {
231
  'name' => 'Change currency',
232
  'id' => $prefix . 'currency',
233
  'type' => 'text',
234
- 'default' => '$',
235
  ),
236
  array(
237
  'name' => 'Links behavior',
@@ -489,7 +492,7 @@ function rpt_sc($atts) {
489
  if ($plans['_rpt_free'] == true ){
490
  $output .= __( 'Free' );
491
  } else {
492
- $output .= '<span class="rpt_currency">$</span>' . $plans['_rpt_price'];
493
  }
494
  } else {
495
 
@@ -524,7 +527,11 @@ function rpt_sc($atts) {
524
 
525
  if (!empty($plans['_rpt_features'])){
526
 
527
- $output .= '<div class="rpt_features rpt_features_' . $key . '">';
 
 
 
 
528
 
529
  $string = $plans['_rpt_features'];
530
  $stringAr = explode("\n", $string);
@@ -533,7 +540,7 @@ function rpt_sc($atts) {
533
  $features = '';
534
 
535
  foreach ($stringAr as $feature) {
536
- $features[] .= strip_tags($feature,'<strong></strong>');
537
  }
538
 
539
  foreach ($features as $small_key => $feature){
@@ -561,10 +568,10 @@ function rpt_sc($atts) {
561
  $btn_text = $plans['_rpt_btn_text'];
562
  if (!empty($plans['_rpt_btn_link'])){
563
  $btn_link = $plans['_rpt_btn_link'];
564
- } else { $btn_link = 'http://#'; }
565
  } else {
566
- $btn_text = 'Sign up';
567
- $btn_link = 'http://#';
568
  }
569
 
570
  //link option
@@ -576,7 +583,11 @@ function rpt_sc($atts) {
576
  }
577
 
578
  //foot
579
- $output .= '<a '. $link_behavior .' href="' . $btn_link . '" style="background:' . $plans['_rpt_color'] . '" class="rpt_foot rpt_foot_' . $key . '">';
 
 
 
 
580
 
581
  //closing foot
582
  $output .= $btn_text;
3
  * Plugin Name: Responsive Pricing Table
4
  * Plugin URI: http://wpdarko.com/responsive-pricing-table/
5
  * Description: A responsive, easy and elegant way to present your offer to your visitors. Just create a new pricing table (custom type) and copy-paste the shortcode into your posts/pages. Find support and information on the <a href="http://wpdarko.com/responsive-pricing-table/">plugin's page</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='http://wpdarko.com/responsive-pricing-table-pro/'>PRO version</a> for more great features.
6
+ * Version: 3.4.0
7
  * Author: WP Darko
8
  * Author URI: http://wpdarko.com
9
  * License: GPL2
105
  'name' => 'Subtitle',
106
  'id' => $prefix . 'subtitle',
107
  'type' => 'text',
108
+ 'sanitization_cb' => false,
109
  ),
110
  array(
111
  'name' => 'Description',
112
  'id' => $prefix . 'description',
113
  'type' => 'text',
114
+ 'sanitization_cb' => false,
115
  ),
116
  array(
117
  'name' => 'Price',
129
  'name' => 'Recurrence',
130
  'id' => $prefix . 'recurrence',
131
  'type' => 'text',
132
+ 'sanitization_cb' => false,
133
  'attributes' => array(
134
  'placeholder' => 'eg. per month, one time fee',
135
  ),
173
  'name' => 'Button link',
174
  'id' => $prefix . 'btn_link',
175
  'type' => 'text',
176
+ 'sanitization_cb' => false,
177
  'attributes' => array(
178
  'placeholder' => 'eg. http://anything.com',
179
  ),
235
  'name' => 'Change currency',
236
  'id' => $prefix . 'currency',
237
  'type' => 'text',
 
238
  ),
239
  array(
240
  'name' => 'Links behavior',
492
  if ($plans['_rpt_free'] == true ){
493
  $output .= __( 'Free' );
494
  } else {
495
+ $output .= '<span class="rpt_currency"></span>' . $plans['_rpt_price'];
496
  }
497
  } else {
498
 
527
 
528
  if (!empty($plans['_rpt_features'])){
529
 
530
+ if (!empty($plans['_rpt_btn_text'])){
531
+ $output .= '<div class="rpt_features rpt_features_' . $key . '">';
532
+ } else {
533
+ $output .= '<div style="border-radius:8px;" class="rpt_features rpt_features_' . $key . '">';
534
+ }
535
 
536
  $string = $plans['_rpt_features'];
537
  $stringAr = explode("\n", $string);
540
  $features = '';
541
 
542
  foreach ($stringAr as $feature) {
543
+ $features[] .= strip_tags($feature,'<strong></strong><br><br/></br>');
544
  }
545
 
546
  foreach ($features as $small_key => $feature){
568
  $btn_text = $plans['_rpt_btn_text'];
569
  if (!empty($plans['_rpt_btn_link'])){
570
  $btn_link = $plans['_rpt_btn_link'];
571
+ } else { $btn_link = '#'; }
572
  } else {
573
+ $btn_text = '';
574
+ $btn_link = '#';
575
  }
576
 
577
  //link option
583
  }
584
 
585
  //foot
586
+ if (!empty($plans['_rpt_btn_text'])){
587
+ $output .= '<a '. $link_behavior .' href="' . $btn_link . '" style="background:' . $plans['_rpt_color'] . '" class="rpt_foot rpt_foot_' . $key . '">';
588
+ } else {
589
+ $output .= '<a '. $link_behavior .' style="background:' . $plans['_rpt_color'] . '" class="rpt_foot rpt_foot_' . $key . '">';
590
+ }
591
 
592
  //closing foot
593
  $output .= $btn_text;