Shortcodes by Angie Makes - Version 3.37

Version Description

Download this release

Release Info

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

Code changes from version 3.36 to 3.37

README.md CHANGED
@@ -106,6 +106,11 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
106
 
107
  ## Changelog ##
108
 
 
 
 
 
 
109
  ### Version 3.36 ###
110
 
111
  * Added collage widget
106
 
107
  ## Changelog ##
108
 
109
+ ### Version 3.37 ###
110
+
111
+ * Added call to action.
112
+ * Added overflow hidden to collage wrapper.
113
+
114
  ### Version 3.36 ###
115
 
116
  * Added collage widget
admin/assets/css/wcvisualmanager.css CHANGED
@@ -41,6 +41,20 @@
41
  border-width: 0;
42
  padding: 0;
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  /**/
45
  html .wc-shortcodes-visual-manager,
46
  html .wc-shortcodes-visual-manager .ui-accordion,
41
  border-width: 0;
42
  padding: 0;
43
  }
44
+ .wc-shortcodes-visual-manager .wc-shortcodes-range-wrapper {
45
+ display: block;
46
+ float: left;
47
+ width: 100%;
48
+ }
49
+ .wc-shortcodes-visual-manager .wc-shortcodes-range-wrapper input {
50
+ width: 90%;
51
+ float: left;
52
+ }
53
+ .wc-shortcodes-visual-manager .wc-shortcodes-range-wrapper output {
54
+ width: 10%;
55
+ float: right;
56
+ text-align: right;
57
+ }
58
  /**/
59
  html .wc-shortcodes-visual-manager,
60
  html .wc-shortcodes-visual-manager .ui-accordion,
admin/assets/js/shortcodes-tinymce-4.js CHANGED
@@ -216,6 +216,13 @@
216
  wcShortcodes( shortcode, editor );
217
  }
218
  },
 
 
 
 
 
 
 
219
  {
220
  text: "Image Links",
221
  onclick: function(){
216
  wcShortcodes( shortcode, editor );
217
  }
218
  },
219
+ {
220
+ text: "Call To Action",
221
+ onclick: function(){
222
+ var shortcode = '[wc_call_to_action]' + wcParagraphContent + '[/wc_call_to_action]';
223
+ wcShortcodes( shortcode, editor );
224
+ }
225
+ },
226
  {
227
  text: "Image Links",
228
  onclick: function(){
admin/class-ajax.php CHANGED
@@ -241,6 +241,10 @@ class WPC_Shortcodes_Ajax {
241
  $widget = new WPC_Shortcodes_Widget_Image();
242
  $widget->form( $attr );
243
  break;
 
 
 
 
244
  case 'wc_image_links' :
245
  $widget = new WPC_Shortcodes_Widget_Image_Links();
246
  $widget->form( $attr );
241
  $widget = new WPC_Shortcodes_Widget_Image();
242
  $widget->form( $attr );
243
  break;
244
+ case 'wc_call_to_action' :
245
+ $widget = new WPC_Shortcodes_Widget_Call_To_Action();
246
+ $widget->form( $attr );
247
+ break;
248
  case 'wc_image_links' :
249
  $widget = new WPC_Shortcodes_Widget_Image_Links();
250
  $widget->form( $attr );
public/assets/css/style.css CHANGED
@@ -2005,6 +2005,7 @@ pre.pre-wrap {
2005
  * ----------------------------------------------------------------------------
2006
  */
2007
  .wc-shortcodes-collage-wrapper {
 
2008
  }
2009
  .wc-shortcodes-collage.wc-shortcodes-collage-template-collage1 {
2010
  }
@@ -2374,3 +2375,40 @@ pre.pre-wrap {
2374
  max-width: 400px;
2375
  margin: 0 auto;
2376
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2005
  * ----------------------------------------------------------------------------
2006
  */
2007
  .wc-shortcodes-collage-wrapper {
2008
+ overflow: hidden;
2009
  }
2010
  .wc-shortcodes-collage.wc-shortcodes-collage-template-collage1 {
2011
  }
2375
  max-width: 400px;
2376
  margin: 0 auto;
2377
  }
2378
+ /**
2379
+ * [wc_call_to_action]
2380
+ * ----------------------------------------------------------------------------
2381
+ */
2382
+ .wc-shortcodes-call-to-action-wrapper-inner {
2383
+ display: table;
2384
+ width: 100%;
2385
+ }
2386
+ .wc-shortcodes-call-to-action-wrapper .wcs-call-to-action-container {
2387
+ display: table-cell;
2388
+ vertical-align: middle;
2389
+ }
2390
+ .wc-shortcodes-call-to-action-image-position-left .wcs-call-to-action-image-inner {
2391
+ text-align: left;
2392
+ }
2393
+ .wc-shortcodes-call-to-action-image-position-center .wcs-call-to-action-image-inner {
2394
+ text-align: center;
2395
+ }
2396
+ .wc-shortcodes-call-to-action-image-position-right .wcs-call-to-action-image-inner {
2397
+ text-align: right;
2398
+ }
2399
+ .wc-shortcodes-call-to-action-text-position-left .wcs-call-to-action-content-wrapper {
2400
+ float: left;
2401
+ }
2402
+ .wc-shortcodes-call-to-action-text-position-center .wcs-call-to-action-content-wrapper {
2403
+ margin-left: auto;
2404
+ margin-right: auto;
2405
+ }
2406
+ .wc-shortcodes-call-to-action-text-position-right .wcs-call-to-action-content-wrapper {
2407
+ float: right;
2408
+ }
2409
+ .wcs-call-to-action-content-wrapper *:first-child {
2410
+ margin-top: 0;
2411
+ }
2412
+ .wcs-call-to-action-content-wrapper *:last-child {
2413
+ margin-bottom: 0;
2414
+ }
public/class-register.php CHANGED
@@ -84,6 +84,7 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
84
  add_shortcode( 'wc_column', array( &$this, 'column' ) );
85
  add_shortcode( 'wc_row', array( &$this, 'row' ) );
86
  add_shortcode( 'wc_center', array( &$this, 'center' ) );
 
87
  add_shortcode( 'wc_toggle', array( &$this, 'toggle' ) );
88
  add_shortcode( 'wc_accordion', array( &$this, 'accordion_main' ) );
89
  add_shortcode( 'wc_accordion_section', array( &$this, 'accordion_section' ) );
@@ -1660,6 +1661,82 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
1660
  return $html;
1661
  }
1662
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1663
  public function image_links( $atts ) {
1664
  $atts = shortcode_atts( parent::$attr->image_links, $atts );
1665
  $atts = WPC_Shortcodes_Sanitize::image_links_attr( $atts );
84
  add_shortcode( 'wc_column', array( &$this, 'column' ) );
85
  add_shortcode( 'wc_row', array( &$this, 'row' ) );
86
  add_shortcode( 'wc_center', array( &$this, 'center' ) );
87
+ add_shortcode( 'wc_call_to_action', array( &$this, 'call_to_action' ) );
88
  add_shortcode( 'wc_toggle', array( &$this, 'toggle' ) );
89
  add_shortcode( 'wc_accordion', array( &$this, 'accordion_main' ) );
90
  add_shortcode( 'wc_accordion_section', array( &$this, 'accordion_section' ) );
1661
  return $html;
1662
  }
1663
 
1664
+ public function call_to_action( $atts, $content = null ) {
1665
+ $atts = shortcode_atts( parent::$attr->call_to_action, $atts );
1666
+ $atts = WPC_Shortcodes_Sanitize::call_to_action_attr( $atts );
1667
+
1668
+ $gutter_margin = floor( $atts['gutter_spacing'] / 2 );
1669
+ if ( 'image_right' == $atts['style_format'] ) {
1670
+ $text_column = 'width:' . ( 100 - $atts['gutter_position'] ) . '%;';
1671
+ $text_column_inner = 'margin-right:' . $gutter_margin . 'px;';
1672
+ $image_column = 'width:' . $atts['gutter_position'] . '%;';
1673
+ $image_column_inner = 'margin-left:' . $gutter_margin . 'px;';
1674
+ }
1675
+ else {
1676
+ $text_column = 'width:' . $atts['gutter_position'] . '%;';
1677
+ $text_column_inner = 'margin-left:' . $gutter_margin . 'px;';
1678
+ $image_column = 'width:' . ( 100 - $atts['gutter_position'] ) . '%;';
1679
+ $image_column_inner = 'margin-right:' . $gutter_margin . 'px;';
1680
+ }
1681
+
1682
+ $image_max_width = '';
1683
+ if ( ! empty( $atts['image_max_width'] ) ) {
1684
+ $image_max_width = 'max-width:'.$atts['image_max_width'].';';
1685
+ }
1686
+ if ( ! empty( $atts['text_max_width'] ) ) {
1687
+ $text_max_width = 'max-width:'.$atts['text_max_width'].';';
1688
+ }
1689
+
1690
+ $html = '';
1691
+ $output = array();
1692
+ $srcset = '';
1693
+
1694
+ if ( ! empty( $atts['image_2x'] ) ) {
1695
+ $srcset = ' srcset="' . esc_url( $atts['image_2x'] ) . ' 2x"';
1696
+ }
1697
+
1698
+ $img = '<img style="'.$image_max_width.'" class="wcs-call-to-action-image" src="'.esc_url( $atts['image'] ).'"'.$srcset.' />';
1699
+
1700
+ $output[] = '<div class="wcs-call-to-action-image-container wcs-call-to-action-container" style="'.$image_column.'"><div style="'.$image_column_inner.'" class="wcs-call-to-action-image-inner">' . $img . '</div></div>';
1701
+
1702
+ $output[] = '<div class="wcs-call-to-action-text-container wcs-call-to-action-container" style="'.$text_column.'"><div style="'.$text_column_inner.'" class="wcs-call-to-action-text-inner"><div style="'.$text_max_width.'" class="wcs-call-to-action-content-wrapper">' . do_shortcode( $content ) . '</div></div></div>';
1703
+
1704
+ if ( 'image_right' == $atts['style_format'] ) {
1705
+ $output = array_reverse( $output );
1706
+ }
1707
+
1708
+ $output = implode( '', $output );
1709
+
1710
+ $style = array();
1711
+ if ( ! empty( $atts['padding_side'] ) ) {
1712
+ $style[] = 'padding-left:' . $atts['padding_side'] . ';';
1713
+ $style[] = 'padding-right:' . $atts['padding_side'] . ';';
1714
+ }
1715
+ if ( ! empty( $atts['padding_top'] ) ) {
1716
+ $style[] = 'padding-top:' . $atts['padding_top'] . ';';
1717
+ }
1718
+ if ( ! empty( $atts['padding_bottom'] ) ) {
1719
+ $style[] = 'padding-bottom:' . $atts['padding_bottom'] . ';';
1720
+ }
1721
+
1722
+ $classes = array();
1723
+ $classes[] = 'wc-shortcodes-call-to-action-wrapper';
1724
+ $classes[] = 'wc-shortcodes-call-to-action-format-'.$atts['style_format'];
1725
+ $classes[] = 'wc-shortcodes-call-to-action-image-position-'.$atts['image_position'];
1726
+ $classes[] = 'wc-shortcodes-call-to-action-text-position-'.$atts['text_position'];
1727
+ if ( ! empty( $atts['class'] ) ) {
1728
+ $classes = $atts['class'];
1729
+ }
1730
+
1731
+ $html .= '<div id="wc-shortcodes-call-to-action" class="'.implode( ' ', $classes ).'">';
1732
+ $html .= '<div class="wc-shortcodes-call-to-action-wrapper-inner wc-shortcodes-clearfix" style="'.implode( '', $style ).'">';
1733
+ $html .= $output;
1734
+ $html .= '</div>';
1735
+ $html .= '</div>';
1736
+
1737
+ return $html;
1738
+ }
1739
+
1740
  public function image_links( $atts ) {
1741
  $atts = shortcode_atts( parent::$attr->image_links, $atts );
1742
  $atts = WPC_Shortcodes_Sanitize::image_links_attr( $atts );
public/class-sanitize.php CHANGED
@@ -446,6 +446,15 @@ class WPC_Shortcodes_Sanitize {
446
  return $default;
447
  }
448
 
 
 
 
 
 
 
 
 
 
449
  public static function image_links_style_format( $value, $default = '' ) {
450
  $whitelist = WPC_Shortcodes_Widget_Options::image_links_style_format_values();
451
 
@@ -1025,6 +1034,56 @@ class WPC_Shortcodes_Sanitize {
1025
  return $atts;
1026
  }
1027
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1028
  public static function image_links_attr( $atts ) {
1029
  foreach ( $atts as $key => $value ) {
1030
  switch( $key ) {
446
  return $default;
447
  }
448
 
449
+ public static function call_to_action_style_format( $value, $default = '' ) {
450
+ $whitelist = WPC_Shortcodes_Widget_Options::call_to_action_style_format_values();
451
+
452
+ if ( array_key_exists( $value, $whitelist ) )
453
+ return $value;
454
+
455
+ return $default;
456
+ }
457
+
458
  public static function image_links_style_format( $value, $default = '' ) {
459
  $whitelist = WPC_Shortcodes_Widget_Options::image_links_style_format_values();
460
 
1034
  return $atts;
1035
  }
1036
 
1037
+ public static function call_to_action_attr( $atts ) {
1038
+ foreach ( $atts as $key => $value ) {
1039
+ switch( $key ) {
1040
+ // image 1
1041
+ case 'image' :
1042
+ $atts[ $key ] = esc_url_raw( $value );
1043
+ break;
1044
+ case 'image_2x' :
1045
+ $atts[ $key ] = esc_url_raw( $value );
1046
+ break;
1047
+ case 'image_max_width' :
1048
+ $atts[ $key ] = self::css_unit( $value );
1049
+ break;
1050
+ case 'image_position' :
1051
+ $atts[ $key ] = self::text_align( $value );
1052
+ break;
1053
+ // Settings
1054
+ case 'style_format' :
1055
+ $atts[ $key ] = self::call_to_action_style_format( $value );
1056
+ break;
1057
+ case 'text_max_width' :
1058
+ $atts[ $key ] = self::css_unit( $value );
1059
+ break;
1060
+ case 'text_position' :
1061
+ $atts[ $key ] = self::text_align( $value );
1062
+ break;
1063
+ case 'gutter_position' :
1064
+ $atts[ $key ] = self::percentage( $value );
1065
+ break;
1066
+ case 'gutter_spacing' :
1067
+ $atts[ $key ] = self::positive_number( $value );
1068
+ break;
1069
+ case 'padding_top' :
1070
+ $atts[ $key ] = self::css_unit( $value );
1071
+ break;
1072
+ case 'padding_bottom' :
1073
+ $atts[ $key ] = self::css_unit( $value );
1074
+ break;
1075
+ case 'padding_side' :
1076
+ $atts[ $key ] = self::css_unit( $value );
1077
+ break;
1078
+ case 'class' :
1079
+ $atts[ $key ] = self::html_classes( $value );
1080
+ break;
1081
+ }
1082
+ }
1083
+
1084
+ return $atts;
1085
+ }
1086
+
1087
  public static function image_links_attr( $atts ) {
1088
  foreach ( $atts as $key => $value ) {
1089
  switch( $key ) {
public/class-vars.php CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
8
  *
9
  * @var string
10
  */
11
- const VERSION = '3.36';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
@@ -359,6 +359,23 @@ class WPC_Shortcodes_Vars {
359
  'slider_pause' => 4000,
360
  'slider_auto' => 0,
361
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  self::$attr->image_links = array(
363
  // image 1
364
  'image_1' => '',
8
  *
9
  * @var string
10
  */
11
+ const VERSION = '3.37';
12
  const DB_VERSION = '1.0';
13
 
14
  /**
359
  'slider_pause' => 4000,
360
  'slider_auto' => 0,
361
  );
362
+ self::$attr->call_to_action = array(
363
+ // image
364
+ 'image' => '',
365
+ 'image_2x' => '',
366
+ 'image_max_width' => '200px',
367
+ 'image_position' => 'left',
368
+ // settings
369
+ 'style_format' => 'image_left',
370
+ 'text_max_width' => '200px',
371
+ 'text_position' => 'center',
372
+ 'gutter_position' => '50',
373
+ 'gutter_spacing' => '80',
374
+ 'padding_top' => '20px',
375
+ 'padding_bottom' => '20px',
376
+ 'padding_side' => '20px',
377
+ 'class' => '',
378
+ );
379
  self::$attr->image_links = array(
380
  // image 1
381
  'image_1' => '',
public/class-widget-options.php CHANGED
@@ -41,6 +41,13 @@ class WPC_Shortcodes_Widget_Options {
41
  );
42
  }
43
 
 
 
 
 
 
 
 
44
  public static function image_links_style_format_values() {
45
  return array(
46
  'row' => 'Row',
41
  );
42
  }
43
 
44
+ public static function call_to_action_style_format_values() {
45
+ return array(
46
+ 'image_left' => 'Image | Text',
47
+ 'image_right' => 'Text | Image',
48
+ );
49
+ }
50
+
51
  public static function image_links_style_format_values() {
52
  return array(
53
  'row' => 'Row',
public/widgets/widget-call-to-action.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @uses WP
4
+ * @uses _Widget
5
+ */
6
+ class WPC_Shortcodes_Widget_Call_To_Action extends WPC_Shortcodes_Widget_Base {
7
+ function form( $instance ) {
8
+ // array_merge needs both values to be array.
9
+ if ( ! is_array( $instance ) ) {
10
+ $instance = array();
11
+ }
12
+
13
+ $o = array_merge( WPC_Shortcodes_Vars::$attr->call_to_action, $instance );
14
+ $o = WPC_Shortcodes_Sanitize::call_to_action_attr( $o );
15
+
16
+ ?>
17
+
18
+ <div id="wc-shortcodes-call-to-action-widget-<?php echo $this->number; ?>" class="wc-shortcodes-visual-manager wpc-image-wrapper wpc-ui-theme-override">
19
+ <?php
20
+ $imagestyle = '';
21
+ if ( empty( $o['image'] ) ) {
22
+ $imagestyle = ' style="display:none"';
23
+ }
24
+ ?>
25
+ <div class="wpc-widgets-image-field">
26
+ <label for="<?php echo $this->get_field_id( 'image' ); ?>"><?php echo _e( 'Image URL:' ); ?>
27
+ <input class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" type="text" value="<?php echo esc_url( $o['image'] ); ?>" />
28
+ </label>
29
+ <a class="wpc-widgets-image-upload button inline-button" data-target="#<?php echo $this->get_field_id( 'image' ); ?>" data-preview=".wpc-widgets-preview-image" data-frame="select" data-state="wpc_widgets_insert_single" data-fetch="url" data-title="Insert Image" data-button="Insert" data-class="media-frame wpc-widgets-custom-uploader" title="Add Media">Add Media</a>
30
+ <a class="button wpc-widgets-delete-image" data-target="#<?php echo $this->get_field_id( 'image' ); ?>" data-preview=".wpc-widgets-preview-image">Delete</a>
31
+ <div class="wpc-widgets-preview-image"<?php echo $imagestyle; ?>><img src="<?php echo esc_url($o['image']); ?>" /></div>
32
+ </div>
33
+ <?php
34
+ $imagestyle = '';
35
+ if ( empty( $o['image_2x'] ) ) {
36
+ $imagestyle = ' style="display:none"';
37
+ }
38
+ ?>
39
+ <div class="wpc-widgets-image-field">
40
+ <label for="<?php echo $this->get_field_id( 'image_2x' ); ?>"><?php echo _e( 'Retina Image URL:' ); ?>
41
+ <input class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id( 'image_2x' ); ?>" name="<?php echo $this->get_field_name( 'image_2x' ); ?>" type="text" value="<?php echo esc_url( $o['image_2x'] ); ?>" />
42
+ </label>
43
+ <a class="wpc-widgets-image-upload button inline-button" data-target="#<?php echo $this->get_field_id( 'image_2x' ); ?>" data-preview=".wpc-widgets-preview-image" data-frame="select" data-state="wpc_widgets_insert_single" data-fetch="url" data-title="Insert Image" data-button="Insert" data-class="media-frame wpc-widgets-custom-uploader" title="Add Media">Add Media</a>
44
+ <a class="button wpc-widgets-delete-image" data-target="#<?php echo $this->get_field_id( 'image_2x' ); ?>" data-preview=".wpc-widgets-preview-image">Delete</a>
45
+ <div class="wpc-widgets-preview-image"<?php echo $imagestyle; ?>><img src="<?php echo esc_url($o['image_2x']); ?>" /></div>
46
+ </div>
47
+ <p>
48
+ <label for="<?php echo $this->get_field_id('image_max_width'); ?>"><?php _e('Image Max Width:') ?></label>
49
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('image_max_width'); ?>" name="<?php echo $this->get_field_name('image_max_width'); ?>" value="<?php echo $o['image_max_width']; ?>" />
50
+ <span class="wcs-description">Enter CSS unit value.</span>
51
+ </p>
52
+ <p>
53
+ <label for="<?php echo $this->get_field_id('image_position'); ?>"><?php _e('Image Position:'); ?></label>
54
+ <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('image_position'); ?>" name="<?php echo $this->get_field_name('image_position'); ?>">
55
+ <?php foreach ( WPC_Shortcodes_Widget_Options::text_align_values() as $key => $value ) : ?>
56
+ <option value="<?php echo $key; ?>"<?php selected( $o['image_position'], $key ); ?>><?php echo $value; ?></option>';
57
+ <?php endforeach; ?>
58
+ </select>
59
+ </p>
60
+ <p>
61
+ <label for="<?php echo $this->get_field_id('style_format'); ?>"><?php _e('Style Format:'); ?></label>
62
+ <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('style_format'); ?>" name="<?php echo $this->get_field_name('style_format'); ?>">
63
+ <?php foreach ( WPC_Shortcodes_Widget_Options::call_to_action_style_format_values() as $key => $value ) : ?>
64
+ <option value="<?php echo $key; ?>"<?php selected( $o['style_format'], $key ); ?>><?php echo $value; ?></option>';
65
+ <?php endforeach; ?>
66
+ </select>
67
+ </p>
68
+ <p>
69
+ <label for="<?php echo $this->get_field_id('text_max_width'); ?>"><?php _e('Text Max Width:') ?></label>
70
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('text_max_width'); ?>" name="<?php echo $this->get_field_name('text_max_width'); ?>" value="<?php echo $o['text_max_width']; ?>" />
71
+ <span class="wcs-description">Enter CSS unit value.</span>
72
+ </p>
73
+ <p>
74
+ <label for="<?php echo $this->get_field_id('text_position'); ?>"><?php _e('Text Position:'); ?></label>
75
+ <select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('text_position'); ?>" name="<?php echo $this->get_field_name('text_position'); ?>">
76
+ <?php foreach ( WPC_Shortcodes_Widget_Options::text_align_values() as $key => $value ) : ?>
77
+ <option value="<?php echo $key; ?>"<?php selected( $o['text_position'], $key ); ?>><?php echo $value; ?></option>';
78
+ <?php endforeach; ?>
79
+ </select>
80
+ </p>
81
+ <div>
82
+ <label for="<?php echo $this->get_field_id('gutter_position'); ?>"><?php _e('Gutter Position:') ?></label>
83
+ <div class="wc-shortcodes-range-wrapper clear">
84
+ <input type="range" min="0" max="100" step="1" class="wc-shortcodes-widget-option wc-shortcodes-range-input widefat" id="<?php echo $this->get_field_id('gutter_position'); ?>" name="<?php echo $this->get_field_name('gutter_position'); ?>" data-output="<?php echo $this->get_field_id('gutter_position'); ?>-output" value="<?php echo $o['gutter_position']; ?>" />
85
+ <output id="<?php echo $this->get_field_id('gutter_position'); ?>-output"><?php echo $o['gutter_position']; ?></output>
86
+ </div>
87
+ <span class="wcs-description">This will determine the percent width for the left and right side.</span>
88
+ </div>
89
+ <p>
90
+ <label for="<?php echo $this->get_field_id('gutter_spacing'); ?>"><?php _e('Gutter Spacing:') ?></label>
91
+ <input type="number" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('gutter_spacing'); ?>" name="<?php echo $this->get_field_name('gutter_spacing'); ?>" value="<?php echo $o['gutter_spacing']; ?>" />
92
+ <span class="wcs-description">Enter CSS unit value.</span>
93
+ </p>
94
+ <p>
95
+ <label for="<?php echo $this->get_field_id('padding_top'); ?>"><?php _e('Padding Top:') ?></label>
96
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('padding_top'); ?>" name="<?php echo $this->get_field_name('padding_top'); ?>" value="<?php echo $o['padding_top']; ?>" />
97
+ <span class="wcs-description">Enter CSS unit value.</span>
98
+ </p>
99
+ <p>
100
+ <label for="<?php echo $this->get_field_id('padding_bottom'); ?>"><?php _e('Padding Bottom:') ?></label>
101
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('padding_bottom'); ?>" name="<?php echo $this->get_field_name('padding_bottom'); ?>" value="<?php echo $o['padding_bottom']; ?>" />
102
+ <span class="wcs-description">Enter CSS unit value.</span>
103
+ </p>
104
+ <p>
105
+ <label for="<?php echo $this->get_field_id('padding_side'); ?>"><?php _e('Padding Side:') ?></label>
106
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('padding_side'); ?>" name="<?php echo $this->get_field_name('padding_side'); ?>" value="<?php echo $o['padding_side']; ?>" />
107
+ <span class="wcs-description">Enter CSS unit value.</span>
108
+ </p>
109
+ <p>
110
+ <label for="<?php echo $this->get_field_id('class'); ?>"><?php _e('Class:') ?></label>
111
+ <input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('class'); ?>" name="<?php echo $this->get_field_name('class'); ?>" value="<?php echo $o['class']; ?>" />
112
+ <span class="wcs-description">Enter class name for custom CSS styling.</span>
113
+ </p>
114
+ </div>
115
+
116
+ <script type="text/javascript">
117
+ /* <![CDATA[ */
118
+ jQuery(document).ready(function($){
119
+ $('.wc-shortcodes-range-input').on( 'input', function() {
120
+ var $this = $(this);
121
+ var id = $this.data('output');
122
+ if ( typeof id == 'string' ) {
123
+ var $output = $('#' + id);
124
+ console.log('#' + id);
125
+ if ( $output.length ) {
126
+ var val = $this.val();
127
+ console.log($output);
128
+ console.log(val);
129
+ $output.val( val );
130
+ }
131
+ }
132
+ });
133
+ });
134
+ /* ]]> */
135
+ </script>
136
+ <?php
137
+ }
138
+ }
readme.txt CHANGED
@@ -113,6 +113,11 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
116
  = Version 3.36 =
117
 
118
  * Added collage widget
113
 
114
  == Changelog ==
115
 
116
+ = Version 3.37 =
117
+
118
+ * Added call to action.
119
+ * Added overflow hidden to collage wrapper.
120
+
121
  = Version 3.36 =
122
 
123
  * Added collage widget
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.36
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.37
9
  License: GPLv2 or later
10
  */
11