Shortcodes by Angie Makes - Version 3.32

Version Description

Download this release

Release Info

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

Code changes from version 3.31 to 3.32

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.31 ###
110
 
111
  * fixed bug with accordion not closing
106
 
107
  ## Changelog ##
108
 
109
+ ### Version 3.32 ###
110
+
111
+ * Updated WPC Settings Framework to 1.0.7
112
+
113
  ### Version 3.31 ###
114
 
115
  * fixed bug with accordion not closing
admin/class-options.php CHANGED
@@ -53,7 +53,8 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
53
  array(
54
  'option_name' => 'social_icons_display',
55
  'title' => 'Order / Show / Hide',
56
- 'default' => parent::$social_icons,
 
57
  'description' => '',
58
  'type' => 'order_show_hide',
59
  'callback' => array( &$this, 'sanitize_social_icons' ),
@@ -94,7 +95,8 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
94
  array(
95
  'option_name' => 'share_buttons_display',
96
  'title' => 'Order / Show / Hide',
97
- 'default' => parent::$share_buttons,
 
98
  'description' => '',
99
  'type' => 'order_show_hide',
100
  'callback' => array( &$this, 'sanitize_share_buttons' ),
@@ -481,4 +483,23 @@ class WPC_Shortcodes_Options extends WPC_Shortcodes_Vars {
481
 
482
  return $valid;
483
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
484
  }
53
  array(
54
  'option_name' => 'social_icons_display',
55
  'title' => 'Order / Show / Hide',
56
+ 'selection' => parent::$social_icons,
57
+ 'default' => $this->set_default_order_show_hide_type( parent::$theme_support[ 'social_icons_selected' ], parent::$social_icons ),
58
  'description' => '',
59
  'type' => 'order_show_hide',
60
  'callback' => array( &$this, 'sanitize_social_icons' ),
95
  array(
96
  'option_name' => 'share_buttons_display',
97
  'title' => 'Order / Show / Hide',
98
+ 'selection' => parent::$share_buttons,
99
+ 'default' => $this->set_default_order_show_hide_type( parent::$theme_support[ 'share_buttons_selected' ], parent::$share_buttons ),
100
  'description' => '',
101
  'type' => 'order_show_hide',
102
  'callback' => array( &$this, 'sanitize_share_buttons' ),
483
 
484
  return $valid;
485
  }
486
+
487
+ private function set_default_order_show_hide_type( $selected, $default ) {
488
+ if ( isset( $selected ) && is_array( $selected ) && ! empty( $selected ) ) {
489
+ $new_order = array();
490
+
491
+ foreach( $selected as $index => $key_name ) {
492
+ if ( array_key_exists( $key_name, $default ) ) {
493
+ $new_order[ $key_name ] = $default[ $key_name ];
494
+ unset( $default[ $key_name ] );
495
+ }
496
+ }
497
+
498
+ if ( ! empty( $new_order ) ) {
499
+ return $new_order;
500
+ }
501
+ }
502
+
503
+ return $default;
504
+ }
505
  }
includes/vendors/wpc-settings-framework/class-wpc-settings-framework.php CHANGED
@@ -17,7 +17,7 @@
17
  */
18
  class WC_Shortcodes_Settings_Framework {
19
 
20
- protected $version = '1.0.6';
21
 
22
  /**
23
  * Instance of this class.
@@ -590,6 +590,7 @@ class WC_Shortcodes_Settings_Framework {
590
  $args['display'] = 'default';
591
 
592
  extract( $args );
 
593
  $val = get_option( $option_name, $default );
594
 
595
  switch ( $args['type'] ) {
17
  */
18
  class WC_Shortcodes_Settings_Framework {
19
 
20
+ protected $version = '1.0.7';
21
 
22
  /**
23
  * Instance of this class.
590
  $args['display'] = 'default';
591
 
592
  extract( $args );
593
+
594
  $val = get_option( $option_name, $default );
595
 
596
  switch ( $args['type'] ) {
includes/vendors/wpc-settings-framework/views/settings/order-show-hide.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $not_selected = $default;
3
  ?>
4
 
5
  <?php if ( isset( $label ) ) : ?>
1
  <?php
2
+ $not_selected = $selection;
3
  ?>
4
 
5
  <?php if ( isset( $label ) ) : ?>
public/class-vars.php CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
8
  *
9
  * @var string
10
  */
11
- const VERSION = '3.31';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
@@ -171,6 +171,8 @@ class WPC_Shortcodes_Vars {
171
  'print_small_share_button' => '',
172
  'print_medium_share_button' => '',
173
  'print_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/print.png',
 
 
174
  );
175
 
176
  // Shortcode Options
8
  *
9
  * @var string
10
  */
11
+ const VERSION = '3.32';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
171
  'print_small_share_button' => '',
172
  'print_medium_share_button' => '',
173
  'print_share_button' => WC_SHORTCODES_PLUGIN_URL . 'public/assets/img/print.png',
174
+ 'social_icons_selected' => array( 'pinterest', 'instagram', 'facebook', 'twitter', 'email' ),
175
+ 'share_buttons_selected' => array( 'pinterest', 'facebook', 'twitter', 'email' ),
176
  );
177
 
178
  // Shortcode Options
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.31 =
117
 
118
  * fixed bug with accordion not closing
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.32 =
117
+
118
+ * Updated WPC Settings Framework to 1.0.7
119
+
120
  = Version 3.31 =
121
 
122
  * fixed bug with accordion not closing
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.31
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.32
9
  License: GPLv2 or later
10
  */
11