Genesis Columns Advanced - Version 1.1.0

Version Description

  • Added class attributes to all shortcodes
  • Added the columns container utility shortcode
Download this release

Release Info

Developer ndiego
Plugin Icon 128x128 Genesis Columns Advanced
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.3 to 1.1.0

gca-shortcodes.php CHANGED
@@ -13,135 +13,165 @@ function gca_strip_autop( $content ){
13
  // Utility Shortcodes
14
 
15
  function gca_clearfix( $atts ) {
16
- return '<div class="clearfix"></div>';
 
17
  }
18
- add_shortcode('clearfix','gca_clearfix');
19
 
20
  function gca_spacer( $atts ) {
21
- return '<div class="gca-vertical-spacer" style="clear: both; margin-bottom: 30px"></div>';
 
22
  }
23
- add_shortcode('vertical-spacer','gca_spacer');
 
 
 
 
 
 
24
 
25
  // Column Shortcodes - HALVES
26
 
27
  function gca_onehalf_first( $atts, $content = null ) {
28
- return '<div class="one-half first">' . gca_strip_autop( $content ) . '</div>';
 
29
  }
30
- add_shortcode("one-half-first","gca_onehalf_first");
31
 
32
  function gca_onehalf( $atts, $content = null ) {
33
- return '<div class="one-half">' . gca_strip_autop( $content ) . '</div>';
 
34
  }
35
- add_shortcode('one-half','gca_onehalf');
36
 
37
 
38
 
39
  // Column Shortcodes - THIRDS
40
 
41
  function gca_onethird_first( $atts, $content = null ) {
42
- return '<div class="one-third first">' . gca_strip_autop( $content ) . '</div>';
 
43
  }
44
- add_shortcode("one-third-first","gca_onethird_first");
45
 
46
  function gca_onethird( $atts, $content = null ) {
47
- return '<div class="one-third">' . gca_strip_autop( $content ) . '</div>';
 
48
  }
49
- add_shortcode('one-third','gca_onethird');
50
 
51
  function gca_twothirds_first( $atts, $content = null ) {
52
- return '<div class="two-thirds first">' . gca_strip_autop( $content ) . '</div>';
 
53
  }
54
- add_shortcode("two-thirds-first","gca_twothirds_first");
55
 
56
  function gca_twothirds( $atts, $content = null ) {
57
- return '<div class="two-thirds">' . gca_strip_autop( $content ) . '</div>';
 
58
  }
59
- add_shortcode('two-thirds','gca_twothirds');
60
 
61
 
62
 
63
  // Column Shortcodes - FOURTHS
64
 
65
  function gca_onefourth_first( $atts, $content = null ) {
66
- return '<div class="one-fourth first">' . gca_strip_autop( $content ) . '</div>';
 
67
  }
68
- add_shortcode("one-fourth-first","gca_onefourth_first");
69
 
70
  function gca_onefourth( $atts, $content = null ) {
71
- return '<div class="one-fourth">' . gca_strip_autop( $content ) . '</div>';
 
72
  }
73
- add_shortcode('one-fourth','gca_onefourth');
74
 
75
  function gca_twofourths_first( $atts, $content = null ) {
76
- return '<div class="two-fourths first">' . gca_strip_autop( $content ) . '</div>';
 
77
  }
78
- add_shortcode("two-fourths-first","gca_twofourths_first");
79
 
80
  function gca_twofourths( $atts, $content = null ) {
81
- return '<div class="two-fourths">' . gca_strip_autop( $content ) . '</div>';
 
82
  }
83
- add_shortcode('two-fourths','gca_twofourths');
84
 
85
  function gca_threefourths_first( $atts, $content = null ) {
86
- return '<div class="three-fourths first">' . gca_strip_autop( $content ) . '</div>';
 
87
  }
88
- add_shortcode("three-fourths-first","gca_threefourths_first");
89
 
90
  function gca_threefourths( $atts, $content = null ) {
91
- return '<div class="three-fourths">' . gca_strip_autop( $content ) . '</div>';
 
92
  }
93
- add_shortcode('three-fourths','gca_threefourths');
94
 
95
 
96
 
97
  // Column Shortcodes - SIXTHS
98
 
99
  function gca_onesixth_first( $atts, $content = null ) {
100
- return '<div class="one-sixth first">' . gca_strip_autop( $content ) . '</div>';
 
101
  }
102
- add_shortcode("one-sixth-first","gca_onesixth_first");
103
 
104
  function gca_onesixth( $atts, $content = null ) {
105
- return '<div class="one-sixth">' . gca_strip_autop( $content ) . '</div>';
 
106
  }
107
- add_shortcode('one-sixth','gca_onesixth');
108
 
109
  function gca_twosixths_first( $atts, $content = null ) {
110
- return '<div class="two-sixths first">' . gca_strip_autop( $content ) . '</div>';
 
111
  }
112
- add_shortcode("two-sixths-first","gca_twosixths_first");
113
 
114
  function gca_twosixths ( $atts, $content = null ) {
115
- return '<div class="two-sixths">' . gca_strip_autop( $content ) . '</div>';
 
116
  }
117
- add_shortcode("two-sixths","gca_twosixths");
118
 
119
  function gca_threesixths_first( $atts, $content = null ) {
120
- return '<div class="three-sixths first">' . gca_strip_autop( $content ) . '</div>';
 
121
  }
122
- add_shortcode("three-sixths-first","gca_threesixths_first");
123
 
124
  function gca_threesixths( $atts, $content = null ) {
125
- return '<div class="three-sixths">' . gca_strip_autop( $content ) . '</div>';
 
126
  }
127
- add_shortcode("three-sixths","gca_threesixths");
128
 
129
  function gca_foursixths_first( $atts, $content = null ) {
130
- return '<div class="four-sixths first">' . gca_strip_autop( $content ) . '</div>';
 
131
  }
132
- add_shortcode("four-sixths-first","gca_foursixths_first");
133
 
134
  function gca_foursixths( $atts, $content = null ) {
135
- return '<div class="four-sixths">' . gca_strip_autop( $content ) . '</div>';
 
136
  }
137
- add_shortcode("four-sixths","gca_foursixths");
138
 
139
  function gca_fivesixths_first( $atts, $content = null ) {
140
- return '<div class="five-sixths first">' . gca_strip_autop( $content ) . '</div>';
 
141
  }
142
- add_shortcode("five-sixths-first","gca_fivesixths_first");
143
 
144
  function gca_fivesixths( $atts, $content = null ) {
145
- return '<div class="five-sixths">' . gca_strip_autop( $content ) . '</div>';
 
146
  }
147
- add_shortcode("five-sixths","gca_fivesixths");
13
  // Utility Shortcodes
14
 
15
  function gca_clearfix( $atts ) {
16
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
17
+ return '<div class="clearfix ' . $atts['class'] . '"></div>';
18
  }
19
+ add_shortcode( 'clearfix', 'gca_clearfix' );
20
 
21
  function gca_spacer( $atts ) {
22
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
23
+ return '<div class="gca-vertical-spacer ' . $atts['class'] . '" style="clear: both; margin-bottom: 30px"></div>';
24
  }
25
+ add_shortcode( 'vertical-spacer', 'gca_spacer' );
26
+
27
+ function gca_columns_container( $atts, $content = null ) {
28
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
29
+ return '<div class="' . $atts['class'] . '" style="overflow: auto;">' . gca_strip_autop( $content ) . '</div>';
30
+ }
31
+ add_shortcode( 'columns-container', 'gca_columns_container' );
32
 
33
  // Column Shortcodes - HALVES
34
 
35
  function gca_onehalf_first( $atts, $content = null ) {
36
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
37
+ return '<div class="one-half first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
38
  }
39
+ add_shortcode( 'one-half-first', 'gca_onehalf_first' );
40
 
41
  function gca_onehalf( $atts, $content = null ) {
42
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
43
+ return '<div class="one-half ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
44
  }
45
+ add_shortcode( 'one-half', 'gca_onehalf' );
46
 
47
 
48
 
49
  // Column Shortcodes - THIRDS
50
 
51
  function gca_onethird_first( $atts, $content = null ) {
52
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
53
+ return '<div class="one-third first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
54
  }
55
+ add_shortcode( 'one-third-first', 'gca_onethird_first' );
56
 
57
  function gca_onethird( $atts, $content = null ) {
58
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
59
+ return '<div class="one-third ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
60
  }
61
+ add_shortcode( 'one-third', 'gca_onethird' );
62
 
63
  function gca_twothirds_first( $atts, $content = null ) {
64
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
65
+ return '<div class="two-thirds first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
66
  }
67
+ add_shortcode( 'two-thirds-first', 'gca_twothirds_first' );
68
 
69
  function gca_twothirds( $atts, $content = null ) {
70
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
71
+ return '<div class="two-thirds ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
72
  }
73
+ add_shortcode( 'two-thirds', 'gca_twothirds' );
74
 
75
 
76
 
77
  // Column Shortcodes - FOURTHS
78
 
79
  function gca_onefourth_first( $atts, $content = null ) {
80
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
81
+ return '<div class="one-fourth first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
82
  }
83
+ add_shortcode( 'one-fourth-first', 'gca_onefourth_first' );
84
 
85
  function gca_onefourth( $atts, $content = null ) {
86
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
87
+ return '<div class="one-fourth ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
88
  }
89
+ add_shortcode( 'one-fourth', 'gca_onefourth' );
90
 
91
  function gca_twofourths_first( $atts, $content = null ) {
92
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
93
+ return '<div class="two-fourths first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
94
  }
95
+ add_shortcode( 'two-fourths-first', 'gca_twofourths_first');
96
 
97
  function gca_twofourths( $atts, $content = null ) {
98
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
99
+ return '<div class="two-fourths ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
100
  }
101
+ add_shortcode( 'two-fourths', 'gca_twofourths' );
102
 
103
  function gca_threefourths_first( $atts, $content = null ) {
104
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
105
+ return '<div class="three-fourths first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
106
  }
107
+ add_shortcode( 'three-fourths-first', 'gca_threefourths_first' );
108
 
109
  function gca_threefourths( $atts, $content = null ) {
110
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
111
+ return '<div class="three-fourths ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
112
  }
113
+ add_shortcode( 'three-fourths', 'gca_threefourths' );
114
 
115
 
116
 
117
  // Column Shortcodes - SIXTHS
118
 
119
  function gca_onesixth_first( $atts, $content = null ) {
120
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
121
+ return '<div class="one-sixth first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
122
  }
123
+ add_shortcode( 'one-sixth-first', 'gca_onesixth_first' );
124
 
125
  function gca_onesixth( $atts, $content = null ) {
126
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
127
+ return '<div class="one-sixth ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
128
  }
129
+ add_shortcode( 'one-sixth', 'gca_onesixth' );
130
 
131
  function gca_twosixths_first( $atts, $content = null ) {
132
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
133
+ return '<div class="two-sixths first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
134
  }
135
+ add_shortcode( 'two-sixths-first', 'gca_twosixths_first' );
136
 
137
  function gca_twosixths ( $atts, $content = null ) {
138
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
139
+ return '<div class="two-sixths ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
140
  }
141
+ add_shortcode( 'two-sixths', 'gca_twosixths' );
142
 
143
  function gca_threesixths_first( $atts, $content = null ) {
144
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
145
+ return '<div class="three-sixths first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
146
  }
147
+ add_shortcode( 'three-sixths-first', 'gca_threesixths_first' );
148
 
149
  function gca_threesixths( $atts, $content = null ) {
150
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
151
+ return '<div class="three-sixths ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
152
  }
153
+ add_shortcode( 'three-sixths', 'gca_threesixths' );
154
 
155
  function gca_foursixths_first( $atts, $content = null ) {
156
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
157
+ return '<div class="four-sixths first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
158
  }
159
+ add_shortcode( 'four-sixths-first', 'gca_foursixths_first' );
160
 
161
  function gca_foursixths( $atts, $content = null ) {
162
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
163
+ return '<div class="four-sixths ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
164
  }
165
+ add_shortcode( 'four-sixths', 'gca_foursixths' );
166
 
167
  function gca_fivesixths_first( $atts, $content = null ) {
168
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
169
+ return '<div class="five-sixths first ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
170
  }
171
+ add_shortcode( 'five-sixths-first', 'gca_fivesixths_first' );
172
 
173
  function gca_fivesixths( $atts, $content = null ) {
174
+ $atts = shortcode_atts( array( 'class' => '' ), $atts );
175
+ return '<div class="five-sixths ' . $atts['class'] . '">' . gca_strip_autop( $content ) . '</div>';
176
  }
177
+ add_shortcode( 'five-sixths', 'gca_fivesixths' );
genesis-columns-advanced.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Genesis Columns Advanced
4
  Plugin URI: http://www.outermostdesign.com
5
  Description: Generates shortcodes for all 35 possible column layouts when using Genesis column classes.
6
- Version: 1.0.3
7
  Author: Nick Diego
8
  Author URI: http://www.outermostdesign.com
9
  Text Domain: genesis-custom-headers
@@ -11,7 +11,7 @@ License: GPLv2
11
  */
12
 
13
  /*
14
- Copyright 2015 Nick Diego
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
@@ -37,11 +37,11 @@ add_action('admin_head', 'gca_mce_button');
37
  * Adds our columns shortcode tinymce button
38
  */
39
  function gca_mce_button() {
40
- // check user permissions
41
  if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
42
  return;
43
  }
44
- // check if WYSIWYG is enabled and if the portfolio shortcode is enabled
45
  if ( 'true' == get_user_option( 'rich_editing' ) ) {
46
  add_filter( 'mce_external_plugins', 'gca_add_tinymce_plugin' );
47
  add_filter( 'mce_buttons', 'gca_register_mce_button' );
3
  Plugin Name: Genesis Columns Advanced
4
  Plugin URI: http://www.outermostdesign.com
5
  Description: Generates shortcodes for all 35 possible column layouts when using Genesis column classes.
6
+ Version: 1.1.0
7
  Author: Nick Diego
8
  Author URI: http://www.outermostdesign.com
9
  Text Domain: genesis-custom-headers
11
  */
12
 
13
  /*
14
+ Copyright 2016 Nick Diego
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
37
  * Adds our columns shortcode tinymce button
38
  */
39
  function gca_mce_button() {
40
+ // Check user permissions
41
  if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
42
  return;
43
  }
44
+ // Check if WYSIWYG is enabled
45
  if ( 'true' == get_user_option( 'rich_editing' ) ) {
46
  add_filter( 'mce_external_plugins', 'gca_add_tinymce_plugin' );
47
  add_filter( 'mce_buttons', 'gca_register_mce_button' );
readme.txt CHANGED
@@ -1,9 +1,10 @@
1
  === Genesis Columns Advanced ===
2
  Contributors: ndiego, outermostdesign
 
3
  Tags: columns, shortcode, genesis, Genesis Framework, genesiswp, TinyMCE, admin
4
  Requires at least: 3.6
5
- Tested up to: 4.3
6
- Stable tag: 1.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -14,13 +15,24 @@ Generates shortcodes for all 35 possible column layouts when using Genesis colum
14
  This plugin generates shortcodes for every column configuration available with the column classes provided by the Genesis Framework by [StudioPress](http://www.studiopress.com). Shortcodes are easily added using a custom button in your Wordpress editor.
15
 
16
  = Plugin Highlights =
 
 
17
  * 35 different responsive column configurations available
18
  * Includes two utility shortcodes to assist with layout
19
  * Only adds one button to your Wordpress editor
20
  * Custom button design integrates seamlessly with the core Wordpress aesthetic
21
  * Developed for Genesis Framework users but usable by all! (See note on Installation page)
22
 
23
- If you have questions or would like to request additional features, such as additional utility shortcodes, please let me know in the plugin support forum.
 
 
 
 
 
 
 
 
 
24
 
25
 
26
  == Installation ==
@@ -34,12 +46,43 @@ If you have questions or would like to request additional features, such as addi
34
 
35
  **Please Note:** This plugin was designed for Genesis Framework users. Genesis is a premium product by [StudioPress](http://www.studiopress.com). However, if you are a non-Genesis user, this plugin will still activate. A special stylesheet (gca-optional-styles.css) will be applied to the frontend of your site so that you can generate columns too!
36
 
37
- == Frequently Asked Questions ==
38
-
39
- = Why is there no option for five even columns, or columns broken down by fifths? =
40
-
41
  This was a conscious decision in order for the plugin to stay inline with the column classes offered by the Genesis Framework. The informational page on Genesis’s column classes can be found on [Studiopress.com](http://my.studiopress.com/tutorials/content-column-classes/). As of Genesis v2.1.2, there unfortunately is no option for fifths. If this changes in the future, I will update this plugin.
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  == Screenshots ==
44
 
45
  1. A screenshot of columns button in editor and available options.
@@ -49,15 +92,23 @@ This was a conscious decision in order for the plugin to stay inline with the co
49
 
50
  == Changelog ==
51
 
52
- = 1.0.0 =
53
- * Initial Release
 
54
 
55
- = 1.0.1 =
56
- * Fixed bug associated with wpautop
 
 
 
 
57
 
58
  = 1.0.2 =
59
  * Fixed bug associated with columns with a width of two-fourths
60
 
61
- = 1.0.3 =
62
- * Fixed bug associated with adding columns on HTTPS websites
 
 
 
63
 
1
  === Genesis Columns Advanced ===
2
  Contributors: ndiego, outermostdesign
3
+ Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D2LLR72CD82JJ
4
  Tags: columns, shortcode, genesis, Genesis Framework, genesiswp, TinyMCE, admin
5
  Requires at least: 3.6
6
+ Tested up to: 4.4.2
7
+ Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
15
  This plugin generates shortcodes for every column configuration available with the column classes provided by the Genesis Framework by [StudioPress](http://www.studiopress.com). Shortcodes are easily added using a custom button in your Wordpress editor.
16
 
17
  = Plugin Highlights =
18
+ * **New** All shortcodes now support the "class" attribute
19
+ * **New** Added a columns container utility shortcode, see the FAQ for more info
20
  * 35 different responsive column configurations available
21
  * Includes two utility shortcodes to assist with layout
22
  * Only adds one button to your Wordpress editor
23
  * Custom button design integrates seamlessly with the core Wordpress aesthetic
24
  * Developed for Genesis Framework users but usable by all! (See note on Installation page)
25
 
26
+ If you have questions or would like to request additional features, such as additional utility shortcodes, please let me know in the plugin support forum.
27
+
28
+ **Please Note:** This plugin was not developed by Studiopress, the makers of Genesis, and we have no affiliation with the company. We just love the Framework and like building useful tools for Genesis users.
29
+
30
+ = Support This Plugin =
31
+
32
+ There are a few ways you can help support the development of this plugin:
33
+
34
+ 1. If you spot an error or bug, please let us know in the support forums. The issue will be diagnosed an a new release push out as soon as possible.
35
+ 1. [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D2LLR72CD82JJ). Time is money, and contributions from users like you really help us dedicate more hours to the continual development and support of this plugin.
36
 
37
 
38
  == Installation ==
46
 
47
  **Please Note:** This plugin was designed for Genesis Framework users. Genesis is a premium product by [StudioPress](http://www.studiopress.com). However, if you are a non-Genesis user, this plugin will still activate. A special stylesheet (gca-optional-styles.css) will be applied to the frontend of your site so that you can generate columns too!
48
 
49
+ == Frequently Asked Questions ==
50
+
51
+ = Why is there no option for five even columns, or columns broken down by fifths? =
52
+
53
  This was a conscious decision in order for the plugin to stay inline with the column classes offered by the Genesis Framework. The informational page on Genesis’s column classes can be found on [Studiopress.com](http://my.studiopress.com/tutorials/content-column-classes/). As of Genesis v2.1.2, there unfortunately is no option for fifths. If this changes in the future, I will update this plugin.
54
 
55
+ = What are the available shortcodes that this plugin generates =
56
+
57
+ **Main Column Shortcodes**
58
+
59
+ The “first” shortcodes are used for the first column in a row of columns.
60
+
61
+ * [one-half-first] …Column Content… [/one-half-first]
62
+ * [one-half] …Column Content… [/one-half]
63
+ * [one-third-first] …Column Content… [/one-third-first]
64
+ * [one-third] …Column Content…[ /one-third]
65
+ * [one-fourth-first] …Column Content… [/one-fourth-first]
66
+ * [one-fourth] …Column Content… [/one-fourth]
67
+ * [one-sixth-first] …Column Content… [/one-sixth-first]
68
+ * [one-sixth] …Column Content… [/one-sixth]
69
+
70
+ **Utility Shortcodes**
71
+
72
+ * [clearfix] - Adds a clearfix
73
+ * [vertical-spacer] – Adds a clear as well as some vertical separation
74
+ * [columns-container] …Column Content… [/columns-container] – Useful for wrapping column rows
75
+
76
+ **Class Attribute**
77
+
78
+ All shortcodes accept a "class" attribute. This allows you to add classes to any column or utility function. Classes should be space separated. See below for usage examples:
79
+
80
+ * [one-half-first class="col1"] …Column Content… [/one-half-first]
81
+ * [clearfix class="class1 class2"]
82
+ * [columns-container class="wrapper-class"] …Column Content… [/columns-container]
83
+
84
+ Have an idea for another utility shortcode? Let us know in the support forums.
85
+
86
  == Screenshots ==
87
 
88
  1. A screenshot of columns button in editor and available options.
92
 
93
  == Changelog ==
94
 
95
+ = 1.1.0 =
96
+ * Added class attributes to all shortcodes
97
+ * Added the columns container utility shortcode
98
 
99
+ = 1.0.4 =
100
+ * Updated readme
101
+ * Added new banner and icon
102
+
103
+ = 1.0.3 =
104
+ * Fixed bug associated with adding columns on HTTPS websites
105
 
106
  = 1.0.2 =
107
  * Fixed bug associated with columns with a width of two-fourths
108
 
109
+ = 1.0.1 =
110
+ * Fixed bug associated with wpautop
111
+
112
+ = 1.0.0 =
113
+ * Initial Release
114
 
tinymce/gca-plugin.js CHANGED
@@ -4,7 +4,7 @@
4
  (function() {
5
 
6
  if ( typeof tinymce != 'undefined' ) {
7
-
8
  tinymce.PluginManager.add( 'gca_button', function( editor, url ) {
9
 
10
  editor.addButton( 'gca_button', {
@@ -29,8 +29,9 @@
29
  });
30
  }},
31
  { text: 'Utilities', menu: [
32
- { text: 'Clearfix', onclick: function() { editor.insertContent( '[clearfix]' ) } },
33
- { text: 'Vertical Spacer', onclick: function() { editor.insertContent( '[vertical-spacer]' ) } }
 
34
  ]}
35
  ]
36
  }); // end addButton
@@ -39,4 +40,4 @@
39
 
40
  };
41
 
42
- })();
4
  (function() {
5
 
6
  if ( typeof tinymce != 'undefined' ) {
7
+
8
  tinymce.PluginManager.add( 'gca_button', function( editor, url ) {
9
 
10
  editor.addButton( 'gca_button', {
29
  });
30
  }},
31
  { text: 'Utilities', menu: [
32
+ { text: 'Clearfix', onclick: function() { editor.insertContent( '[clearfix]' ); } },
33
+ { text: 'Vertical Spacer', onclick: function() { editor.insertContent( '[vertical-spacer]' ); } },
34
+ { text: 'Columns Container', onclick: function() { editor.insertContent( '[columns-container]' + ( editor.selection.getContent() != '' ? editor.selection.getContent() : 'Place your columns in this container.' ) + '[/columns-container]' ); } },
35
  ]}
36
  ]
37
  }); // end addButton
40
 
41
  };
42
 
43
+ })();