Version Description
- Added parent class to keep content max-wisth at 100% to prevent overflow
- fixed fractional display of text in columns (removed CSS3 text enhancements)
- Added full integration for responsive design at 768 and 480 pixel widths - now 100% responsive!
- More code optimization and tweaking
Download this release
Release Info
Developer | kcfried |
Plugin | WP Easy Columns |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.1.1
- css/easy-columns.css +49 -7
- easy-columns.php +105 -114
- readme.txt +7 -1
css/easy-columns.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*
|
2 |
** Easy Columns CSS: css to define column layouts for the WP-Colum plugin
|
3 |
-
** for more info visit: http://www.patrickfriedl.com.com/
|
4 |
**
|
5 |
** use percentage widths and margins for fluid
|
6 |
** or unknown content widths and fixed
|
@@ -14,6 +14,9 @@
|
|
14 |
** out http://www.w3schools.com/css/css_boxmodel.asp
|
15 |
** for info on the CSS box model
|
16 |
*/
|
|
|
|
|
|
|
17 |
.ezcol-one-quarter,
|
18 |
.ezcol-one-half,
|
19 |
.ezcol-three-quarter,
|
@@ -22,8 +25,7 @@
|
|
22 |
.ezcol-one-fifth,
|
23 |
.ezcol-two-fifth,
|
24 |
.ezcol-three-fifth,
|
25 |
-
.ezcol-four-fifth
|
26 |
-
{
|
27 |
float: left;
|
28 |
margin-right: 4%;
|
29 |
position: relative;
|
@@ -33,10 +35,6 @@
|
|
33 |
-webkit-box-sizing: border-box !important;
|
34 |
box-sizing: border-box !important;
|
35 |
text-rendering: optimizedLegibility;
|
36 |
-
-moz-font-feature-settings: "ss01=1, onum=1, tnum=1, liga=1, dlig=1, kern=1, frac=1";
|
37 |
-
-webkit-font-feature-settings: "ss01" 1, "onum" 1, "tnum" 1, "liga" 1, "dlig" 1, "kern" 1, "frac" 1;
|
38 |
-
-ms-font-feature-settings: "ss01" 1, "onum" 1, "tnum" 1, "liga" 1, "dlig" 1, "kern" 1, "frac" 1;
|
39 |
-
-o-font-feature-settings: "ss01" 1, "onum" 1, "tnum" 1, "liga" 1, "dlig" 1, "kern" 1, "frac" 1;
|
40 |
}
|
41 |
.ezcol-one-quarter {
|
42 |
width: 22%;
|
@@ -100,4 +98,48 @@
|
|
100 |
}
|
101 |
.ezcol-right {
|
102 |
clear: right !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
1 |
/*
|
2 |
** Easy Columns CSS: css to define column layouts for the WP-Colum plugin
|
3 |
+
** for more info visit: http://www.patrickfriedl.com.com/
|
4 |
**
|
5 |
** use percentage widths and margins for fluid
|
6 |
** or unknown content widths and fixed
|
14 |
** out http://www.w3schools.com/css/css_boxmodel.asp
|
15 |
** for info on the CSS box model
|
16 |
*/
|
17 |
+
.ezcol>* {
|
18 |
+
max-width: 100%;
|
19 |
+
}
|
20 |
.ezcol-one-quarter,
|
21 |
.ezcol-one-half,
|
22 |
.ezcol-three-quarter,
|
25 |
.ezcol-one-fifth,
|
26 |
.ezcol-two-fifth,
|
27 |
.ezcol-three-fifth,
|
28 |
+
.ezcol-four-fifth {
|
|
|
29 |
float: left;
|
30 |
margin-right: 4%;
|
31 |
position: relative;
|
35 |
-webkit-box-sizing: border-box !important;
|
36 |
box-sizing: border-box !important;
|
37 |
text-rendering: optimizedLegibility;
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
.ezcol-one-quarter {
|
40 |
width: 22%;
|
98 |
}
|
99 |
.ezcol-right {
|
100 |
clear: right !important;
|
101 |
+
}
|
102 |
+
@media all and (max-width: 768px) {
|
103 |
+
.ezcol-one-quarter,
|
104 |
+
.ezcol-one-half,
|
105 |
+
.ezcol-three-quarter,
|
106 |
+
.ezcol-one-third,
|
107 |
+
.ezcol-two-third,
|
108 |
+
.ezcol-one-fifth,
|
109 |
+
.ezcol-two-fifth,
|
110 |
+
.ezcol-three-fifth,
|
111 |
+
.ezcol-four-fifth {
|
112 |
+
width: 48% !important;
|
113 |
+
margin-right: 2%;
|
114 |
+
}
|
115 |
+
.ezcol-last {
|
116 |
+
float: left;
|
117 |
+
clear: none;
|
118 |
+
display: block;
|
119 |
+
}
|
120 |
+
.ezcol-last:after {
|
121 |
+
content: "";
|
122 |
+
display: block;
|
123 |
+
clear: none;
|
124 |
+
}
|
125 |
+
.ezcol-last + .ezcol-divider {
|
126 |
+
clear: none !important;
|
127 |
+
display: none !important;
|
128 |
+
margin: 0 !important;
|
129 |
+
padding: 0 !important;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
@media all and (max-width: 480px) {
|
133 |
+
.ezcol-one-quarter,
|
134 |
+
.ezcol-one-half,
|
135 |
+
.ezcol-three-quarter,
|
136 |
+
.ezcol-one-third,
|
137 |
+
.ezcol-two-third,
|
138 |
+
.ezcol-one-fifth,
|
139 |
+
.ezcol-two-fifth,
|
140 |
+
.ezcol-three-fifth,
|
141 |
+
.ezcol-four-fifth {
|
142 |
+
width: 100% !important;
|
143 |
+
margin-right: 0;
|
144 |
+
}
|
145 |
}
|
easy-columns.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Easy Columns
|
4 |
Plugin URI: http://www.patrickfriedl.com/
|
5 |
-
Version: v2.1
|
6 |
Author: <a href="http://www.patrickfriedl.com">Pat Friedl</a>
|
7 |
Description: Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages just the way you need them. Using shortcodes for 1/4, 1/2, 1/3, 2/3, 3/4, 1/5, 2/5, and 3/5 columns, you can insert <strong>at least thirty</strong> unique variations of columns on any page and even in posts! Quickly add columns to your pages from the editor with an easy to use "pick n' click" interface! For usage and more information, visit <a href="http://www.patrickfriedl.com" target="_blank">patrickfriedl.com</a>.
|
8 |
|
@@ -43,59 +43,62 @@ if(!class_exists("EasyColumns")){
|
|
43 |
if (!defined('EZC_PLUGIN_URL'))
|
44 |
define('EZC_PLUGIN_URL', WP_PLUGIN_URL . '/' . EZC_PLUGIN_NAME);
|
45 |
if (!defined('EZC_PLUGIN_VERSION'))
|
46 |
-
define('EZC_PLUGIN_VERSION','2.1');
|
47 |
if (!defined('EZC_PLUGIN_TYPE'))
|
48 |
define('EZC_PLUGIN_TYPE','free');
|
49 |
|
|
|
|
|
|
|
50 |
// define OLD column shortcodes
|
51 |
-
add_shortcode('wpcol_1half', array(&$this, '
|
52 |
-
add_shortcode('wpcol_1half_end', array(&$this, '
|
53 |
-
add_shortcode('wpcol_1third', array(&$this, '
|
54 |
-
add_shortcode('wpcol_1third_end', array(&$this, '
|
55 |
-
add_shortcode('wpcol_2third', array(&$this, '
|
56 |
-
add_shortcode('wpcol_2third_end', array(&$this, '
|
57 |
-
add_shortcode('wpcol_1quarter', array(&$this, '
|
58 |
-
add_shortcode('wpcol_1quarter_end', array(&$this, '
|
59 |
-
add_shortcode('wpcol_3quarter', array(&$this, '
|
60 |
-
add_shortcode('wpcol_3quarter_end', array(&$this, '
|
61 |
-
add_shortcode('wpcol_1fifth', array(&$this, '
|
62 |
-
add_shortcode('wpcol_1fifth_end', array(&$this, '
|
63 |
-
add_shortcode('wpcol_2fifth', array(&$this, '
|
64 |
-
add_shortcode('wpcol_2fifth_end', array(&$this, '
|
65 |
-
add_shortcode('wpcol_3fifth', array(&$this, '
|
66 |
-
add_shortcode('wpcol_3fifth_end', array(&$this, '
|
67 |
-
add_shortcode('wpcol_4fifth', array(&$this, '
|
68 |
-
add_shortcode('wpcol_4fifth_end', array(&$this, '
|
69 |
-
add_shortcode('wpdiv', array(&$this, '
|
70 |
-
add_shortcode('wpcol_divider', array(&$this, '
|
71 |
-
add_shortcode('wpcol_end_right', array(&$this, '
|
72 |
-
add_shortcode('wpcol_end_left', array(&$this, '
|
73 |
-
add_shortcode('wpcol_end_both', array(&$this, '
|
74 |
|
75 |
// define NEW column shortcodes
|
76 |
-
add_shortcode('ezcol_1half', array(&$this, '
|
77 |
-
add_shortcode('ezcol_1half_end', array(&$this, '
|
78 |
-
add_shortcode('ezcol_1third', array(&$this, '
|
79 |
-
add_shortcode('ezcol_1third_end', array(&$this, '
|
80 |
-
add_shortcode('ezcol_2third', array(&$this, '
|
81 |
-
add_shortcode('ezcol_2third_end', array(&$this, '
|
82 |
-
add_shortcode('ezcol_1quarter', array(&$this, '
|
83 |
-
add_shortcode('ezcol_1quarter_end', array(&$this, '
|
84 |
-
add_shortcode('ezcol_3quarter', array(&$this, '
|
85 |
-
add_shortcode('ezcol_3quarter_end', array(&$this, '
|
86 |
-
add_shortcode('ezcol_1fifth', array(&$this, '
|
87 |
-
add_shortcode('ezcol_1fifth_end', array(&$this, '
|
88 |
-
add_shortcode('ezcol_2fifth', array(&$this, '
|
89 |
-
add_shortcode('ezcol_2fifth_end', array(&$this, '
|
90 |
-
add_shortcode('ezcol_3fifth', array(&$this, '
|
91 |
-
add_shortcode('ezcol_3fifth_end', array(&$this, '
|
92 |
-
add_shortcode('ezcol_4fifth', array(&$this, '
|
93 |
-
add_shortcode('ezcol_4fifth_end', array(&$this, '
|
94 |
-
add_shortcode('ezdiv', array(&$this, '
|
95 |
-
add_shortcode('ezcol_divider', array(&$this, '
|
96 |
-
add_shortcode('ezcol_end_right', array(&$this, '
|
97 |
-
add_shortcode('ezcol_end_left', array(&$this, '
|
98 |
-
add_shortcode('ezcol_end_both', array(&$this, '
|
99 |
|
100 |
// add to tinyMCE, include the window.php file
|
101 |
add_action('wp_ajax_easycolumns_tinymce', array(&$this,'ajax_tinymce'));
|
@@ -108,131 +111,120 @@ if(!class_exists("EasyColumns")){
|
|
108 |
|
109 |
} // end function EasyColumns
|
110 |
|
111 |
-
function
|
112 |
-
return '<div' . $this->
|
113 |
}
|
114 |
|
115 |
-
function
|
116 |
-
return '<div' . $this->
|
117 |
}
|
118 |
|
119 |
-
function
|
120 |
-
return '<div' . $this->
|
121 |
}
|
122 |
|
123 |
-
function
|
124 |
-
return '<div' . $this->
|
125 |
}
|
126 |
|
127 |
-
function
|
128 |
-
return '<div' . $this->
|
129 |
}
|
130 |
|
131 |
-
function
|
132 |
-
return '<div' . $this->
|
133 |
}
|
134 |
|
135 |
-
function
|
136 |
-
return '<div' . $this->
|
137 |
}
|
138 |
|
139 |
-
function
|
140 |
-
return '<div' . $this->
|
141 |
}
|
142 |
|
143 |
-
function
|
144 |
-
return '<div' . $this->
|
145 |
}
|
146 |
|
147 |
-
function
|
148 |
-
return '<div' . $this->
|
149 |
}
|
150 |
|
151 |
-
function
|
152 |
-
return '<div' . $this->
|
153 |
}
|
154 |
|
155 |
-
function
|
156 |
-
return '<div' . $this->
|
157 |
}
|
158 |
|
159 |
-
function
|
160 |
-
return '<div' . $this->
|
161 |
}
|
162 |
|
163 |
-
function
|
164 |
-
return '<div' . $this->
|
165 |
}
|
166 |
|
167 |
-
function
|
168 |
-
return '<div' . $this->
|
169 |
}
|
170 |
|
171 |
-
function
|
172 |
-
return '<div' . $this->
|
173 |
}
|
174 |
|
175 |
-
function
|
176 |
-
return '<div' . $this->
|
177 |
}
|
178 |
|
179 |
-
function
|
180 |
-
return '<div' . $this->
|
181 |
}
|
182 |
|
183 |
-
function
|
184 |
-
return '<div' . $this->
|
185 |
}
|
186 |
|
187 |
-
function
|
188 |
return '<div class="ezcol-divider"></div>';
|
189 |
}
|
190 |
|
191 |
-
function
|
192 |
return '<div class="ezcol-left"></div>';
|
193 |
}
|
194 |
|
195 |
-
function
|
196 |
return '<div class="ezcol-right"></div>';
|
197 |
}
|
198 |
|
199 |
-
function
|
200 |
return '<div class="ezcol-both"></div>';
|
201 |
}
|
202 |
|
203 |
-
function
|
204 |
extract(shortcode_atts(array('id' => '','class' => '','style' => ''),$atts));
|
205 |
-
|
206 |
-
$att_str
|
207 |
-
|
208 |
-
|
209 |
-
}
|
210 |
-
if($col_type != '' && $class != ''){
|
211 |
-
$att_str .= ' ';
|
212 |
-
}
|
213 |
-
if($class != ''){
|
214 |
-
$att_str .= $class;
|
215 |
-
}
|
216 |
$att_str .= '"';
|
217 |
-
|
218 |
-
|
219 |
-
}
|
220 |
-
if($style != ''){
|
221 |
-
$att_str .= ' style="' . $style . '"';
|
222 |
-
}
|
223 |
return $att_str;
|
224 |
}
|
225 |
|
226 |
-
function
|
227 |
$content = do_shortcode(shortcode_unautop( $content ));
|
228 |
$content = preg_replace('#^<\/p>|^<br \/>|<p>$#', '', $content);
|
229 |
return $content;
|
230 |
}
|
231 |
|
232 |
-
function
|
233 |
?>
|
234 |
<!-- Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> by Pat Friedl http://www.patrickfriedl.com -->
|
235 |
-
<link rel="stylesheet" href="<?php echo EZC_PLUGIN_URL; ?>/css/easy-columns.css
|
236 |
<?php
|
237 |
if($this->use_custom)
|
238 |
{
|
@@ -318,11 +310,11 @@ if(!class_exists("EasyColumns")){
|
|
318 |
echo "\n";
|
319 |
?>
|
320 |
</style>
|
321 |
-
<!-- End Easy Columns
|
322 |
<?php
|
323 |
}
|
324 |
} // end if($this->use_custom)
|
325 |
-
}// end
|
326 |
|
327 |
// begin functions for adding plugin to tinyMCE
|
328 |
function ajax_tinymce() {
|
@@ -483,7 +475,6 @@ if (class_exists("EasyColumns")) {
|
|
483 |
|
484 |
// set up actions and filters
|
485 |
if (isset($ez_columns)) {
|
486 |
-
add_action('wp_head', array(&$ez_columns, 'wpcol_add_css'), 100);
|
487 |
if (function_exists('register_uninstall_hook'))
|
488 |
{
|
489 |
register_uninstall_hook(__FILE__, array(&$ez_columns, 'uninstall'));
|
2 |
/*
|
3 |
Plugin Name: Easy Columns
|
4 |
Plugin URI: http://www.patrickfriedl.com/
|
5 |
+
Version: v2.1.1
|
6 |
Author: <a href="http://www.patrickfriedl.com">Pat Friedl</a>
|
7 |
Description: Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages just the way you need them. Using shortcodes for 1/4, 1/2, 1/3, 2/3, 3/4, 1/5, 2/5, and 3/5 columns, you can insert <strong>at least thirty</strong> unique variations of columns on any page and even in posts! Quickly add columns to your pages from the editor with an easy to use "pick n' click" interface! For usage and more information, visit <a href="http://www.patrickfriedl.com" target="_blank">patrickfriedl.com</a>.
|
8 |
|
43 |
if (!defined('EZC_PLUGIN_URL'))
|
44 |
define('EZC_PLUGIN_URL', WP_PLUGIN_URL . '/' . EZC_PLUGIN_NAME);
|
45 |
if (!defined('EZC_PLUGIN_VERSION'))
|
46 |
+
define('EZC_PLUGIN_VERSION','2.1.1');
|
47 |
if (!defined('EZC_PLUGIN_TYPE'))
|
48 |
define('EZC_PLUGIN_TYPE','free');
|
49 |
|
50 |
+
// add css to the <head>
|
51 |
+
add_action('wp_head', array(&$this, 'add_css'), 100);
|
52 |
+
|
53 |
// define OLD column shortcodes
|
54 |
+
add_shortcode('wpcol_1half', array(&$this, 'one_half'));
|
55 |
+
add_shortcode('wpcol_1half_end', array(&$this, 'one_half_end'));
|
56 |
+
add_shortcode('wpcol_1third', array(&$this, 'one_third'));
|
57 |
+
add_shortcode('wpcol_1third_end', array(&$this, 'one_third_end'));
|
58 |
+
add_shortcode('wpcol_2third', array(&$this, 'two_third'));
|
59 |
+
add_shortcode('wpcol_2third_end', array(&$this, 'two_third_end'));
|
60 |
+
add_shortcode('wpcol_1quarter', array(&$this, 'one_quarter'));
|
61 |
+
add_shortcode('wpcol_1quarter_end', array(&$this, 'one_quarter_end'));
|
62 |
+
add_shortcode('wpcol_3quarter', array(&$this, 'three_quarter'));
|
63 |
+
add_shortcode('wpcol_3quarter_end', array(&$this, 'three_quarter_end'));
|
64 |
+
add_shortcode('wpcol_1fifth', array(&$this, 'one_fifth'));
|
65 |
+
add_shortcode('wpcol_1fifth_end', array(&$this, 'one_fifth_end'));
|
66 |
+
add_shortcode('wpcol_2fifth', array(&$this, 'two_fifth'));
|
67 |
+
add_shortcode('wpcol_2fifth_end', array(&$this, 'two_fifth_end'));
|
68 |
+
add_shortcode('wpcol_3fifth', array(&$this, 'three_fifth'));
|
69 |
+
add_shortcode('wpcol_3fifth_end', array(&$this, 'three_fifth_end'));
|
70 |
+
add_shortcode('wpcol_4fifth', array(&$this, 'four_fifth'));
|
71 |
+
add_shortcode('wpcol_4fifth_end', array(&$this, 'four_fifth_end'));
|
72 |
+
add_shortcode('wpdiv', array(&$this, 'div'));
|
73 |
+
add_shortcode('wpcol_divider', array(&$this, 'add_divider'));
|
74 |
+
add_shortcode('wpcol_end_right', array(&$this, 'end_column_right'));
|
75 |
+
add_shortcode('wpcol_end_left', array(&$this, 'end_column_left'));
|
76 |
+
add_shortcode('wpcol_end_both', array(&$this, 'end_column_both'));
|
77 |
|
78 |
// define NEW column shortcodes
|
79 |
+
add_shortcode('ezcol_1half', array(&$this, 'one_half'));
|
80 |
+
add_shortcode('ezcol_1half_end', array(&$this, 'one_half_end'));
|
81 |
+
add_shortcode('ezcol_1third', array(&$this, 'one_third'));
|
82 |
+
add_shortcode('ezcol_1third_end', array(&$this, 'one_third_end'));
|
83 |
+
add_shortcode('ezcol_2third', array(&$this, 'two_third'));
|
84 |
+
add_shortcode('ezcol_2third_end', array(&$this, 'two_third_end'));
|
85 |
+
add_shortcode('ezcol_1quarter', array(&$this, 'one_quarter'));
|
86 |
+
add_shortcode('ezcol_1quarter_end', array(&$this, 'one_quarter_end'));
|
87 |
+
add_shortcode('ezcol_3quarter', array(&$this, 'three_quarter'));
|
88 |
+
add_shortcode('ezcol_3quarter_end', array(&$this, 'three_quarter_end'));
|
89 |
+
add_shortcode('ezcol_1fifth', array(&$this, 'one_fifth'));
|
90 |
+
add_shortcode('ezcol_1fifth_end', array(&$this, 'one_fifth_end'));
|
91 |
+
add_shortcode('ezcol_2fifth', array(&$this, 'two_fifth'));
|
92 |
+
add_shortcode('ezcol_2fifth_end', array(&$this, 'two_fifth_end'));
|
93 |
+
add_shortcode('ezcol_3fifth', array(&$this, 'three_fifth'));
|
94 |
+
add_shortcode('ezcol_3fifth_end', array(&$this, 'three_fifth_end'));
|
95 |
+
add_shortcode('ezcol_4fifth', array(&$this, 'four_fifth'));
|
96 |
+
add_shortcode('ezcol_4fifth_end', array(&$this, 'four_fifth_end'));
|
97 |
+
add_shortcode('ezdiv', array(&$this, 'div'));
|
98 |
+
add_shortcode('ezcol_divider', array(&$this, 'add_divider'));
|
99 |
+
add_shortcode('ezcol_end_right', array(&$this, 'end_column_right'));
|
100 |
+
add_shortcode('ezcol_end_left', array(&$this, 'end_column_left'));
|
101 |
+
add_shortcode('ezcol_end_both', array(&$this, 'end_column_both'));
|
102 |
|
103 |
// add to tinyMCE, include the window.php file
|
104 |
add_action('wp_ajax_easycolumns_tinymce', array(&$this,'ajax_tinymce'));
|
111 |
|
112 |
} // end function EasyColumns
|
113 |
|
114 |
+
function one_half($atts, $content = null) {
|
115 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-half') . '>'.$this->strip_autop($content).'</div>';
|
116 |
}
|
117 |
|
118 |
+
function one_half_end($atts, $content = null) {
|
119 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-half ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
120 |
}
|
121 |
|
122 |
+
function one_third($atts, $content = null) {
|
123 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-third') . '>'.$this->strip_autop($content).'</div>';
|
124 |
}
|
125 |
|
126 |
+
function one_third_end($atts, $content = null) {
|
127 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-third ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
128 |
}
|
129 |
|
130 |
+
function two_third($atts, $content = null) {
|
131 |
+
return '<div' . $this->div_atts($atts,'ezcol-two-third') . '>'.$this->strip_autop($content).'</div>';
|
132 |
}
|
133 |
|
134 |
+
function two_third_end($atts, $content = null) {
|
135 |
+
return '<div' . $this->div_atts($atts,'ezcol-two-third ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
136 |
}
|
137 |
|
138 |
+
function one_quarter($atts, $content = null) {
|
139 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-quarter') . '>'.$this->strip_autop($content).'</div>';
|
140 |
}
|
141 |
|
142 |
+
function one_quarter_end($atts, $content = null) {
|
143 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-quarter ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
144 |
}
|
145 |
|
146 |
+
function three_quarter($atts, $content = null) {
|
147 |
+
return '<div' . $this->div_atts($atts,'ezcol-three-quarter') . '>'.$this->strip_autop($content).'</div>';
|
148 |
}
|
149 |
|
150 |
+
function three_quarter_end($atts, $content = null) {
|
151 |
+
return '<div' . $this->div_atts($atts,'ezcol-three-quarter ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
152 |
}
|
153 |
|
154 |
+
function one_fifth($atts, $content = null) {
|
155 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-fifth') . '>'.$this->strip_autop($content).'</div>';
|
156 |
}
|
157 |
|
158 |
+
function one_fifth_end($atts, $content = null) {
|
159 |
+
return '<div' . $this->div_atts($atts,'ezcol-one-fifth ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
160 |
}
|
161 |
|
162 |
+
function two_fifth($atts, $content = null) {
|
163 |
+
return '<div' . $this->div_atts($atts,'ezcol-two-fifth') . '>'.$this->strip_autop($content).'</div>';
|
164 |
}
|
165 |
|
166 |
+
function two_fifth_end($atts, $content = null) {
|
167 |
+
return '<div' . $this->div_atts($atts,'ezcol-two-fifth ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
168 |
}
|
169 |
|
170 |
+
function three_fifth($atts, $content = null) {
|
171 |
+
return '<div' . $this->div_atts($atts,'ezcol-three-fifth') . '>'.$this->strip_autop($content).'</div>';
|
172 |
}
|
173 |
|
174 |
+
function three_fifth_end($atts, $content = null) {
|
175 |
+
return '<div' . $this->div_atts($atts,'ezcol-three-fifth ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
176 |
}
|
177 |
|
178 |
+
function four_fifth($atts, $content = null) {
|
179 |
+
return '<div' . $this->div_atts($atts,'ezcol-four-fifth') . '>'.$this->strip_autop($content).'</div>';
|
180 |
}
|
181 |
|
182 |
+
function four_fifth_end($atts, $content = null) {
|
183 |
+
return '<div' . $this->div_atts($atts,'ezcol-four-fifth ezcol-last') . '>'.$this->strip_autop($content).'</div>'.$this->add_divider();
|
184 |
}
|
185 |
|
186 |
+
function div($atts, $content = null) {
|
187 |
+
return '<div' . $this->div_atts($atts,'') . '>' . $this->strip_autop($content) . '</div>';
|
188 |
}
|
189 |
|
190 |
+
function add_divider(){
|
191 |
return '<div class="ezcol-divider"></div>';
|
192 |
}
|
193 |
|
194 |
+
function end_column_left($atts, $content = null) {
|
195 |
return '<div class="ezcol-left"></div>';
|
196 |
}
|
197 |
|
198 |
+
function end_column_right($atts, $content = null) {
|
199 |
return '<div class="ezcol-right"></div>';
|
200 |
}
|
201 |
|
202 |
+
function end_column_both($atts, $content = null) {
|
203 |
return '<div class="ezcol-both"></div>';
|
204 |
}
|
205 |
|
206 |
+
function div_atts($atts,$col_type) {
|
207 |
extract(shortcode_atts(array('id' => '','class' => '','style' => ''),$atts));
|
208 |
+
$att_str = ' class="ezcol';
|
209 |
+
$att_str .= (!empty($col_type))? ' '.$col_type : '';
|
210 |
+
$att_str .= (!empty($col_type) && !empty($class))? ' ' : '';
|
211 |
+
$att_str .= (!empty($class))? $class : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
$att_str .= '"';
|
213 |
+
$att_str .= (!empty($id))? ' id="'.$id.'"' : '';
|
214 |
+
$att_str .= (!empty($style))? ' style="'.$style.'"' : '';
|
|
|
|
|
|
|
|
|
215 |
return $att_str;
|
216 |
}
|
217 |
|
218 |
+
function strip_autop($content){
|
219 |
$content = do_shortcode(shortcode_unautop( $content ));
|
220 |
$content = preg_replace('#^<\/p>|^<br \/>|<p>$#', '', $content);
|
221 |
return $content;
|
222 |
}
|
223 |
|
224 |
+
function add_css(){
|
225 |
?>
|
226 |
<!-- Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> by Pat Friedl http://www.patrickfriedl.com -->
|
227 |
+
<link rel="stylesheet" href="<?php echo EZC_PLUGIN_URL; ?>/css/easy-columns.css" type="text/css" media="screen, projection" />
|
228 |
<?php
|
229 |
if($this->use_custom)
|
230 |
{
|
310 |
echo "\n";
|
311 |
?>
|
312 |
</style>
|
313 |
+
<!-- End Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> Custom CSS -->
|
314 |
<?php
|
315 |
}
|
316 |
} // end if($this->use_custom)
|
317 |
+
}// end add_css
|
318 |
|
319 |
// begin functions for adding plugin to tinyMCE
|
320 |
function ajax_tinymce() {
|
475 |
|
476 |
// set up actions and filters
|
477 |
if (isset($ez_columns)) {
|
|
|
478 |
if (function_exists('register_uninstall_hook'))
|
479 |
{
|
480 |
register_uninstall_hook(__FILE__, array(&$ez_columns, 'uninstall'));
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=donations&business=T8V954
|
|
4 |
Tags: columns, column, grid layout, box, boxes, feature box, layout, magazine, page, posts, magazine columns, magazine layout, float div
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.6
|
7 |
-
Stable tag: 2.1
|
8 |
|
9 |
Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages (or even posts!) just the way you need them.
|
10 |
|
@@ -112,6 +112,12 @@ Upgrade normally via your Wordpress admin -> Plugins panel.
|
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
= 2.1 =
|
116 |
* Upgraded visual editor window to WP 3.6 compliance
|
117 |
* Updated styles in the visual editor
|
4 |
Tags: columns, column, grid layout, box, boxes, feature box, layout, magazine, page, posts, magazine columns, magazine layout, float div
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.6
|
7 |
+
Stable tag: 2.1.1
|
8 |
|
9 |
Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages (or even posts!) just the way you need them.
|
10 |
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 2.1.1 =
|
116 |
+
* Added parent class to keep content max-wisth at 100% to prevent overflow
|
117 |
+
* fixed fractional display of text in columns (removed CSS3 text enhancements)
|
118 |
+
* Added full integration for responsive design at 768 and 480 pixel widths - now 100% responsive!
|
119 |
+
* More code optimization and tweaking
|
120 |
+
|
121 |
= 2.1 =
|
122 |
* Upgraded visual editor window to WP 3.6 compliance
|
123 |
* Updated styles in the visual editor
|