Shortcodes by Angie Makes - Version 3.16

Version Description

Download this release

Release Info

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

Code changes from version 3.15 to 3.16

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.15 ###
110
 
111
  * Fixed javascript bug that was breaking visual manager in Google Chrome.
106
 
107
  ## Changelog ##
108
 
109
+ ### Version 3.16 ###
110
+
111
+ * Fixed bug with social icons shortcode
112
+
113
  ### Version 3.15 ###
114
 
115
  * Fixed javascript bug that was breaking visual manager in Google Chrome.
public/class-register.php CHANGED
@@ -253,9 +253,49 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
253
  * @since 1.0
254
  */
255
  public function social_icons( $atts ){
 
 
 
 
 
 
 
 
 
 
 
 
256
  $atts = shortcode_atts( parent::$attr->social_icons, $atts );
257
  $atts = WPC_Shortcodes_Sanitize::social_icons_attr( $atts );
258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  $order = get_option( WC_SHORTCODES_PREFIX . 'social_icons_display' );
260
 
261
  if ( 'default' == $atts['format'] ) {
253
  * @since 1.0
254
  */
255
  public function social_icons( $atts ){
256
+ //deprecated value
257
+ $size_is_set = false;
258
+ $align_is_set = false;
259
+
260
+ if ( isset( $atts['size'] ) && ! empty( $atts['size'] ) ) {
261
+ $size_is_set = true;
262
+ }
263
+
264
+ if ( isset( $atts['align'] ) && ! empty( $atts['align'] ) ) {
265
+ $align_is_set = true;
266
+ }
267
+
268
  $atts = shortcode_atts( parent::$attr->social_icons, $atts );
269
  $atts = WPC_Shortcodes_Sanitize::social_icons_attr( $atts );
270
 
271
+ if ( $size_is_set ) {
272
+ switch ( $atts['size'] ) {
273
+ case 'small' :
274
+ $atts['maxheight'] = 16;
275
+ break;
276
+ case 'medium' :
277
+ $atts['maxheight'] = 24;
278
+ break;
279
+ case 'large' :
280
+ $atts['maxheight'] = 48;
281
+ break;
282
+ }
283
+ }
284
+
285
+ if ( $align_is_set ) {
286
+ switch ( $atts['align'] ) {
287
+ case 'left' :
288
+ $atts['columns'] = 'float-left';
289
+ break;
290
+ case 'center' :
291
+ $atts['columns'] = 'float-center';
292
+ break;
293
+ case 'right' :
294
+ $atts['columns'] = 'float-right';
295
+ break;
296
+ }
297
+ }
298
+
299
  $order = get_option( WC_SHORTCODES_PREFIX . 'social_icons_display' );
300
 
301
  if ( 'default' == $atts['format'] ) {
public/class-sanitize.php CHANGED
@@ -166,6 +166,24 @@ class WPC_Shortcodes_Sanitize {
166
  return $name;
167
  }
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  public static function social_icons_format( $value, $default = 'default' ) {
170
  $whitelist = WPC_Shortcodes_Widget_Options::social_icons_formats();
171
 
@@ -712,8 +730,11 @@ class WPC_Shortcodes_Sanitize {
712
  case 'maxheight' :
713
  $atts[ $key ] = self::social_icons_max_height( $value );
714
  break;
 
 
 
715
  case 'align' :
716
- $atts[ $key ] = self::text_align( $value );
717
  break;
718
  case 'class' :
719
  $atts[ $key ] = self::html_classes( $value );
166
  return $name;
167
  }
168
 
169
+ public static function social_icons_align( $value, $default = 'left' ) {
170
+ $whitelist = WPC_Shortcodes_Widget_Options::social_icons_align_values();
171
+
172
+ if ( array_key_exists( $value, $whitelist ) )
173
+ return $value;
174
+
175
+ return $default;
176
+ }
177
+
178
+ public static function social_icons_size( $value, $default = 'large' ) {
179
+ $whitelist = WPC_Shortcodes_Widget_Options::social_icons_sizes();
180
+
181
+ if ( array_key_exists( $value, $whitelist ) )
182
+ return $value;
183
+
184
+ return $default;
185
+ }
186
+
187
  public static function social_icons_format( $value, $default = 'default' ) {
188
  $whitelist = WPC_Shortcodes_Widget_Options::social_icons_formats();
189
 
730
  case 'maxheight' :
731
  $atts[ $key ] = self::social_icons_max_height( $value );
732
  break;
733
+ case 'size' :
734
+ $atts[ $key ] = self::social_icons_size( $value );
735
+ break;
736
  case 'align' :
737
+ $atts[ $key ] = self::social_icons_align( $value );
738
  break;
739
  case 'class' :
740
  $atts[ $key ] = self::html_classes( $value );
public/class-vars.php CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
8
  *
9
  * @var string
10
  */
11
- const VERSION = '3.15';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
8
  *
9
  * @var string
10
  */
11
+ const VERSION = '3.16';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
public/class-widget-options.php CHANGED
@@ -263,6 +263,24 @@ class WPC_Shortcodes_Widget_Options {
263
  );
264
  }
265
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  public static function social_icons_display_types() {
267
  return array(
268
  'float-center' => 'Float Center',
263
  );
264
  }
265
 
266
+ public static function social_icons_sizes() {
267
+ return array(
268
+ '' => 'None',
269
+ 'small' => 'Small',
270
+ 'medium' => 'Medium',
271
+ 'large' => 'Large',
272
+ );
273
+ }
274
+
275
+ public static function social_icons_align_values() {
276
+ return array(
277
+ '' => 'None',
278
+ 'left' => 'Left',
279
+ 'center' => 'Center',
280
+ 'right' => 'Right',
281
+ );
282
+ }
283
+
284
  public static function social_icons_display_types() {
285
  return array(
286
  'float-center' => 'Float Center',
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.15 =
117
 
118
  * Fixed javascript bug that was breaking visual manager in Google Chrome.
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.16 =
117
+
118
+ * Fixed bug with social icons shortcode
119
+
120
  = Version 3.15 =
121
 
122
  * Fixed javascript bug that was breaking visual manager in Google Chrome.
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.15
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.16
9
  License: GPLv2 or later
10
  */
11