Shortcodes by Angie Makes - Version 1.28

Version Description

Download this release

Release Info

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

Code changes from version 1.27 to 1.28

README.md CHANGED
@@ -65,6 +65,10 @@ Use the shortcode manager in the TinyMCE text editor
65
 
66
  ## Changelog ##
67
 
 
 
 
 
68
  ### Version 1.27
69
 
70
  * Removed non GPL library.
65
 
66
  ## Changelog ##
67
 
68
+ ### Version 1.28
69
+
70
+ * Added ability to add custom class to buttons.
71
+
72
  ### Version 1.27
73
 
74
  * Removed non GPL library.
includes/shortcode-functions.php CHANGED
@@ -405,8 +405,11 @@ if( !function_exists('wc_shortcodes_button') ) {
405
  'icon_left' => '',
406
  'icon_right' => '',
407
  'position' => 'float',
 
408
  ), $atts ) );
409
 
 
 
410
  $whitelist = array( 'center', 'left', 'right' );
411
 
412
  // $border_radius_style = ( $border_radius ) ? 'style="border-radius:'. $border_radius .'"' : NULL;
@@ -417,6 +420,8 @@ if( !function_exists('wc_shortcodes_button') ) {
417
  $class[] = 'wc-shortcodes-button';
418
  $class[] = $type;
419
  $class[] = 'wc-shortcodes-button-position-' . $position;
 
 
420
 
421
  $button = NULL;
422
  $button .= '<a href="' . $url . '" class="'.implode( ' ', $class ).'" target="_'.$target.'" title="'. $title .'" '. $rel .'>';
@@ -712,15 +717,15 @@ if( !function_exists('wc_shortcodes_pricing') ) {
712
  function wc_shortcodes_pricing( $atts, $content = null ) {
713
 
714
  extract( shortcode_atts( array(
715
- 'type' => 'primary',
716
- 'plan' => 'Basic',
717
- 'cost' => '$20',
718
- 'per' => 'month',
719
- 'button_url' => '',
720
- 'button_text' => 'Purchase',
721
- 'button_target' => 'self',
722
- 'button_rel' => 'nofollow',
723
- 'class' => '',
724
  ), $atts ) );
725
 
726
  //start content
405
  'icon_left' => '',
406
  'icon_right' => '',
407
  'position' => 'float',
408
+ 'class' => '',
409
  ), $atts ) );
410
 
411
+ $custom_class = sanitize_title( $class );
412
+
413
  $whitelist = array( 'center', 'left', 'right' );
414
 
415
  // $border_radius_style = ( $border_radius ) ? 'style="border-radius:'. $border_radius .'"' : NULL;
420
  $class[] = 'wc-shortcodes-button';
421
  $class[] = $type;
422
  $class[] = 'wc-shortcodes-button-position-' . $position;
423
+ if ( ! empty( $custom_class ) )
424
+ $class[] = $custom_class;
425
 
426
  $button = NULL;
427
  $button .= '<a href="' . $url . '" class="'.implode( ' ', $class ).'" target="_'.$target.'" title="'. $title .'" '. $rel .'>';
717
  function wc_shortcodes_pricing( $atts, $content = null ) {
718
 
719
  extract( shortcode_atts( array(
720
+ 'type' => 'primary', // primary, secondary, inverse
721
+ 'plan' => 'Basic', // string
722
+ 'cost' => '$20', // string
723
+ 'per' => 'month', // month, day, year, week, etc
724
+ 'button_url' => '', // url to payment gateway
725
+ 'button_text' => 'Purchase', // call to action button
726
+ 'button_target' => 'self', // self, blank
727
+ 'button_rel' => 'nofollow', // alternate, author, bookmark, help, license, next, nofollow, noreferrer, prefetch, prev, search, tag
728
+ 'class' => '', // add your own css class for customization.
729
  ), $atts ) );
730
 
731
  //start content
readme.txt CHANGED
@@ -86,6 +86,10 @@ Use the shortcode manager in the TinyMCE text editor
86
 
87
  == Changelog ==
88
 
 
 
 
 
89
  ### Version 1.27
90
 
91
  * Removed non GPL library.
86
 
87
  == Changelog ==
88
 
89
+ ### Version 1.28
90
+
91
+ * Added ability to add custom class to buttons.
92
+
93
  ### Version 1.27
94
 
95
  * Removed non GPL library.
wc-shortcodes.php CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://wordpresscanvas.com/features/shortcodes/
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 1.27
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_SHORTCODES_VERSION', '1.27' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 1.28
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_SHORTCODES_VERSION', '1.28' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );