Shortcodes by Angie Makes - Version 1.39

Version Description

Download this release

Release Info

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

Code changes from version 1.38 to 1.39

README.md CHANGED
@@ -37,11 +37,11 @@ Enhance your pages and posts with the following features.
37
  * Isotope / Masonry Posts
38
  * Font Awesome Icons
39
 
40
- [Live Demo & Documentation](http://wordpresscanvas.com/features/shortcodes/)
41
 
42
  ### Professional Support
43
 
44
- If you need professional plugin support from me, the plugin author, you can contact me at [WordPress Canvas](http://wordpresscanvas.com/).
45
 
46
  ### Plugin Development
47
 
@@ -66,6 +66,11 @@ Use the shortcode manager in the TinyMCE text editor
66
 
67
  ## Changelog ##
68
 
 
 
 
 
 
69
  ### Version 1.38
70
 
71
  * Made an update to the responsive behavior of wc_posts short code
37
  * Isotope / Masonry Posts
38
  * Font Awesome Icons
39
 
40
+ [Live Demo & Documentation](http://webplantmedia.com/starter-themes/wordpresscanvas/features/shortcodes/)
41
 
42
  ### Professional Support
43
 
44
+ If you need professional plugin support from me, the plugin author, you can contact me at [Web Plant Media](http://webplantmedia.com/).
45
 
46
  ### Plugin Development
47
 
66
 
67
  ## Changelog ##
68
 
69
+ ### Version 1.39
70
+
71
+ * Removed query ui for tabs and added custom tab script.
72
+ * Removed query ui for accordion. Using custom built accordion script.
73
+
74
  ### Version 1.38
75
 
76
  * Made an update to the responsive behavior of wc_posts short code
includes/css/style.css CHANGED
@@ -63,34 +63,25 @@
63
  .wc-shortcodes-font-awesome-enabled .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger a:hover:before {
64
  text-decoration: none;
65
  }
66
- .wc-shortcodes-font-awesome-enabled .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-accordion-header-active a:before {
67
  content: "\f107";
68
  }
69
-
70
  .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger:first-child {
71
  margin-top: 0;
72
  }
73
- .wc-shortcodes-accordion .ui-state-focus {
74
- outline: none
75
- }
76
- .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-state-hover { }
77
- .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-state-active { }
78
- .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.ui-state-active a { }
79
  .wc-shortcodes-accordion .wc-shortcodes-accordion-content {
80
  padding: 20px;
81
  border: 1px solid #cccccc;
82
  border-top: 0px;
 
83
  }
84
  .wc-shortcodes-accordion.wc-shortcodes-accordion-layout-none .wc-shortcodes-accordion-content {
85
  padding: 20px 0;
86
  border-width: 0;
87
  }
88
- .wc-shortcodes-accordion .ui-accordion-content *:last-child {
89
  margin-bottom: 0
90
  }
91
- .wc-shortcodes-accordion .ui-icon {
92
- position: absolute;
93
- }
94
 
95
 
96
  /**
@@ -175,13 +166,13 @@
175
  .wc-shortcodes-tabs {
176
  margin-bottom: 20px;
177
  }
178
- .wc-shortcodes-tabs ul.ui-tabs-nav {
179
  display: block;
180
  margin: 0;
181
  padding: 0;
182
  border-bottom: solid 1px #cccccc;
183
  }
184
- .wc-shortcodes-tabs ul.ui-tabs-nav li {
185
  display: block;
186
  width: auto;
187
  padding: 0;
@@ -189,7 +180,7 @@
189
  margin: 0 0 -1px 0;
190
  outline: none;
191
  }
192
- .wc-shortcodes-tabs ul.ui-tabs-nav li a {
193
  display: block;
194
  width: auto;
195
  padding: 10px 20px;
@@ -198,19 +189,18 @@
198
  margin-right: 3px;
199
  outline: none;
200
  }
201
- .wc-shortcodes-tabs ul.ui-tabs-nav li a:hover { }
202
- .wc-shortcodes-tabs ul.ui-tabs-nav .ui-state-active a {
203
  background-color: #ffffff;
204
  border-bottom-width: 0;
205
  border-bottom-color: transparent;
206
  }
207
- .wc-shortcodes-tabs ul.ui-tabs-nav .ui-state-active a:hover { }
208
  .wc-shortcodes-tabs .tab-content {
209
  background: #ffffff;
210
  padding: 20px;
211
  border-left: solid 1px #cccccc;
212
  border-right: solid 1px #cccccc;
213
  border-bottom: solid 1px #cccccc;
 
214
  }
215
  .wc-shortcodes-tabs.wc-shortcodes-tabs-layout-none .tab-content {
216
  padding: 20px 0;
@@ -219,9 +209,6 @@
219
  .wc-shortcodes-tabs .tab-content *:last-child {
220
  margin-bottom: 0
221
  }
222
- .wc-shortcodes-tabs .ui-tabs-hide {
223
- display: none
224
- }
225
 
226
 
227
  /**
63
  .wc-shortcodes-font-awesome-enabled .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger a:hover:before {
64
  text-decoration: none;
65
  }
66
+ .wc-shortcodes-font-awesome-enabled .wc-shortcodes-accordion .wc-shortcodes-accordion-trigger.wc-shortcodes-accordion-header-active a:before {
67
  content: "\f107";
68
  }
 
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;
80
  border-width: 0;
81
  }
82
+ .wc-shortcodes-accordion .wc-shortcodes-accordion-content *:last-child {
83
  margin-bottom: 0
84
  }
 
 
 
85
 
86
 
87
  /**
166
  .wc-shortcodes-tabs {
167
  margin-bottom: 20px;
168
  }
169
+ .wc-shortcodes-tabs ul.wcs-tabs-nav {
170
  display: block;
171
  margin: 0;
172
  padding: 0;
173
  border-bottom: solid 1px #cccccc;
174
  }
175
+ .wc-shortcodes-tabs ul.wcs-tabs-nav li {
176
  display: block;
177
  width: auto;
178
  padding: 0;
180
  margin: 0 0 -1px 0;
181
  outline: none;
182
  }
183
+ .wc-shortcodes-tabs ul.wcs-tabs-nav li a {
184
  display: block;
185
  width: auto;
186
  padding: 10px 20px;
189
  margin-right: 3px;
190
  outline: none;
191
  }
192
+ .wc-shortcodes-tabs ul.wcs-tabs-nav .wcs-state-active a {
 
193
  background-color: #ffffff;
194
  border-bottom-width: 0;
195
  border-bottom-color: transparent;
196
  }
 
197
  .wc-shortcodes-tabs .tab-content {
198
  background: #ffffff;
199
  padding: 20px;
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;
209
  .wc-shortcodes-tabs .tab-content *:last-child {
210
  margin-bottom: 0
211
  }
 
 
 
212
 
213
 
214
  /**
includes/js/accordion.js CHANGED
@@ -1 +1,50 @@
1
- ( function( $ ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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');
12
+
13
+ if ( 'collapse' == startState ) {
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 ){
22
+ event.preventDefault();
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
+ });
48
+ });
49
+ });
50
+ } )( jQuery );
includes/js/tabs.js CHANGED
@@ -1 +1,28 @@
1
- jQuery(function($){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+ "use strict";
3
+
4
+ $(document).ready(function(){
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 ){
14
+ event.preventDefault();
15
+
16
+ var $this = $(this);
17
+ var index = parseInt( $this.data('index') );
18
+ var $target = $content.eq(index);
19
+
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
+ });
27
+ });
28
+ } )( jQuery );
includes/mce/js/shortcodes-tinymce-4.js CHANGED
@@ -293,13 +293,13 @@
293
  {
294
  text: "Accordion",
295
  onclick: function(){
296
- editor.insertContent('[wc_accordion collapse="0" layout="box"]<p>[wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p>[/wc_accordion]');
297
  }
298
  },
299
  {
300
  text: "Tabs",
301
  onclick: function(){
302
- editor.insertContent('[wc_tabgroup layout="box"][wc_tab title="First Tab"]'+wcParagraphContent+'<p>[/wc_tab][wc_tab title="Second Tab"]</p>'+wcParagraphContent+'[/wc_tab][/wc_tabgroup]');
303
  }
304
  },
305
  {
293
  {
294
  text: "Accordion",
295
  onclick: function(){
296
+ editor.insertContent('[wc_accordion collapse="0" leaveopen="0" layout="box"]<p>[wc_accordion_section title="Section 1"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p><p>[wc_accordion_section title="Section 2"]</p>' + wcParagraphContent + '<p>[/wc_accordion_section]</p>[/wc_accordion]');
297
  }
298
  },
299
  {
300
  text: "Tabs",
301
  onclick: function(){
302
+ editor.insertContent('[wc_tabgroup layout="box"]<p>[wc_tab title="First Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab]</p><p>[wc_tab title="Second Tab"]</p>'+wcParagraphContent+'<p>[/wc_tab]</p>[/wc_tabgroup]');
303
  }
304
  },
305
  {
includes/scripts.php CHANGED
@@ -12,9 +12,9 @@ if( ! function_exists('wc_shortcodes_scripts') ) :
12
  }
13
 
14
  wp_enqueue_script('jquery');
15
- wp_register_script( 'wc-shortcodes-tabs', plugin_dir_url( __FILE__ ) . 'js/tabs.js', array ( 'jquery', 'jquery-ui-tabs'), $ver, true );
16
  wp_register_script( 'wc-shortcodes-toggle', plugin_dir_url( __FILE__ ) . 'js/toggle.js', 'jquery', $ver, true );
17
- wp_register_script( 'wc-shortcodes-accordion', plugin_dir_url( __FILE__ ) . 'js/accordion.js', array ( 'jquery', 'jquery-ui-accordion'), $ver, true );
18
  wp_register_script( 'wc-shortcodes-prettify', plugin_dir_url( __FILE__ ) . 'js/prettify.js', array ( ), $ver, true );
19
  wp_register_script( 'wc-shortcodes-pre', plugin_dir_url( __FILE__ ) . 'js/pre.js', array ( 'jquery' ), $ver, true );
20
  wp_register_script( 'wc-shortcodes-googlemap', plugin_dir_url( __FILE__ ) . 'js/googlemap.js', array('jquery'), $ver, true);
12
  }
13
 
14
  wp_enqueue_script('jquery');
15
+ wp_register_script( 'wc-shortcodes-tabs', plugin_dir_url( __FILE__ ) . 'js/tabs.js', array ( 'jquery' ), $ver, true );
16
  wp_register_script( 'wc-shortcodes-toggle', plugin_dir_url( __FILE__ ) . 'js/toggle.js', 'jquery', $ver, true );
17
+ wp_register_script( 'wc-shortcodes-accordion', plugin_dir_url( __FILE__ ) . 'js/accordion.js', array ( 'jquery' ), $ver, true );
18
  wp_register_script( 'wc-shortcodes-prettify', plugin_dir_url( __FILE__ ) . 'js/prettify.js', array ( ), $ver, true );
19
  wp_register_script( 'wc-shortcodes-pre', plugin_dir_url( __FILE__ ) . 'js/pre.js', array ( 'jquery' ), $ver, true );
20
  wp_register_script( 'wc-shortcodes-googlemap', plugin_dir_url( __FILE__ ) . 'js/googlemap.js', array('jquery'), $ver, true);
includes/shortcode-functions.php CHANGED
@@ -631,6 +631,7 @@ if( !function_exists('wc_shortcodes_accordion_main') ) {
631
  extract( shortcode_atts( array(
632
  'class' => '',
633
  'collapse' => 0,
 
634
  'layout' => 'box',
635
  ), $atts ) );
636
 
@@ -638,10 +639,19 @@ if( !function_exists('wc_shortcodes_accordion_main') ) {
638
 
639
  $classes[] = 'wc-shortcodes-accordion';
640
 
641
- if ( (int) $collapse )
 
 
 
 
 
 
642
  $classes[] = 'wc-shortcodes-accordion-collapse';
643
- else
 
 
644
  $classes[] = 'wc-shortcodes-accordion-default';
 
645
 
646
  if ( ! empty( $class ) )
647
  $classes[] = $class;
@@ -655,7 +665,7 @@ if( !function_exists('wc_shortcodes_accordion_main') ) {
655
  wp_enqueue_script('wc-shortcodes-accordion');
656
 
657
  // Display the accordion
658
- return '<div class="'. $class .'">' . do_shortcode($content) . '</div>';
659
  }
660
  }
661
 
@@ -712,9 +722,10 @@ if (!function_exists('wc_shortcodes_tabgroup')) {
712
  $output = '';
713
  if( count($tab_titles) ){
714
  $output .= '<div id="wc-shortcodes-tab-'. $instance .'" class="'.$class.'">';
715
- $output .= '<ul class="ui-tabs-nav wc-shortcodes-clearfix">';
 
716
  foreach( $tab_titles as $tab ){
717
- $output .= '<li><a href="#wc-shortcodes-tab-'. sanitize_title( $tab[0] ) .'">' . $tab[0] . '</a></li>';
718
  }
719
  $output .= '</ul>';
720
  $output .= do_shortcode( $content );
631
  extract( shortcode_atts( array(
632
  'class' => '',
633
  'collapse' => 0,
634
+ 'leaveopen' => 0,
635
  'layout' => 'box',
636
  ), $atts ) );
637
 
639
 
640
  $classes[] = 'wc-shortcodes-accordion';
641
 
642
+ $behavior = 'autoclose';
643
+ if ( (int) $leaveopen ) {
644
+ $behavior = 'leaveopen';
645
+ }
646
+
647
+ $state = 'default';
648
+ if ( (int) $collapse ) {
649
  $classes[] = 'wc-shortcodes-accordion-collapse';
650
+ $state = 'collapse';
651
+ }
652
+ else {
653
  $classes[] = 'wc-shortcodes-accordion-default';
654
+ }
655
 
656
  if ( ! empty( $class ) )
657
  $classes[] = $class;
665
  wp_enqueue_script('wc-shortcodes-accordion');
666
 
667
  // Display the accordion
668
+ return '<div class="'. $class .'" data-behavior="'.$behavior.'" data-start-state="'.$state.'">' . do_shortcode($content) . '</div>';
669
  }
670
  }
671
 
722
  $output = '';
723
  if( count($tab_titles) ){
724
  $output .= '<div id="wc-shortcodes-tab-'. $instance .'" class="'.$class.'">';
725
+ $output .= '<ul class="wcs-tabs-nav wc-shortcodes-clearfix">';
726
+ $i = 0;
727
  foreach( $tab_titles as $tab ){
728
+ $output .= '<li><a href="#" data-index="'.$i++.'" data-id="#wc-shortcodes-tab-'. sanitize_title( $tab[0] ) .'">' . $tab[0] . '</a></li>';
729
  }
730
  $output .= '</ul>';
731
  $output .= do_shortcode( $content );
readme.txt CHANGED
@@ -37,11 +37,11 @@ Enhance your pages and posts with the following features.
37
  * Isotope / Masonry Posts
38
  * Font Awesome Icons
39
 
40
- [Live Demo & Documentation](http://wordpresscanvas.com/features/shortcodes/)
41
 
42
  ### Professional Support
43
 
44
- If you need professional plugin support from me, the plugin author, you can contact me at [WordPress Canvas](http://wordpresscanvas.com/).
45
 
46
  ### Plugin Development
47
 
@@ -88,6 +88,11 @@ Use the shortcode manager in the TinyMCE text editor
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
91
  ### Version 1.38
92
 
93
  * Made an update to the responsive behavior of wc_posts short code
37
  * Isotope / Masonry Posts
38
  * Font Awesome Icons
39
 
40
+ [Live Demo & Documentation](http://webplantmedia.com/starter-themes/wordpresscanvas/features/shortcodes/)
41
 
42
  ### Professional Support
43
 
44
+ If you need professional plugin support from me, the plugin author, you can contact me at [Web Plant Media](http://webplantmedia.com/).
45
 
46
  ### Plugin Development
47
 
88
 
89
  == Changelog ==
90
 
91
+ ### Version 1.39
92
+
93
+ * Removed query ui for tabs and added custom tab script.
94
+ * Removed query ui for accordion. Using custom built accordion script.
95
+
96
  ### Version 1.38
97
 
98
  * Made an update to the responsive behavior of wc_posts short code
wc-shortcodes.php CHANGED
@@ -1,15 +1,15 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Canvas - Shortcodes
4
- 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.38
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_SHORTCODES_VERSION', '1.38' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
1
  <?php
2
  /*
3
  Plugin Name: WP Canvas - Shortcodes
4
+ Plugin URI: http://webplantmedia.com/starter-themes/wordpresscanvas/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.39
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_SHORTCODES_VERSION', '1.39' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );