Shortcodes by Angie Makes - Version 3.14

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Shortcodes by Angie Makes
Version 3.14
Comparing to
See all releases

Code changes from version 3.13 to 3.14

README.md CHANGED
@@ -106,6 +106,10 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
106
 
107
  ## Changelog ##
108
 
 
 
 
 
109
  ### Version 3.13 ###
110
 
111
  * Fixed bug with button attribute.
106
 
107
  ## Changelog ##
108
 
109
+ ### Version 3.14 ###
110
+
111
+ * Fixed bug with pricing shortcode color options.
112
+
113
  ### Version 3.13 ###
114
 
115
  * Fixed bug with button attribute.
public/class-sanitize.php CHANGED
@@ -247,6 +247,15 @@ class WPC_Shortcodes_Sanitize {
247
  return $default;
248
  }
249
 
 
 
 
 
 
 
 
 
 
250
  public static function color_type( $value, $default = 'primary' ) {
251
  $whitelist = WPC_Shortcodes_Widget_Options::color_types();
252
 
@@ -617,7 +626,7 @@ class WPC_Shortcodes_Sanitize {
617
  foreach ( $atts as $key => $value ) {
618
  switch( $key ) {
619
  case 'type' :
620
- $atts[ $key ] = self::color_type( $value );
621
  break;
622
  case 'plan' :
623
  $atts[ $key ] = sanitize_text_field( $value );
247
  return $default;
248
  }
249
 
250
+ public static function pricing_color_type( $value, $default = 'primary' ) {
251
+ $whitelist = WPC_Shortcodes_Widget_Options::pricing_color_types();
252
+
253
+ if ( array_key_exists( $value, $whitelist ) )
254
+ return $value;
255
+
256
+ return $default;
257
+ }
258
+
259
  public static function color_type( $value, $default = 'primary' ) {
260
  $whitelist = WPC_Shortcodes_Widget_Options::color_types();
261
 
626
  foreach ( $atts as $key => $value ) {
627
  switch( $key ) {
628
  case 'type' :
629
+ $atts[ $key ] = self::pricing_color_type( $value );
630
  break;
631
  case 'plan' :
632
  $atts[ $key ] = sanitize_text_field( $value );
public/class-vars.php CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
8
  *
9
  * @var string
10
  */
11
- const VERSION = '3.13';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
8
  *
9
  * @var string
10
  */
11
+ const VERSION = '3.14';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
public/class-widget-options.php CHANGED
@@ -164,6 +164,14 @@ class WPC_Shortcodes_Widget_Options {
164
  );
165
  }
166
 
 
 
 
 
 
 
 
 
167
  public static function color_types() {
168
  return array(
169
  'primary' => 'Primary',
164
  );
165
  }
166
 
167
+ public static function pricing_color_types() {
168
+ return array(
169
+ 'primary' => 'Primary',
170
+ 'secondary' => 'Secondary',
171
+ 'inverse' => 'Inverse',
172
+ );
173
+ }
174
+
175
  public static function color_types() {
176
  return array(
177
  'primary' => 'Primary',
public/widgets/widget-pricing.php CHANGED
@@ -18,7 +18,7 @@ class WPC_Shortcodes_Widget_Pricing extends WPC_Shortcodes_Widget_Base {
18
  <p>
19
  <label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Pricing Type:'); ?></label>
20
  <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('type'); ?>" name="<?php echo $this->get_field_name('type'); ?>">
21
- <?php foreach ( WPC_Shortcodes_Widget_Options::color_types() as $key => $value ) : ?>
22
  <option value="<?php echo $key; ?>"<?php selected( $o['type'], $key ); ?>><?php echo $value; ?></option>';
23
  <?php endforeach; ?>
24
  </select>
18
  <p>
19
  <label for="<?php echo $this->get_field_id('type'); ?>"><?php _e('Pricing Type:'); ?></label>
20
  <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('type'); ?>" name="<?php echo $this->get_field_name('type'); ?>">
21
+ <?php foreach ( WPC_Shortcodes_Widget_Options::pricing_color_types() as $key => $value ) : ?>
22
  <option value="<?php echo $key; ?>"<?php selected( $o['type'], $key ); ?>><?php echo $value; ?></option>';
23
  <?php endforeach; ?>
24
  </select>
readme.txt CHANGED
@@ -113,6 +113,10 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = Version 3.13 =
117
 
118
  * Fixed bug with button attribute.
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.14 =
117
+
118
+ * Fixed bug with pricing shortcode color options.
119
+
120
  = Version 3.13 =
121
 
122
  * Fixed bug with button attribute.
wc-shortcodes.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
5
  Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
6
  Author: Chris Baldelomar
7
  Author URI: http://angiemakes.com/
8
- Version: 3.13
9
  License: GPLv2 or later
10
  */
11
 
5
  Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
6
  Author: Chris Baldelomar
7
  Author URI: http://angiemakes.com/
8
+ Version: 3.14
9
  License: GPLv2 or later
10
  */
11