Version Description
- Allow line breaks inside columns
Download this release
Release Info
Developer | edge22 |
Plugin | Lightweight Grid Columns |
Version | 0.2 |
Comparing to | |
See all releases |
Code changes from version 0.1 to 0.2
- changelog.txt +5 -0
- lightweight-grid-columns.php +13 -8
- readme.txt +10 -4
changelog.txt
CHANGED
@@ -10,5 +10,10 @@ Changelog Legend:
|
|
10 |
|
11 |
----
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
(5/15/2015) - 0.1
|
14 |
Initial Release
|
10 |
|
11 |
----
|
12 |
|
13 |
+
(5/21/2015) - 0.2
|
14 |
+
[*] Allow line breaks inside columns
|
15 |
+
|
16 |
+
----
|
17 |
+
|
18 |
(5/15/2015) - 0.1
|
19 |
Initial Release
|
lightweight-grid-columns.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Lightweight Grid Columns
|
4 |
Plugin URI: http://generatepress.com
|
5 |
Description: Add lightweight grid columns to your content using easy to use shortcodes.
|
6 |
-
Version: 0.
|
7 |
Author: Thomas Usborne
|
8 |
Author URI: http://edge22.com
|
9 |
License: GNU General Public License v2 or later
|
@@ -134,16 +134,21 @@ function lgc_columns_shortcode( $atts , $content = null ) {
|
|
134 |
$clear = ( 'true' == $last ) ? '<div class="lgc-clear"></div>' : '';
|
135 |
$inlineCSS = ( ! empty( $style ) ) ? ' style="' . esc_attr( $style ) . '"' : '';
|
136 |
return lgc_columns_helper( '<div class="lgc-column lgc-grid-parent lgc-grid-' . intval( $grid ) . ' lgc-tablet-grid-' . intval( $tablet_grid ) . ' lgc-mobile-grid-' . intval( $mobile_grid ) . '"><div class="inside-grid-column ' . esc_attr( $class ) . '"' . $inlineCSS . '>' . $content . '</div></div>' . $clear );
|
|
|
137 |
}
|
138 |
endif;
|
139 |
|
140 |
if ( ! function_exists( 'lgc_columns_helper' ) ) :
|
141 |
-
function lgc_columns_helper( $content )
|
142 |
-
|
143 |
-
$
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
endif;
|
3 |
Plugin Name: Lightweight Grid Columns
|
4 |
Plugin URI: http://generatepress.com
|
5 |
Description: Add lightweight grid columns to your content using easy to use shortcodes.
|
6 |
+
Version: 0.2
|
7 |
Author: Thomas Usborne
|
8 |
Author URI: http://edge22.com
|
9 |
License: GNU General Public License v2 or later
|
134 |
$clear = ( 'true' == $last ) ? '<div class="lgc-clear"></div>' : '';
|
135 |
$inlineCSS = ( ! empty( $style ) ) ? ' style="' . esc_attr( $style ) . '"' : '';
|
136 |
return lgc_columns_helper( '<div class="lgc-column lgc-grid-parent lgc-grid-' . intval( $grid ) . ' lgc-tablet-grid-' . intval( $tablet_grid ) . ' lgc-mobile-grid-' . intval( $mobile_grid ) . '"><div class="inside-grid-column ' . esc_attr( $class ) . '"' . $inlineCSS . '>' . $content . '</div></div>' . $clear );
|
137 |
+
|
138 |
}
|
139 |
endif;
|
140 |
|
141 |
if ( ! function_exists( 'lgc_columns_helper' ) ) :
|
142 |
+
function lgc_columns_helper( $content ){
|
143 |
+
|
144 |
+
$array = array (
|
145 |
+
'<p>[' => '[',
|
146 |
+
']</p>' => ']',
|
147 |
+
']<br />' => ']'
|
148 |
+
);
|
149 |
+
|
150 |
+
$content = strtr( $content, $array );
|
151 |
+
return do_shortcode( shortcode_unautop( force_balance_tags( trim( $content ) ) ) );
|
152 |
+
|
153 |
}
|
154 |
endif;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: columns, columns shortcode, grid columns
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.2.2
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -67,7 +67,7 @@ Take note of our last column - see the last="true" part? Don't forget ;)
|
|
67 |
|
68 |
This is taken directly from (http://unsemantic.com):
|
69 |
|
70 |
-
There are grid classes named grid-x where "x" is a number that represents the percentage width of each grid unit. These cover multiples of 5, up to 100
|
71 |
|
72 |
= Are there any other options I can use in the shortcode? =
|
73 |
|
@@ -75,11 +75,11 @@ Yes!
|
|
75 |
|
76 |
You can use:
|
77 |
|
78 |
-
=class=
|
79 |
|
80 |
[lgc_column grid="25" tablet_grid="50" mobile_grid="100" class="push-25"]Some content[/lgc_column]
|
81 |
|
82 |
-
=style=
|
83 |
|
84 |
[lgc_column grid="25" tablet_grid="50" mobile_grid="100" style="padding-left:0px;"]Some content[/lgc_column]
|
85 |
|
@@ -91,10 +91,16 @@ You can use:
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
94 |
= 0.1 =
|
95 |
* Initial release
|
96 |
|
97 |
== Upgrade Notice ==
|
98 |
|
|
|
|
|
|
|
99 |
= 0.1 =
|
100 |
* Initial release
|
4 |
Tags: columns, columns shortcode, grid columns
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.2.2
|
7 |
+
Stable tag: 0.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
67 |
|
68 |
This is taken directly from (http://unsemantic.com):
|
69 |
|
70 |
+
There are grid classes named grid-x where "x" is a number that represents the percentage width of each grid unit. These cover multiples of 5, up to 100 (grid-5, grid-10 ... grid-95, grid-100). There are also classes for dividing a page into thirds: grid-33 and grid-66 which are 33.3333% and 66.6667% wide, respectively.
|
71 |
|
72 |
= Are there any other options I can use in the shortcode? =
|
73 |
|
75 |
|
76 |
You can use:
|
77 |
|
78 |
+
= class =
|
79 |
|
80 |
[lgc_column grid="25" tablet_grid="50" mobile_grid="100" class="push-25"]Some content[/lgc_column]
|
81 |
|
82 |
+
= style =
|
83 |
|
84 |
[lgc_column grid="25" tablet_grid="50" mobile_grid="100" style="padding-left:0px;"]Some content[/lgc_column]
|
85 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 0.2 =
|
95 |
+
* Allow line breaks inside columns
|
96 |
+
|
97 |
= 0.1 =
|
98 |
* Initial release
|
99 |
|
100 |
== Upgrade Notice ==
|
101 |
|
102 |
+
= 0.2 =
|
103 |
+
Allow line breaks inside your columns
|
104 |
+
|
105 |
= 0.1 =
|
106 |
* Initial release
|