Shortcodes by Angie Makes - Version 3.29

Version Description

Download this release

Release Info

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

Code changes from version 3.28 to 3.29

README.md CHANGED
@@ -106,6 +106,13 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
106
 
107
  ## Changelog ##
108
 
 
 
 
 
 
 
 
109
  ### Version 3.28 ###
110
 
111
  * Added style format for image links
106
 
107
  ## Changelog ##
108
 
109
+ ### Version 3.29 ###
110
+
111
+ * allowed sanitation of multiple pixel values
112
+ * added read more button to post shortcode
113
+ * updated sanitize for css_pixel
114
+ * updated accordion, toggle, and tabs, javascript
115
+
116
  ### Version 3.28 ###
117
 
118
  * Added style format for image links
public/assets/css/style.css CHANGED
@@ -69,11 +69,14 @@
69
  .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger:first-child {
70
  margin-top: 0;
71
  }
 
 
 
 
72
  .wc-shortcodes-accordion .wc-shortcodes-accordion-content {
73
  padding: 20px;
74
  border: 1px solid #cccccc;
75
  border-top: 0px;
76
- display: none;
77
  }
78
  .wc-shortcodes-accordion.wc-shortcodes-accordion-layout-none .wc-shortcodes-accordion-content {
79
  padding: 20px 0;
@@ -144,7 +147,6 @@
144
  margin-top: 0;
145
  }
146
  .wc-shortcodes-toggle .wc-shortcodes-toggle-container {
147
- display: none;
148
  overflow: hidden;
149
  padding: 20px;
150
  border: 1px solid #cccccc;
@@ -157,6 +159,10 @@
157
  .wc-shortcodes-toggle .wc-shortcodes-toggle-container *:last-child {
158
  margin-bottom: 0
159
  }
 
 
 
 
160
 
161
 
162
  /**
@@ -200,7 +206,12 @@
200
  border-left: solid 1px #cccccc;
201
  border-right: solid 1px #cccccc;
202
  border-bottom: solid 1px #cccccc;
203
- display: none;
 
 
 
 
 
204
  }
205
  .wc-shortcodes-tabs.wc-shortcodes-tabs-layout-none .tab-content {
206
  padding: 20px 0;
@@ -1417,6 +1428,9 @@ pre.pre-wrap {
1417
  .wc-shortcodes-post-content {
1418
  padding: 0 20px;
1419
  }
 
 
 
1420
  .wc-shortcodes-post-border {
1421
  border: 1px solid #dddddd;
1422
  }
@@ -1426,7 +1440,7 @@ pre.pre-wrap {
1426
  }
1427
  .wc-shortcodes-entry-title {
1428
  margin-top: 20px;
1429
- margin-bottom: 20px;
1430
  -ms-word-wrap: break-word;
1431
  word-wrap: break-word;
1432
  }
@@ -1435,12 +1449,17 @@ pre.pre-wrap {
1435
  margin-bottom: 0;
1436
  }
1437
  .wc-shortcodes-entry-meta-inner {
1438
- margin-bottom: 20px;
1439
  }
1440
  .wc-shortcodes-entry-summary {
1441
  margin-top: 20px;
1442
  margin-bottom: 0;
1443
  }
 
 
 
 
 
1444
  .wc-shortcodes-entry-quote blockquote {
1445
  margin-top: 0;
1446
  padding: 10px 20px;
69
  .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger:first-child {
70
  margin-top: 0;
71
  }
72
+ .wc-shortcodes-accordion .wc-shortcodes-accordion-content-wrapper {
73
+ overflow: hidden;
74
+ height: 0;
75
+ }
76
  .wc-shortcodes-accordion .wc-shortcodes-accordion-content {
77
  padding: 20px;
78
  border: 1px solid #cccccc;
79
  border-top: 0px;
 
80
  }
81
  .wc-shortcodes-accordion.wc-shortcodes-accordion-layout-none .wc-shortcodes-accordion-content {
82
  padding: 20px 0;
147
  margin-top: 0;
148
  }
149
  .wc-shortcodes-toggle .wc-shortcodes-toggle-container {
 
150
  overflow: hidden;
151
  padding: 20px;
152
  border: 1px solid #cccccc;
159
  .wc-shortcodes-toggle .wc-shortcodes-toggle-container *:last-child {
160
  margin-bottom: 0
161
  }
162
+ .wc-shortcodes-toggle .wc-shortcodes-toggle-content-wrapper {
163
+ overflow: hidden;
164
+ height: 0;
165
+ }
166
 
167
 
168
  /**
206
  border-left: solid 1px #cccccc;
207
  border-right: solid 1px #cccccc;
208
  border-bottom: solid 1px #cccccc;
209
+ }
210
+ .wc-shortcodes-tabs .tab-content-wrapper {
211
+ overflow: hidden;
212
+ }
213
+ .wc-shortcodes-tabs .tab-content-wrapper.tab-content-hide {
214
+ height: 0;
215
  }
216
  .wc-shortcodes-tabs.wc-shortcodes-tabs-layout-none .tab-content {
217
  padding: 20px 0;
1428
  .wc-shortcodes-post-content {
1429
  padding: 0 20px;
1430
  }
1431
+ .wc-shortcodes-post-content > *:last-child {
1432
+ margin-bottom: 20px;
1433
+ }
1434
  .wc-shortcodes-post-border {
1435
  border: 1px solid #dddddd;
1436
  }
1440
  }
1441
  .wc-shortcodes-entry-title {
1442
  margin-top: 20px;
1443
+ margin-bottom: 0;
1444
  -ms-word-wrap: break-word;
1445
  word-wrap: break-word;
1446
  }
1449
  margin-bottom: 0;
1450
  }
1451
  .wc-shortcodes-entry-meta-inner {
1452
+ /* margin-bottom: 20px; */
1453
  }
1454
  .wc-shortcodes-entry-summary {
1455
  margin-top: 20px;
1456
  margin-bottom: 0;
1457
  }
1458
+ .wc-shortcodes-read-more {
1459
+ margin-top: 20px;
1460
+ margin-bottom: 0;
1461
+ text-align: center;
1462
+ }
1463
  .wc-shortcodes-entry-quote blockquote {
1464
  margin-top: 0;
1465
  padding: 10px 20px;
public/assets/js/accordion.js CHANGED
@@ -1,11 +1,30 @@
1
  ( function( $ ) {
2
  "use strict";
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  $(document).ready(function(){
5
  $('.wc-shortcodes-accordion').each( function() {
6
  var $accordion = $(this);
7
  var $trigger = $accordion.find('.wc-shortcodes-accordion-trigger');
8
- var $content = $accordion.find('.wc-shortcodes-accordion-content');
9
 
10
  var startState = $accordion.data('startState');
11
  var behavior = $accordion.data('behavior');
@@ -14,8 +33,8 @@
14
  // nothing, leave hidden
15
  }
16
  else {
17
- $content.first().show();
18
  $trigger.first().addClass('wc-shortcodes-accordion-header-active');
 
19
  }
20
 
21
  $trigger.click(function( event ){
@@ -23,29 +42,34 @@
23
 
24
  var $this = $(this);
25
  var $next = $this.next();
 
26
 
27
  if ( 'autoclose' == behavior ) {
28
  $trigger.removeClass('wc-shortcodes-accordion-header-active');
29
- if ( $next.is(":hidden") ) {
 
 
 
 
 
 
 
30
  $this.addClass('wc-shortcodes-accordion-header-active');
31
  }
32
 
33
- $next.slideToggle('fast');
34
- $content.not($next).slideUp('fast');
35
  }
36
  else {
37
- if ( $next.is(":hidden") ) {
38
  $this.addClass('wc-shortcodes-accordion-header-active');
39
- $next.slideToggle('fast');
 
40
  }
41
  else {
42
  $this.removeClass('wc-shortcodes-accordion-header-active');
43
- $next.slideUp('fast');
44
  }
45
  }
46
 
47
- $( document.body ).trigger( 'wcs-toggled' );
48
-
49
  return false;
50
  });
51
  });
1
  ( function( $ ) {
2
  "use strict";
3
 
4
+ function get_height( $el ) {
5
+ var height;
6
+ height = $el.outerHeight();
7
+
8
+ if ( height > 0 ) {
9
+ height += "px";
10
+ return height;
11
+ }
12
+
13
+ return 0;
14
+ }
15
+ function is_hidden( $el ) {
16
+ var height = $el.outerHeight();
17
+ if ( 0 == height )
18
+ return true;
19
+
20
+ return false;
21
+ }
22
+
23
  $(document).ready(function(){
24
  $('.wc-shortcodes-accordion').each( function() {
25
  var $accordion = $(this);
26
  var $trigger = $accordion.find('.wc-shortcodes-accordion-trigger');
27
+ var $content = $accordion.find('.wc-shortcodes-accordion-content-wrapper');
28
 
29
  var startState = $accordion.data('startState');
30
  var behavior = $accordion.data('behavior');
33
  // nothing, leave hidden
34
  }
35
  else {
 
36
  $trigger.first().addClass('wc-shortcodes-accordion-header-active');
37
+ $content.first().css('height','auto');
38
  }
39
 
40
  $trigger.click(function( event ){
42
 
43
  var $this = $(this);
44
  var $next = $this.next();
45
+ var height = 0;
46
 
47
  if ( 'autoclose' == behavior ) {
48
  $trigger.removeClass('wc-shortcodes-accordion-header-active');
49
+
50
+ if ( is_hidden( $next ) ) {
51
+ $this.addClass('wc-shortcodes-accordion-header-active');
52
+ height = get_height( $next.children() );
53
+ $next.animate({height:height},'fast','linear',function() {$(this).css('height','auto')});
54
+ $content.not($next).animate({height:0},'fast','linear');
55
+ }
56
+ else {
57
  $this.addClass('wc-shortcodes-accordion-header-active');
58
  }
59
 
 
 
60
  }
61
  else {
62
+ if ( is_hidden( $next ) ) {
63
  $this.addClass('wc-shortcodes-accordion-header-active');
64
+ height = get_height( $next.children() );
65
+ $next.animate({height:height},'fast','linear',function() {$(this).css('height','auto')});
66
  }
67
  else {
68
  $this.removeClass('wc-shortcodes-accordion-header-active');
69
+ $next.animate({height:0},'fast','linear');
70
  }
71
  }
72
 
 
 
73
  return false;
74
  });
75
  });
public/assets/js/tabs.js CHANGED
@@ -5,9 +5,9 @@
5
  $('.wc-shortcodes-tabs').each( function() {
6
  var $tabs = $(this);
7
  var $trigger = $tabs.find('.wcs-tabs-nav li a');
8
- var $content = $tabs.find('.tab-content');
9
 
10
- $content.first().show();
11
  $trigger.first().parent().addClass('wcs-state-active');
12
 
13
  $trigger.click(function( event ){
@@ -20,11 +20,9 @@
20
  $trigger.parent().removeClass('wcs-state-active');
21
  $this.parent().addClass('wcs-state-active');
22
 
23
- $target.show();
24
- $content.not($target).hide();
25
 
26
- $( document.body ).trigger( 'wcs-toggled' );
27
-
28
  return false;
29
  });
30
  });
5
  $('.wc-shortcodes-tabs').each( function() {
6
  var $tabs = $(this);
7
  var $trigger = $tabs.find('.wcs-tabs-nav li a');
8
+ var $content = $tabs.find('.tab-content-wrapper');
9
 
10
+ $content.first().removeClass('tab-content-hide');
11
  $trigger.first().parent().addClass('wcs-state-active');
12
 
13
  $trigger.click(function( event ){
20
  $trigger.parent().removeClass('wcs-state-active');
21
  $this.parent().addClass('wcs-state-active');
22
 
23
+ $target.removeClass('tab-content-hide');
24
+ $content.not($target).addClass('tab-content-hide');
25
 
 
 
26
  return false;
27
  });
28
  });
public/assets/js/toggle.js CHANGED
@@ -1,10 +1,41 @@
1
  jQuery(function($){
2
  "use strict";
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  $(document).ready(function(){
5
  $(".wc-shortcodes-toggle-trigger").click(function(){
6
- $(this).toggleClass("active").next().slideToggle("fast");
7
- $( document.body ).trigger( 'wcs-toggled' );
 
 
 
 
 
 
 
 
 
 
 
 
8
  return false;
9
  });
10
  });
1
  jQuery(function($){
2
  "use strict";
3
 
4
+ function get_height( $el ) {
5
+ var height;
6
+ height = $el.outerHeight();
7
+
8
+ if ( height > 0 ) {
9
+ height += "px";
10
+ return height;
11
+ }
12
+
13
+ return 0;
14
+ }
15
+ function is_hidden( $el ) {
16
+ var height = $el.outerHeight();
17
+ if ( 0 == height )
18
+ return true;
19
+
20
+ return false;
21
+ }
22
+
23
  $(document).ready(function(){
24
  $(".wc-shortcodes-toggle-trigger").click(function(){
25
+ var $this = $(this);
26
+ var $next = $this.next();
27
+ var height = 0;
28
+
29
+ $this.toggleClass('active');
30
+
31
+ if ( is_hidden( $next ) ) {
32
+ height = get_height( $next.children() );
33
+ $next.animate({height:height},'fast','linear',function() {$(this).css('height','auto')});
34
+ }
35
+ else {
36
+ $next.animate({height:0},'fast','linear');
37
+ }
38
+
39
  return false;
40
  });
41
  });
public/class-register.php CHANGED
@@ -684,7 +684,7 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
684
  wp_enqueue_script('wc-shortcodes-toggle');
685
 
686
  // Display the Toggle
687
- return '<div class="'. esc_attr( $class ) .'"><div class="wc-shortcodes-toggle-trigger"><a href="#">'. esc_html( $atts['title'] ) .'</a></div><div style="'.esc_attr( $style ).'" class="wc-shortcodes-toggle-container wc-shortcodes-content">' . do_shortcode($content) . '</div></div>';
688
  }
689
 
690
 
@@ -740,7 +740,7 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
740
  $atts = shortcode_atts( parent::$attr->accordion_section, $atts );
741
  $atts = WPC_Shortcodes_Sanitize::accordion_section_attr( $atts );
742
 
743
- return '<div class="wc-shortcodes-accordion-trigger '. esc_attr( $atts['class'] ) .'"><a href="#">'. esc_html( $atts['title'] ) .'</a></div><div class="wc-shortcodes-accordion-content wc-shortcodes-content">' . do_shortcode($content) . '</div>';
744
  }
745
 
746
 
@@ -805,7 +805,7 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
805
 
806
  $class = implode( ' ', $classes );
807
 
808
- return '<div id="wc-shortcodes-tab-'. sanitize_title( $atts['title'] ) .'" class="'. esc_attr( $class ) .'">'. do_shortcode( $content ) .'</div>';
809
  }
810
 
811
 
@@ -1112,6 +1112,8 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
1112
  'show_thumbnail',
1113
  'show_content',
1114
  'show_paging',
 
 
1115
  'size',
1116
  'filtering',
1117
  'columns',
684
  wp_enqueue_script('wc-shortcodes-toggle');
685
 
686
  // Display the Toggle
687
+ return '<div class="'. esc_attr( $class ) .'"><div class="wc-shortcodes-toggle-trigger"><a href="#">'. esc_html( $atts['title'] ) .'</a></div><div class="wc-shortcodes-toggle-content-wrapper"><div style="'.esc_attr( $style ).'" class="wc-shortcodes-toggle-container wc-shortcodes-content">' . do_shortcode($content) . '</div></div></div>';
688
  }
689
 
690
 
740
  $atts = shortcode_atts( parent::$attr->accordion_section, $atts );
741
  $atts = WPC_Shortcodes_Sanitize::accordion_section_attr( $atts );
742
 
743
+ return '<div class="wc-shortcodes-accordion-trigger '. esc_attr( $atts['class'] ) .'"><a href="#">'. esc_html( $atts['title'] ) .'</a></div><div class="wc-shortcodes-accordion-content-wrapper"><div class="wc-shortcodes-accordion-content wc-shortcodes-content">' . do_shortcode($content) . '</div></div>';
744
  }
745
 
746
 
805
 
806
  $class = implode( ' ', $classes );
807
 
808
+ return '<div class="tab-content-wrapper tab-content-hide"><div id="wc-shortcodes-tab-'. sanitize_title( $atts['title'] ) .'" class="'. esc_attr( $class ) .'">'. do_shortcode( $content ) .'</div></div>';
809
  }
810
 
811
 
1112
  'show_thumbnail',
1113
  'show_content',
1114
  'show_paging',
1115
+ 'readmore',
1116
+ 'button_class',
1117
  'size',
1118
  'filtering',
1119
  'columns',
public/class-sanitize.php CHANGED
@@ -124,6 +124,41 @@ class WPC_Shortcodes_Sanitize {
124
  return $value."px";
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  public static function css_unit( $value, $css_unit = 'px' ) {
128
  if ( '' == $value )
129
  return $value;
@@ -139,7 +174,7 @@ class WPC_Shortcodes_Sanitize {
139
  $value = filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
140
 
141
  if ( empty( $value ) )
142
- $value = '0';
143
 
144
  return $value . $css_unit;
145
  }
@@ -491,7 +526,7 @@ class WPC_Shortcodes_Sanitize {
491
  $atts[ $key ] = self::html_classes( $value );
492
  break;
493
  case 'padding' :
494
- $atts[ $key ] = self::css_unit( $value );
495
  break;
496
  case 'border_width' :
497
  $atts[ $key ] = self::css_unit( $value );
@@ -1214,6 +1249,9 @@ class WPC_Shortcodes_Sanitize {
1214
  $atts['heading_type'] = in_array( $atts['heading_type'], $valid_headings ) ? $atts['heading_type'] : 'h2';
1215
 
1216
  // sanitize inputs
 
 
 
1217
  $atts['terms'] = sanitize_text_field( $atts['terms'] );
1218
  $atts['pids'] = sanitize_text_field( $atts['pids'] );
1219
  $atts['post__in'] = sanitize_text_field( $atts['post__in'] );
@@ -1297,6 +1335,7 @@ class WPC_Shortcodes_Sanitize {
1297
  // sanitize inputs
1298
  $atts['button_class'] = self::html_classes( $atts['button_class'] );
1299
  $atts['button_class'] = empty( $atts['button_class'] ) ? 'wc-shortcodes-post-slide-button' : $atts['button_class'];
 
1300
  $atts['terms'] = sanitize_text_field( $atts['terms'] );
1301
  $atts['pids'] = sanitize_text_field( $atts['pids'] );
1302
  $atts['post__in'] = sanitize_text_field( $atts['post__in'] );
124
  return $value."px";
125
  }
126
 
127
+ public static function css_units( $value, $css_unit = 'px' ) {
128
+ if ( '' == $value )
129
+ return $value;
130
+
131
+ $value = trim( $value );
132
+
133
+ if ( 0 == $value )
134
+ return $value;
135
+
136
+ $values = explode( ' ', $value );
137
+ $clean = array();
138
+
139
+ foreach ( $values as $value ) {
140
+ if ( preg_match( '/(px|em|rem)$/', $value, $match ) ) {
141
+ $css_unit = $match[1];
142
+ }
143
+ $value = filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
144
+
145
+ if ( empty( $value ) ) {
146
+ $value = '0';
147
+ }
148
+ else {
149
+ $value = $value . $css_unit;
150
+ }
151
+
152
+ $clean[] = $value;
153
+ }
154
+
155
+ if ( empty( $clean ) ) {
156
+ return '';
157
+ }
158
+
159
+ return implode( ' ', $clean );
160
+ }
161
+
162
  public static function css_unit( $value, $css_unit = 'px' ) {
163
  if ( '' == $value )
164
  return $value;
174
  $value = filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
175
 
176
  if ( empty( $value ) )
177
+ return 0;
178
 
179
  return $value . $css_unit;
180
  }
526
  $atts[ $key ] = self::html_classes( $value );
527
  break;
528
  case 'padding' :
529
+ $atts[ $key ] = self::css_units( $value );
530
  break;
531
  case 'border_width' :
532
  $atts[ $key ] = self::css_unit( $value );
1249
  $atts['heading_type'] = in_array( $atts['heading_type'], $valid_headings ) ? $atts['heading_type'] : 'h2';
1250
 
1251
  // sanitize inputs
1252
+ $atts['button_class'] = self::html_classes( $atts['button_class'] );
1253
+ $atts['button_class'] = empty( $atts['button_class'] ) ? 'wc-shortcodes-post-button' : $atts['button_class'];
1254
+ $atts['readmore'] = sanitize_text_field( $atts['readmore'] );
1255
  $atts['terms'] = sanitize_text_field( $atts['terms'] );
1256
  $atts['pids'] = sanitize_text_field( $atts['pids'] );
1257
  $atts['post__in'] = sanitize_text_field( $atts['post__in'] );
1335
  // sanitize inputs
1336
  $atts['button_class'] = self::html_classes( $atts['button_class'] );
1337
  $atts['button_class'] = empty( $atts['button_class'] ) ? 'wc-shortcodes-post-slide-button' : $atts['button_class'];
1338
+ $atts['readmore'] = sanitize_text_field( $atts['readmore'] );
1339
  $atts['terms'] = sanitize_text_field( $atts['terms'] );
1340
  $atts['pids'] = sanitize_text_field( $atts['pids'] );
1341
  $atts['post__in'] = sanitize_text_field( $atts['post__in'] );
public/class-vars.php CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
8
  *
9
  * @var string
10
  */
11
- const VERSION = '3.28';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
@@ -423,6 +423,9 @@ class WPC_Shortcodes_Vars {
423
  'show_content' => 1, // show main content?
424
  'show_paging' => 1, // show pagination navigation?
425
 
 
 
 
426
  'size' => 'large', // default thumbnail size
427
 
428
  'filtering' => 1, // insert isotope filter navigation
@@ -455,7 +458,7 @@ class WPC_Shortcodes_Vars {
455
  'show_meta_category' => 1, // show heading?
456
  'show_title' => 1, // show heading?
457
  'show_content' => 1, // show main content?
458
- 'readmore' => 'Continue Reading', // show main content?
459
  'button_class' => 'button secondary-button', // show main content?
460
 
461
  'size' => 'full', // default thumbnail size
8
  *
9
  * @var string
10
  */
11
+ const VERSION = '3.29';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
423
  'show_content' => 1, // show main content?
424
  'show_paging' => 1, // show pagination navigation?
425
 
426
+ 'readmore' => '', // show read more button?
427
+ 'button_class' => 'button', // show main content?
428
+
429
  'size' => 'large', // default thumbnail size
430
 
431
  'filtering' => 1, // insert isotope filter navigation
458
  'show_meta_category' => 1, // show heading?
459
  'show_title' => 1, // show heading?
460
  'show_content' => 1, // show main content?
461
+ 'readmore' => 'Continue Reading', // show read more button?
462
  'button_class' => 'button secondary-button', // show main content?
463
 
464
  'size' => 'full', // default thumbnail size
public/templates/borderless/content-excerpt.php CHANGED
@@ -17,6 +17,12 @@
17
  <?php wc_shortcodes_the_excerpt(); ?>
18
  <?php endif; ?>
19
 
 
 
 
 
 
 
20
  <?php include('entry-meta.php'); ?>
21
 
22
  </div><!-- .wc-shortcodes-post-border -->
17
  <?php wc_shortcodes_the_excerpt(); ?>
18
  <?php endif; ?>
19
 
20
+ <?php if ( $display['readmore'] ) : ?>
21
+ <div class="wc-shortcodes-read-more">
22
+ <a class="<?php echo esc_attr( $display['button_class'] ); ?>" href="<?php the_permalink(); ?>"><?php echo $display['readmore']; ?></a>
23
+ </div><!-- .entry-summary -->
24
+ <?php endif; ?>
25
+
26
  <?php include('entry-meta.php'); ?>
27
 
28
  </div><!-- .wc-shortcodes-post-border -->
public/templates/borderless/content.php CHANGED
@@ -17,6 +17,12 @@
17
  <?php wc_shortcodes_the_excerpt(); ?>
18
  <?php endif; ?>
19
 
 
 
 
 
 
 
20
  <?php include('entry-meta.php'); ?>
21
 
22
  </div><!-- .wc-shortcodes-post-border -->
17
  <?php wc_shortcodes_the_excerpt(); ?>
18
  <?php endif; ?>
19
 
20
+ <?php if ( $display['readmore'] ) : ?>
21
+ <div class="wc-shortcodes-read-more">
22
+ <a class="<?php echo esc_attr( $display['button_class'] ); ?>" href="<?php the_permalink(); ?>"><?php echo $display['readmore']; ?></a>
23
+ </div><!-- .entry-summary -->
24
+ <?php endif; ?>
25
+
26
  <?php include('entry-meta.php'); ?>
27
 
28
  </div><!-- .wc-shortcodes-post-border -->
public/templates/box/content-excerpt.php CHANGED
@@ -22,6 +22,12 @@
22
  </div><!-- .entry-summary -->
23
  <?php endif; ?>
24
 
 
 
 
 
 
 
25
  <?php include('entry-meta.php'); ?>
26
 
27
  </div><!-- .wc-shortcodes-post-content -->
22
  </div><!-- .entry-summary -->
23
  <?php endif; ?>
24
 
25
+ <?php if ( $display['readmore'] ) : ?>
26
+ <div class="wc-shortcodes-read-more">
27
+ <a class="<?php echo esc_attr( $display['button_class'] ); ?>" href="<?php the_permalink(); ?>"><?php echo $display['readmore']; ?></a>
28
+ </div><!-- .entry-summary -->
29
+ <?php endif; ?>
30
+
31
  <?php include('entry-meta.php'); ?>
32
 
33
  </div><!-- .wc-shortcodes-post-content -->
public/templates/box/content.php CHANGED
@@ -22,6 +22,12 @@
22
  </div><!-- .entry-summary -->
23
  <?php endif; ?>
24
 
 
 
 
 
 
 
25
  <?php include('entry-meta.php'); ?>
26
 
27
  </div><!-- .wc-shortcodes-post-content -->
22
  </div><!-- .entry-summary -->
23
  <?php endif; ?>
24
 
25
+ <?php if ( $display['readmore'] ) : ?>
26
+ <div class="wc-shortcodes-read-more">
27
+ <a class="<?php echo esc_attr( $display['button_class'] ); ?>" href="<?php the_permalink(); ?>"><?php echo $display['readmore']; ?></a>
28
+ </div><!-- .entry-summary -->
29
+ <?php endif; ?>
30
+
31
  <?php include('entry-meta.php'); ?>
32
 
33
  </div><!-- .wc-shortcodes-post-content -->
public/widgets/widget-post-slider.php CHANGED
@@ -126,6 +126,7 @@ class WPC_Shortcodes_Widget_Post_Slider extends WP_Widget {
126
  <p>
127
  <label for="<?php echo $this->get_field_id('readmore'); ?>"><?php _e('Read More Text:') ?></label>
128
  <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('readmore'); ?>" name="<?php echo $this->get_field_name('readmore'); ?>" value="<?php echo $o['readmore']; ?>" />
 
129
  </p>
130
  <p>
131
  <label for="<?php echo $this->get_field_id('button_class'); ?>"><?php _e('Button Class:') ?></label>
126
  <p>
127
  <label for="<?php echo $this->get_field_id('readmore'); ?>"><?php _e('Read More Text:') ?></label>
128
  <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('readmore'); ?>" name="<?php echo $this->get_field_name('readmore'); ?>" value="<?php echo $o['readmore']; ?>" />
129
+ <span class="wcs-description">Enter button text. Leave blank if you do not want a button.</span>
130
  </p>
131
  <p>
132
  <label for="<?php echo $this->get_field_id('button_class'); ?>"><?php _e('Button Class:') ?></label>
public/widgets/widget-posts.php CHANGED
@@ -112,6 +112,16 @@ class WPC_Shortcodes_Widget_Posts extends WPC_Shortcodes_Widget_Base {
112
  <input type="checkbox" class="wc-shortcodes-widget-option checkbox" id="<?php echo $this->get_field_id('show_paging'); ?>" name="<?php echo $this->get_field_name('show_paging'); ?>" value="1" <?php checked( $o['show_paging'], 1 ); ?> />
113
  <label for="<?php echo $this->get_field_id('show_paging'); ?>"><?php _e('Show Paging') ?></label>
114
  </p>
 
 
 
 
 
 
 
 
 
 
115
  <p>
116
  <label for="<?php echo $this->get_field_id('size'); ?>"><?php _e('Image Size:'); ?></label>
117
  <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('size'); ?>" name="<?php echo $this->get_field_name('size'); ?>">
112
  <input type="checkbox" class="wc-shortcodes-widget-option checkbox" id="<?php echo $this->get_field_id('show_paging'); ?>" name="<?php echo $this->get_field_name('show_paging'); ?>" value="1" <?php checked( $o['show_paging'], 1 ); ?> />
113
  <label for="<?php echo $this->get_field_id('show_paging'); ?>"><?php _e('Show Paging') ?></label>
114
  </p>
115
+ <p>
116
+ <label for="<?php echo $this->get_field_id('readmore'); ?>"><?php _e('Read More Text:') ?></label>
117
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('readmore'); ?>" name="<?php echo $this->get_field_name('readmore'); ?>" value="<?php echo $o['readmore']; ?>" />
118
+ <span class="wcs-description">Enter button text. Leave blank if you do not want a button.</span>
119
+ </p>
120
+ <p>
121
+ <label for="<?php echo $this->get_field_id('button_class'); ?>"><?php _e('Button Class:') ?></label>
122
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('button_class'); ?>" name="<?php echo $this->get_field_name('button_class'); ?>" value="<?php echo $o['button_class']; ?>" />
123
+ <span class="wcs-description">Enter class name for custom CSS styling.</span>
124
+ </p>
125
  <p>
126
  <label for="<?php echo $this->get_field_id('size'); ?>"><?php _e('Image Size:'); ?></label>
127
  <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('size'); ?>" name="<?php echo $this->get_field_name('size'); ?>">
readme.txt CHANGED
@@ -113,6 +113,13 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
 
116
  = Version 3.28 =
117
 
118
  * Added style format for image links
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.29 =
117
+
118
+ * allowed sanitation of multiple pixel values
119
+ * added read more button to post shortcode
120
+ * updated sanitize for css_pixel
121
+ * updated accordion, toggle, and tabs, javascript
122
+
123
  = Version 3.28 =
124
 
125
  * Added style format for image links
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.28
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.29
9
  License: GPLv2 or later
10
  */
11