Version Description
- Changed the tinyMCE window to load wp-load.php instead of wp-config.php
- Added jQuery to tinyMCE window
- Added class input to column selection - applies a CSS class name to all the columns you insert
- Added better styling to the options page
- Fixed the custom CSS not rendering issue - Easy Columns options will now render.
- Added a Custom CSS option to the options page - style columns with custom classes or use the base classes!
- Changed ezcol-divider class to be height: 0 margin: 0
- Should have any uninstall hook erros fixed
Download this release
Release Info
Developer | kcfried |
Plugin | WP Easy Columns |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- css/easy-columns.css +2 -2
- easy-columns-options.php +45 -22
- easy-columns.php +60 -64
- readme.txt +13 -3
- tinymce/editor_plugin.js +1 -1
- tinymce/window.php +98 -86
css/easy-columns.css
CHANGED
@@ -85,8 +85,8 @@
|
|
85 |
.ezcol-divider {
|
86 |
clear: both !important;
|
87 |
display: block !important;
|
88 |
-
margin-bottom:
|
89 |
-
padding-top:
|
90 |
width: 100% !important;
|
91 |
background: none !important;
|
92 |
}
|
85 |
.ezcol-divider {
|
86 |
clear: both !important;
|
87 |
display: block !important;
|
88 |
+
margin-bottom: 0px !important;
|
89 |
+
padding-top: 0px !important;
|
90 |
width: 100% !important;
|
91 |
background: none !important;
|
92 |
}
|
easy-columns-options.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
function write_sel($n,$v){
|
3 |
-
echo '<select id="'.$n.'" name="'.$n.'">' . "\r\n";
|
4 |
if($v == 'px'){
|
5 |
echo '<option value="px" selected="selected">px</option>' . "\r\n";
|
6 |
echo '<option value="%">%</option>' . "\r\n";
|
@@ -11,6 +11,12 @@ function write_sel($n,$v){
|
|
11 |
echo '</select>' . "\r\n";
|
12 |
}
|
13 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<div class="wrap" style="max-width:950px !important;">
|
15 |
|
16 |
<a href="http://www.patrickfriedl.com.com/wordpress/easy-columns" target="_blank">
|
@@ -72,9 +78,9 @@ function write_sel($n,$v){
|
|
72 |
</td>
|
73 |
<td valign="middle">
|
74 |
<?php if($this->options['use_custom']){ ?>
|
75 |
-
<input type="checkbox" id="use_custom" name="use_custom" value="true" checked="checked">
|
76 |
<?php } else { ?>
|
77 |
-
<input type="checkbox" id="use_custom" name="use_custom" value="true">
|
78 |
<?php } ?>
|
79 |
</td>
|
80 |
</tr>
|
@@ -103,7 +109,7 @@ function write_sel($n,$v){
|
|
103 |
Width
|
104 |
</td>
|
105 |
<td valign="middle">
|
106 |
-
<input type="text" id="quarter_width" name="quarter_width" value="<?php echo $this->options['quarter_width']; ?>" size="6">
|
107 |
|
108 |
<?php write_sel('quarter_width_type',$this->options['quarter_width_type']); ?>
|
109 |
</td>
|
@@ -111,7 +117,7 @@ function write_sel($n,$v){
|
|
111 |
Width
|
112 |
</td>
|
113 |
<td valign="middle">
|
114 |
-
<input type="text" id="onehalf_width" name="onehalf_width" value="<?php echo $this->options['onehalf_width']; ?>" size="6">
|
115 |
|
116 |
<?php write_sel('onehalf_width_type',$this->options['onehalf_width_type']); ?>
|
117 |
</td>
|
@@ -119,7 +125,7 @@ function write_sel($n,$v){
|
|
119 |
Width
|
120 |
</td>
|
121 |
<td valign="middle">
|
122 |
-
<input type="text" id="threequarter_width" name="threequarter_width" value="<?php echo $this->options['threequarter_width']; ?>" size="6">
|
123 |
|
124 |
<?php write_sel('threequarter_width_type',$this->options['threequarter_width_type']); ?>
|
125 |
</td>
|
@@ -130,7 +136,7 @@ function write_sel($n,$v){
|
|
130 |
Margin
|
131 |
</td>
|
132 |
<td valign="middle">
|
133 |
-
<input type="text" id="quarter_margin" name="quarter_margin" value="<?php echo $this->options['quarter_margin']; ?>" size="6">
|
134 |
|
135 |
<?php write_sel('quarter_margin_type',$this->options['quarter_margin_type']); ?>
|
136 |
</td>
|
@@ -138,7 +144,7 @@ function write_sel($n,$v){
|
|
138 |
Margin
|
139 |
</td>
|
140 |
<td valign="middle">
|
141 |
-
<input type="text" id="onehalf_margin" name="onehalf_margin" value="<?php echo $this->options['onehalf_margin']; ?>" size="6">
|
142 |
|
143 |
<?php write_sel('onehalf_margin_type',$this->options['onehalf_margin_type']); ?>
|
144 |
</td>
|
@@ -146,7 +152,7 @@ function write_sel($n,$v){
|
|
146 |
Margin
|
147 |
</td>
|
148 |
<td valign="middle">
|
149 |
-
<input type="text" id="threequarter_margin" name="threequarter_margin" value="<?php echo $this->options['threequarter_margin']; ?>" size="6">
|
150 |
|
151 |
<?php write_sel('threequarter_margin_type',$this->options['threequarter_margin_type']); ?>
|
152 |
</td>
|
@@ -173,7 +179,7 @@ function write_sel($n,$v){
|
|
173 |
Width
|
174 |
</td>
|
175 |
<td valign="middle">
|
176 |
-
<input type="text" id="onethird_width" name="onethird_width" value="<?php echo $this->options['onethird_width']; ?>" size="6">
|
177 |
|
178 |
<?php write_sel('onethird_width_type',$this->options['onethird_width_type']); ?>
|
179 |
</td>
|
@@ -181,7 +187,7 @@ function write_sel($n,$v){
|
|
181 |
Width
|
182 |
</td>
|
183 |
<td valign="middle">
|
184 |
-
<input type="text" id="twothird_width" name="twothird_width" value="<?php echo $this->options['twothird_width']; ?>" size="6">
|
185 |
|
186 |
<?php write_sel('twothird_width_type',$this->options['twothird_width_type']); ?>
|
187 |
</td>
|
@@ -194,7 +200,7 @@ function write_sel($n,$v){
|
|
194 |
Margin
|
195 |
</td>
|
196 |
<td valign="middle">
|
197 |
-
<input type="text" id="onethird_margin" name="onethird_margin" value="<?php echo $this->options['onethird_margin']; ?>" size="6">
|
198 |
|
199 |
<?php write_sel('onethird_margin_type',$this->options['onethird_margin_type']); ?>
|
200 |
</td>
|
@@ -202,7 +208,7 @@ function write_sel($n,$v){
|
|
202 |
Margin
|
203 |
</td>
|
204 |
<td valign="middle">
|
205 |
-
<input type="text" id="twothird_margin" name="twothird_margin" value="<?php echo $this->options['twothird_margin']; ?>" size="6">
|
206 |
|
207 |
<?php write_sel('twothird_margin_type',$this->options['twothird_margin_type']); ?>
|
208 |
</td>
|
@@ -232,7 +238,7 @@ function write_sel($n,$v){
|
|
232 |
Width
|
233 |
</td>
|
234 |
<td valign="middle">
|
235 |
-
<input type="text" id="onefifth_width" name="onefifth_width" value="<?php echo $this->options['onefifth_width']; ?>" size="6">
|
236 |
|
237 |
<?php write_sel('onefifth_width_type',$this->options['onefifth_width_type']); ?>
|
238 |
</td>
|
@@ -240,7 +246,7 @@ function write_sel($n,$v){
|
|
240 |
Width
|
241 |
</td>
|
242 |
<td valign="middle">
|
243 |
-
<input type="text" id="twofifth_width" name="twofifth_width" value="<?php echo $this->options['twofifth_width']; ?>" size="6">
|
244 |
|
245 |
<?php write_sel('twofifth_width_type',$this->options['twofifth_width_type']); ?>
|
246 |
</td>
|
@@ -248,7 +254,7 @@ function write_sel($n,$v){
|
|
248 |
Width
|
249 |
</td>
|
250 |
<td valign="middle">
|
251 |
-
<input type="text" id="threefifth_width" name="threefifth_width" value="<?php echo $this->options['threefifth_width']; ?>" size="6">
|
252 |
|
253 |
<?php write_sel('threefifth_width_type',$this->options['threefifth_width_type']); ?>
|
254 |
</td>
|
@@ -258,7 +264,7 @@ function write_sel($n,$v){
|
|
258 |
Margin
|
259 |
</td>
|
260 |
<td valign="middle">
|
261 |
-
<input type="text" id="onefifth_margin" name="onefifth_margin" value="<?php echo $this->options['onefifth_margin']; ?>" size="6">
|
262 |
|
263 |
<?php write_sel('onefifth_margin_type',$this->options['onefifth_margin_type']); ?>
|
264 |
</td>
|
@@ -266,7 +272,7 @@ function write_sel($n,$v){
|
|
266 |
Margin
|
267 |
</td>
|
268 |
<td valign="middle">
|
269 |
-
<input type="text" id="twofifth_margin" name="twofifth_margin" value="<?php echo $this->options['twofifth_margin']; ?>" size="6">
|
270 |
|
271 |
<?php write_sel('twofifth_margin_type',$this->options['twofifth_margin_type']); ?>
|
272 |
</td>
|
@@ -274,7 +280,7 @@ function write_sel($n,$v){
|
|
274 |
Margin
|
275 |
</td>
|
276 |
<td valign="middle">
|
277 |
-
<input type="text" id="threefifth_margin" name="threefifth_margin" value="<?php echo $this->options['threefifth_margin']; ?>" size="6">
|
278 |
|
279 |
<?php write_sel('threefifth_margin_type',$this->options['threefifth_margin_type']); ?>
|
280 |
</td>
|
@@ -291,7 +297,7 @@ function write_sel($n,$v){
|
|
291 |
Width
|
292 |
</td>
|
293 |
<td valign="middle" colspan="5">
|
294 |
-
<input type="text" id="fourfifth_width" name="fourfifth_width" value="<?php echo $this->options['fourfifth_width']; ?>" size="6">
|
295 |
|
296 |
<?php write_sel('fourfifth_width_type',$this->options['fourfifth_width_type']); ?>
|
297 |
</td>
|
@@ -301,16 +307,33 @@ function write_sel($n,$v){
|
|
301 |
Margin
|
302 |
</td>
|
303 |
<td valign="middle" colspan="5">
|
304 |
-
<input type="text" id="fourfifth_margin" name="fourfifth_margin" value="<?php echo $this->options['fourfifth_margin']; ?>" size="6">
|
305 |
|
306 |
<?php write_sel('fourfifth_margin_type',$this->options['fourfifth_margin_type']); ?>
|
307 |
</td>
|
308 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
</table>
|
311 |
|
312 |
<p>
|
313 |
-
<input type="submit" name="
|
314 |
</p>
|
315 |
|
316 |
</form>
|
1 |
<?php
|
2 |
function write_sel($n,$v){
|
3 |
+
echo '<select id="'.$n.'" name="'.$n.'" class="ezcol-input">' . "\r\n";
|
4 |
if($v == 'px'){
|
5 |
echo '<option value="px" selected="selected">px</option>' . "\r\n";
|
6 |
echo '<option value="%">%</option>' . "\r\n";
|
11 |
echo '</select>' . "\r\n";
|
12 |
}
|
13 |
?>
|
14 |
+
<style>
|
15 |
+
.ezcol-input {
|
16 |
+
border-radius: 3px !important;
|
17 |
+
border: 1px solid #888 !important;
|
18 |
+
}
|
19 |
+
</style>
|
20 |
<div class="wrap" style="max-width:950px !important;">
|
21 |
|
22 |
<a href="http://www.patrickfriedl.com.com/wordpress/easy-columns" target="_blank">
|
78 |
</td>
|
79 |
<td valign="middle">
|
80 |
<?php if($this->options['use_custom']){ ?>
|
81 |
+
<input type="checkbox" id="use_custom" name="use_custom" value="true" checked="checked" class="ezcol-input">
|
82 |
<?php } else { ?>
|
83 |
+
<input type="checkbox" id="use_custom" name="use_custom" value="true" class="ezcol-input">
|
84 |
<?php } ?>
|
85 |
</td>
|
86 |
</tr>
|
109 |
Width
|
110 |
</td>
|
111 |
<td valign="middle">
|
112 |
+
<input type="text" id="quarter_width" name="quarter_width" value="<?php echo $this->options['quarter_width']; ?>" size="6" class="ezcol-input">
|
113 |
|
114 |
<?php write_sel('quarter_width_type',$this->options['quarter_width_type']); ?>
|
115 |
</td>
|
117 |
Width
|
118 |
</td>
|
119 |
<td valign="middle">
|
120 |
+
<input type="text" id="onehalf_width" name="onehalf_width" value="<?php echo $this->options['onehalf_width']; ?>" size="6" class="ezcol-input">
|
121 |
|
122 |
<?php write_sel('onehalf_width_type',$this->options['onehalf_width_type']); ?>
|
123 |
</td>
|
125 |
Width
|
126 |
</td>
|
127 |
<td valign="middle">
|
128 |
+
<input type="text" id="threequarter_width" name="threequarter_width" value="<?php echo $this->options['threequarter_width']; ?>" size="6" class="ezcol-input">
|
129 |
|
130 |
<?php write_sel('threequarter_width_type',$this->options['threequarter_width_type']); ?>
|
131 |
</td>
|
136 |
Margin
|
137 |
</td>
|
138 |
<td valign="middle">
|
139 |
+
<input type="text" id="quarter_margin" name="quarter_margin" value="<?php echo $this->options['quarter_margin']; ?>" size="6" class="ezcol-input">
|
140 |
|
141 |
<?php write_sel('quarter_margin_type',$this->options['quarter_margin_type']); ?>
|
142 |
</td>
|
144 |
Margin
|
145 |
</td>
|
146 |
<td valign="middle">
|
147 |
+
<input type="text" id="onehalf_margin" name="onehalf_margin" value="<?php echo $this->options['onehalf_margin']; ?>" size="6" class="ezcol-input">
|
148 |
|
149 |
<?php write_sel('onehalf_margin_type',$this->options['onehalf_margin_type']); ?>
|
150 |
</td>
|
152 |
Margin
|
153 |
</td>
|
154 |
<td valign="middle">
|
155 |
+
<input type="text" id="threequarter_margin" name="threequarter_margin" value="<?php echo $this->options['threequarter_margin']; ?>" size="6" class="ezcol-input">
|
156 |
|
157 |
<?php write_sel('threequarter_margin_type',$this->options['threequarter_margin_type']); ?>
|
158 |
</td>
|
179 |
Width
|
180 |
</td>
|
181 |
<td valign="middle">
|
182 |
+
<input type="text" id="onethird_width" name="onethird_width" value="<?php echo $this->options['onethird_width']; ?>" size="6" class="ezcol-input">
|
183 |
|
184 |
<?php write_sel('onethird_width_type',$this->options['onethird_width_type']); ?>
|
185 |
</td>
|
187 |
Width
|
188 |
</td>
|
189 |
<td valign="middle">
|
190 |
+
<input type="text" id="twothird_width" name="twothird_width" value="<?php echo $this->options['twothird_width']; ?>" size="6" class="ezcol-input">
|
191 |
|
192 |
<?php write_sel('twothird_width_type',$this->options['twothird_width_type']); ?>
|
193 |
</td>
|
200 |
Margin
|
201 |
</td>
|
202 |
<td valign="middle">
|
203 |
+
<input type="text" id="onethird_margin" name="onethird_margin" value="<?php echo $this->options['onethird_margin']; ?>" size="6" class="ezcol-input">
|
204 |
|
205 |
<?php write_sel('onethird_margin_type',$this->options['onethird_margin_type']); ?>
|
206 |
</td>
|
208 |
Margin
|
209 |
</td>
|
210 |
<td valign="middle">
|
211 |
+
<input type="text" id="twothird_margin" name="twothird_margin" value="<?php echo $this->options['twothird_margin']; ?>" size="6" class="ezcol-input">
|
212 |
|
213 |
<?php write_sel('twothird_margin_type',$this->options['twothird_margin_type']); ?>
|
214 |
</td>
|
238 |
Width
|
239 |
</td>
|
240 |
<td valign="middle">
|
241 |
+
<input type="text" id="onefifth_width" name="onefifth_width" value="<?php echo $this->options['onefifth_width']; ?>" size="6" class="ezcol-input">
|
242 |
|
243 |
<?php write_sel('onefifth_width_type',$this->options['onefifth_width_type']); ?>
|
244 |
</td>
|
246 |
Width
|
247 |
</td>
|
248 |
<td valign="middle">
|
249 |
+
<input type="text" id="twofifth_width" name="twofifth_width" value="<?php echo $this->options['twofifth_width']; ?>" size="6" class="ezcol-input">
|
250 |
|
251 |
<?php write_sel('twofifth_width_type',$this->options['twofifth_width_type']); ?>
|
252 |
</td>
|
254 |
Width
|
255 |
</td>
|
256 |
<td valign="middle">
|
257 |
+
<input type="text" id="threefifth_width" name="threefifth_width" value="<?php echo $this->options['threefifth_width']; ?>" size="6" class="ezcol-input">
|
258 |
|
259 |
<?php write_sel('threefifth_width_type',$this->options['threefifth_width_type']); ?>
|
260 |
</td>
|
264 |
Margin
|
265 |
</td>
|
266 |
<td valign="middle">
|
267 |
+
<input type="text" id="onefifth_margin" name="onefifth_margin" value="<?php echo $this->options['onefifth_margin']; ?>" size="6" class="ezcol-input">
|
268 |
|
269 |
<?php write_sel('onefifth_margin_type',$this->options['onefifth_margin_type']); ?>
|
270 |
</td>
|
272 |
Margin
|
273 |
</td>
|
274 |
<td valign="middle">
|
275 |
+
<input type="text" id="twofifth_margin" name="twofifth_margin" value="<?php echo $this->options['twofifth_margin']; ?>" size="6" class="ezcol-input">
|
276 |
|
277 |
<?php write_sel('twofifth_margin_type',$this->options['twofifth_margin_type']); ?>
|
278 |
</td>
|
280 |
Margin
|
281 |
</td>
|
282 |
<td valign="middle">
|
283 |
+
<input type="text" id="threefifth_margin" name="threefifth_margin" value="<?php echo $this->options['threefifth_margin']; ?>" size="6" class="ezcol-input">
|
284 |
|
285 |
<?php write_sel('threefifth_margin_type',$this->options['threefifth_margin_type']); ?>
|
286 |
</td>
|
297 |
Width
|
298 |
</td>
|
299 |
<td valign="middle" colspan="5">
|
300 |
+
<input type="text" id="fourfifth_width" name="fourfifth_width" value="<?php echo $this->options['fourfifth_width']; ?>" size="6" class="ezcol-input">
|
301 |
|
302 |
<?php write_sel('fourfifth_width_type',$this->options['fourfifth_width_type']); ?>
|
303 |
</td>
|
307 |
Margin
|
308 |
</td>
|
309 |
<td valign="middle" colspan="5">
|
310 |
+
<input type="text" id="fourfifth_margin" name="fourfifth_margin" value="<?php echo $this->options['fourfifth_margin']; ?>" size="6" class="ezcol-input">
|
311 |
|
312 |
<?php write_sel('fourfifth_margin_type',$this->options['fourfifth_margin_type']); ?>
|
313 |
</td>
|
314 |
</tr>
|
315 |
+
<tr>
|
316 |
+
<td colspan="6">
|
317 |
+
<hr>
|
318 |
+
</td>
|
319 |
+
</tr>
|
320 |
+
</table>
|
321 |
|
322 |
+
<table border="0" cellpadding="2" cellspacing="4">
|
323 |
+
<tr>
|
324 |
+
<td valign="middle" colspan="6">
|
325 |
+
<strong>Custom CSS</strong>
|
326 |
+
</td>
|
327 |
+
</tr>
|
328 |
+
<tr>
|
329 |
+
<td valign="middle">
|
330 |
+
<textarea id="custom_css" name="custom_css" cols="80" rows="10" class="ezcol-input"><?php echo $this->options['custom_css']; ?></textarea>
|
331 |
+
</td>
|
332 |
+
</tr>
|
333 |
</table>
|
334 |
|
335 |
<p>
|
336 |
+
<input type="submit" value="Update" name="submit" class="button button-primary button-large">
|
337 |
</p>
|
338 |
|
339 |
</form>
|
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 |
|
@@ -208,7 +208,7 @@ if(!class_exists("EasyColumns")){
|
|
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))?
|
212 |
$att_str .= '"';
|
213 |
$att_str .= (!empty($id))? ' id="'.$id.'"' : '';
|
214 |
$att_str .= (!empty($style))? ' style="'.$style.'"' : '';
|
@@ -225,94 +225,89 @@ if(!class_exists("EasyColumns")){
|
|
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 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
){
|
243 |
-
|
244 |
-
<!-- Begin Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> Custom CSS -->
|
245 |
-
<style type="text/css" media="screen, projection">
|
246 |
-
<?php
|
247 |
-
if(isset($this->options['quarter_width']) || isset($this->options['quarter_margin']))
|
248 |
{
|
249 |
echo '.ezcol-one-quarter {';
|
250 |
-
if(
|
251 |
-
if(
|
252 |
-
echo '}
|
253 |
}
|
254 |
-
if(
|
255 |
{
|
256 |
echo '.ezcol-one-half {';
|
257 |
-
if(
|
258 |
-
if(
|
259 |
-
echo '}
|
260 |
}
|
261 |
-
if(
|
262 |
{
|
263 |
echo '.ezcol-three-quarter {';
|
264 |
-
if(
|
265 |
-
if(
|
266 |
-
echo '}
|
267 |
}
|
268 |
-
if(
|
269 |
{
|
270 |
echo '.ezcol-one-third {';
|
271 |
-
if(
|
272 |
-
if(
|
273 |
-
echo '}
|
274 |
}
|
275 |
-
if(
|
276 |
{
|
277 |
echo '.ezcol-two-third {';
|
278 |
-
if(
|
279 |
-
if(
|
280 |
-
echo '}';
|
281 |
}
|
282 |
-
if(
|
283 |
{
|
284 |
echo '.ezcol-one-fifth {';
|
285 |
-
if(
|
286 |
-
if(
|
287 |
-
echo '}';
|
288 |
}
|
289 |
-
if(
|
290 |
{
|
291 |
echo '.ezcol-two-fifth {';
|
292 |
-
if(
|
293 |
-
if(
|
294 |
-
echo '}';
|
295 |
}
|
296 |
-
if(
|
297 |
{
|
298 |
echo '.ezcol-three-fifth {';
|
299 |
-
if(
|
300 |
-
if(
|
301 |
-
echo '}';
|
302 |
}
|
303 |
-
if(
|
304 |
{
|
305 |
echo '.ezcol-four-fifth {';
|
306 |
-
if(
|
307 |
-
if(
|
308 |
-
echo '}';
|
309 |
}
|
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 |
|
@@ -385,7 +380,8 @@ if(!class_exists("EasyColumns")){
|
|
385 |
'fourfifth_width' => '',
|
386 |
'fourfifth_width_type' => '%',
|
387 |
'fourfifth_margin' => '',
|
388 |
-
'fourfifth_margin_type' => '%'
|
|
|
389 |
);
|
390 |
|
391 |
// get saved options
|
@@ -426,7 +422,7 @@ if(!class_exists("EasyColumns")){
|
|
426 |
$options[$key] = $value;
|
427 |
}
|
428 |
$this->options = $options;
|
429 |
-
$this->options['use_custom'] = (
|
430 |
update_option($this->ez_columns_options_name, $this->options);
|
431 |
|
432 |
echo '<div class="updated fade"><p>Plugin settings saved.</p></div>';
|
@@ -477,7 +473,7 @@ if (class_exists("EasyColumns")) {
|
|
477 |
if (isset($ez_columns)) {
|
478 |
if (function_exists('register_uninstall_hook'))
|
479 |
{
|
480 |
-
register_uninstall_hook(__FILE__, array(
|
481 |
}
|
482 |
}
|
483 |
?>
|
2 |
/*
|
3 |
Plugin Name: Easy Columns
|
4 |
Plugin URI: http://www.patrickfriedl.com/
|
5 |
+
Version: v2.1.2
|
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 |
|
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.'"' : '';
|
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 if($this->use_custom || !empty($this->options['custom_css'])){ ?>
|
229 |
+
<!-- Begin Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> Custom CSS -->
|
230 |
+
<style type="text/css">
|
231 |
+
<?php if(
|
232 |
+
!empty($this->options['quarter_width']) || !empty($this->options['quarter_margin']) ||
|
233 |
+
!empty($this->options['onehalf_width']) || !empty($this->options['onehalf_margin']) ||
|
234 |
+
!empty($this->options['threequarter_width']) || !empty($this->options['threequarter_margin']) ||
|
235 |
+
!empty($this->options['onethird_width']) || !empty($this->options['onethird_margin']) ||
|
236 |
+
!empty($this->options['twothird_width']) || !empty($this->options['twothird_margin']) ||
|
237 |
+
!empty($this->options['twothird_width']) || !empty($this->options['twothird_margin']) ||
|
238 |
+
!empty($this->options['fifth_width']) || !empty($this->options['fifth_margin']) ||
|
239 |
+
!empty($this->options['twofifth_width']) || !empty($this->options['twofifth_margin']) ||
|
240 |
+
!empty($this->options['threefifth_width']) || !empty($this->options['threefifth_margin']) ||
|
241 |
+
!empty($this->options['fourfifth_width']) || !empty($this->options['fourfifth_margin'])
|
242 |
){
|
243 |
+
if(!empty($this->options['quarter_width']) || !empty($this->options['quarter_margin']))
|
|
|
|
|
|
|
|
|
244 |
{
|
245 |
echo '.ezcol-one-quarter {';
|
246 |
+
if(!empty($this->options['quarter_width'])) { echo 'width:'.$this->options['quarter_width'].$this->options['quarter_width_type'].';'; }
|
247 |
+
if(!empty($this->options['quarter_margin'])) { echo 'margin-right:'.$this->options['quarter_margin'].$this->options['quarter_margin_type'].';'; }
|
248 |
+
echo '}' . "\n";
|
249 |
}
|
250 |
+
if(!empty($this->options['onehalf_width']) || !empty($this->options['onehalf_margin']))
|
251 |
{
|
252 |
echo '.ezcol-one-half {';
|
253 |
+
if(!empty($this->options['onehalf_width'])) { echo 'width:'.$this->options['onehalf_width'].$this->options['onehalf_width_type'].';'; }
|
254 |
+
if(!empty($this->options['>onehalf_margin'])) { echo 'margin-right:'.$this->options['onehalf_margin'].$this->options['onehalf_margin_type'].';'; }
|
255 |
+
echo '}' . "\n";
|
256 |
}
|
257 |
+
if(!empty($this->options['threequarter_width']) || !empty($this->options['threequarter_margin']))
|
258 |
{
|
259 |
echo '.ezcol-three-quarter {';
|
260 |
+
if(!empty($this->options['threequarter_width'])) { echo 'width:'.$this->options['threequarter_width'].$this->options['threequarter_width_type'].';'; }
|
261 |
+
if(!empty($this->options['threequarter_margin'])) { echo 'margin-right:'.$this->options['threequarter_margin'].$this->options['threequarter_margin_type'].';'; }
|
262 |
+
echo '}' . "\n";
|
263 |
}
|
264 |
+
if(!empty($this->options['onethird_width']) || !empty($this->options['onethird_margin']))
|
265 |
{
|
266 |
echo '.ezcol-one-third {';
|
267 |
+
if(!empty($this->options['onethird_width'])) { echo 'width:'.$this->options['onethird_width'].$this->options['onethird_width_type'].';'; }
|
268 |
+
if(!empty($this->options['onethird_margin'])) { echo 'margin-right:'.$this->options['onethird_margin'].$this->options['onethird_margin_type'].';'; }
|
269 |
+
echo '}' . "\n";
|
270 |
}
|
271 |
+
if(!empty($this->options['twothird_width']) || !empty($this->options['twothird_margin']))
|
272 |
{
|
273 |
echo '.ezcol-two-third {';
|
274 |
+
if(!empty($this->options['twothird_width'])) { echo 'width:'.$this->options['twothird_width'].$this->options['twothird_width_type'].';'; }
|
275 |
+
if(!empty($this->options['twothird_margin'])) { echo 'margin-right:'.$this->options['twothird_margin'].$this->options['twothird_margin_type'].';'; }
|
276 |
+
echo '}' . "\n";
|
277 |
}
|
278 |
+
if(!empty($this->options['fifth_width']) || !empty($this->options['fifth_margin']))
|
279 |
{
|
280 |
echo '.ezcol-one-fifth {';
|
281 |
+
if(!empty($this->options['fifth_width'])) { echo 'width:'.$this->options['fifth_width'].$this->options['fifth_width_type'].';'; }
|
282 |
+
if(!empty($this->options['fifth_margin'])) { echo 'margin-right:'.$this->options['fifth_margin'].$this->options['fifth_margin_type'].';'; }
|
283 |
+
echo '}' . "\n";
|
284 |
}
|
285 |
+
if(!empty($this->options['twofifth_width']) || !empty($this->options['twofifth_margin']))
|
286 |
{
|
287 |
echo '.ezcol-two-fifth {';
|
288 |
+
if(!empty($this->options['twofifth_width'])) { echo 'width:'.$this->options['twofifth_width'].$this->options['twofifth_width_type'].';'; }
|
289 |
+
if(!empty($this->options['twofifth_margin'])) { echo 'margin-right:'.$this->options['twofifth_margin'].$this->options['twofifth_margin_type'].';'; }
|
290 |
+
echo '}' . "\n";
|
291 |
}
|
292 |
+
if(!empty($this->options['threefifth_width']) || !empty($this->options['threefifth_margin']))
|
293 |
{
|
294 |
echo '.ezcol-three-fifth {';
|
295 |
+
if(!empty($this->options['threefifth_width'])) { echo 'width:'.$this->options['threefifth_width'].$this->options['threefifth_width_type'].'; '; }
|
296 |
+
if(!empty($this->options['threefifth_margin'])) { echo 'margin-right:'.$this->options['threefifth_margin'].$this->options['threefifth_margin_type'].';'; }
|
297 |
+
echo '}' . "\n";
|
298 |
}
|
299 |
+
if(!empty($this->options['fourfifth_width']) || !empty($this->options['fourfifth_margin']))
|
300 |
{
|
301 |
echo '.ezcol-four-fifth {';
|
302 |
+
if(!empty($this->options['fourfifth_width'])) { echo 'width:'.$this->options['fourfifth_width'].$this->options['fourfifth_width_type'].';'; }
|
303 |
+
if(!empty($this->options['fourfifth_margin'])) { echo 'margin-right:'.$this->options['fourfifth_margin'].$this->options['fourfifth_margin_type'].';'; }
|
304 |
+
echo '}' . "\n";
|
305 |
}
|
|
|
|
|
|
|
|
|
|
|
306 |
}
|
307 |
+
if(!empty($this->options['custom_css'])){ echo $this->options['custom_css'] . "\n"; } ?>
|
308 |
+
</style>
|
309 |
+
<!-- End Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> Custom CSS -->
|
310 |
+
<?php
|
311 |
} // end if($this->use_custom)
|
312 |
}// end add_css
|
313 |
|
380 |
'fourfifth_width' => '',
|
381 |
'fourfifth_width_type' => '%',
|
382 |
'fourfifth_margin' => '',
|
383 |
+
'fourfifth_margin_type' => '%',
|
384 |
+
'custom_css' => ''
|
385 |
);
|
386 |
|
387 |
// get saved options
|
422 |
$options[$key] = $value;
|
423 |
}
|
424 |
$this->options = $options;
|
425 |
+
$this->options['use_custom'] = (!empty($_POST['use_custom']))? true : false;
|
426 |
update_option($this->ez_columns_options_name, $this->options);
|
427 |
|
428 |
echo '<div class="updated fade"><p>Plugin settings saved.</p></div>';
|
473 |
if (isset($ez_columns)) {
|
474 |
if (function_exists('register_uninstall_hook'))
|
475 |
{
|
476 |
+
register_uninstall_hook(__FILE__, array('EasyColumns', 'uninstall'));
|
477 |
}
|
478 |
}
|
479 |
?>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Pat Friedl
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=donations&business=T8V954QPLEW2J
|
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 |
|
@@ -24,7 +24,7 @@ To create content with 3 columns, you would use the shortcodes like this:
|
|
24 |
|
25 |
[ezcol_1third]this is column 1[/ezcol_1third]
|
26 |
[ezcol_1third]this is column 2[/ezcol_1third]
|
27 |
-
[ezcol_1third_end]this is column 3[/ezcol_1third_end]
|
28 |
|
29 |
The result are 3 columns about 33% in width of their container.
|
30 |
|
@@ -112,6 +112,16 @@ Upgrade normally via your Wordpress admin -> Plugins panel.
|
|
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)
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=donations&business=T8V954QPLEW2J
|
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.1
|
7 |
+
Stable tag: 2.1.2
|
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 |
|
24 |
|
25 |
[ezcol_1third]this is column 1[/ezcol_1third]
|
26 |
[ezcol_1third]this is column 2[/ezcol_1third]
|
27 |
+
[ezcol_1third_end]this is column 3[/ezcol_1third_end]
|
28 |
|
29 |
The result are 3 columns about 33% in width of their container.
|
30 |
|
112 |
|
113 |
== Changelog ==
|
114 |
|
115 |
+
= 2.1.2 =
|
116 |
+
* Changed the tinyMCE window to load wp-load.php instead of wp-config.php
|
117 |
+
* Added jQuery to tinyMCE window
|
118 |
+
* Added class input to column selection - applies a CSS class name to all the columns you insert
|
119 |
+
* Added better styling to the options page
|
120 |
+
* Fixed the custom CSS not rendering issue - Easy Columns options will now render.
|
121 |
+
* Added a Custom CSS option to the options page - style columns with custom classes or use the base classes!
|
122 |
+
* Changed ezcol-divider class to be height: 0 margin: 0
|
123 |
+
* Should have any uninstall hook erros fixed
|
124 |
+
|
125 |
= 2.1.1 =
|
126 |
* Added parent class to keep content max-wisth at 100% to prevent overflow
|
127 |
* fixed fractional display of text in columns (removed CSS3 text enhancements)
|
tinymce/editor_plugin.js
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
ed.windowManager.open({
|
20 |
file : url + '/window.php?',
|
21 |
width : 764 + ed.getLang('ezColumns.delta_width', 0),
|
22 |
-
height :
|
23 |
inline : 1
|
24 |
}, {
|
25 |
plugin_url : url // Plugin absolute URL
|
19 |
ed.windowManager.open({
|
20 |
file : url + '/window.php?',
|
21 |
width : 764 + ed.getLang('ezColumns.delta_width', 0),
|
22 |
+
height : 520 + ed.getLang('ezColumns.delta_height', 0),
|
23 |
inline : 1
|
24 |
}, {
|
25 |
plugin_url : url // Plugin absolute URL
|
tinymce/window.php
CHANGED
@@ -1,17 +1,14 @@
|
|
1 |
<?php
|
2 |
-
while(!is_file('wp-
|
3 |
if(is_dir('../')){ chdir('../'); }
|
4 |
-
else die('Could not find
|
5 |
}
|
6 |
-
|
7 |
-
|
8 |
-
wp_enqueue_script('jquery');
|
9 |
-
global $wp_scripts;
|
10 |
-
global $wpdb;
|
11 |
-
|
12 |
// check for rights
|
13 |
if ( !is_user_logged_in() || !current_user_can('edit_posts') )
|
14 |
wp_die(__("You are not allowed to be here"));
|
|
|
|
|
15 |
?>
|
16 |
<!DOCTYPE html>
|
17 |
<html>
|
@@ -44,160 +41,164 @@ if ( !is_user_logged_in() || !current_user_can('edit_posts') )
|
|
44 |
text-align: center;
|
45 |
}
|
46 |
</style>
|
47 |
-
<script
|
48 |
-
<script
|
49 |
-
<script
|
50 |
-
<script
|
|
|
|
|
51 |
var colTxt = ' ';
|
52 |
function init() {
|
53 |
tinyMCEPopup.resizeToInnerSize();
|
54 |
}
|
55 |
|
56 |
function insertColumns(col) {
|
57 |
-
colTxt = '
|
|
|
|
|
58 |
switch(col)
|
59 |
{
|
60 |
/* single columns */
|
61 |
case 'quarter':
|
62 |
-
colTxt += '[ezcol_1quarter
|
63 |
break;
|
64 |
case 'half':
|
65 |
-
colTxt += '[ezcol_1half
|
66 |
break;
|
67 |
case 'threequarter':
|
68 |
-
colTxt += '[ezcol_3quarter
|
69 |
break;
|
70 |
case 'third':
|
71 |
-
colTxt += '[ezcol_1third
|
72 |
break;
|
73 |
case 'twothirds':
|
74 |
-
colTxt += '[ezcol_2third
|
75 |
break;
|
76 |
case 'onefifth':
|
77 |
-
colTxt += '[ezcol_1fifth
|
78 |
break;
|
79 |
case 'twofifths':
|
80 |
-
colTxt += '[ezcol_2fifth
|
81 |
break;
|
82 |
case 'threefifths':
|
83 |
-
colTxt += '[ezcol_3fifth
|
84 |
break;
|
85 |
case 'fourfifths':
|
86 |
-
colTxt += '[ezcol_4fifth
|
87 |
break;
|
88 |
|
89 |
/* 1/3, 2/3 */
|
90 |
case '3third':
|
91 |
-
colTxt += '[ezcol_1third
|
92 |
-
colTxt += '[ezcol_1third
|
93 |
-
colTxt += '[ezcol_1third_end
|
94 |
break;
|
95 |
case '1third2third':
|
96 |
-
colTxt += '[ezcol_1third
|
97 |
-
colTxt += '[ezcol_2third_end
|
98 |
break;
|
99 |
case '2third1third':
|
100 |
-
colTxt += '[ezcol_2third
|
101 |
-
colTxt += '[ezcol_1third_end
|
102 |
break;
|
103 |
|
104 |
/* 1/4, 1/2, 3/4 */
|
105 |
case '4quarter':
|
106 |
-
colTxt += '[ezcol_1quarter
|
107 |
-
colTxt += '[ezcol_1quarter
|
108 |
-
colTxt += '[ezcol_1quarter
|
109 |
-
colTxt += '[ezcol_1quarter_end
|
110 |
break;
|
111 |
case '1half2quarter':
|
112 |
-
colTxt += '[ezcol_1half
|
113 |
-
colTxt += '[ezcol_1quarter
|
114 |
-
colTxt += '[ezcol_1quarter_end
|
115 |
break;
|
116 |
case 'quarterhalfquarter':
|
117 |
-
colTxt += '[ezcol_1quarter
|
118 |
-
colTxt += '[ezcol_1half
|
119 |
-
colTxt += '[ezcol_1quarter_end
|
120 |
break;
|
121 |
case '2quarter1half':
|
122 |
-
colTxt += '[ezcol_1quarter
|
123 |
-
colTxt += '[ezcol_1quarter
|
124 |
-
colTxt += '[ezcol_1half_end
|
125 |
break;
|
126 |
case '2half':
|
127 |
-
colTxt += '[ezcol_1half
|
128 |
-
colTxt += '[ezcol_1half_end
|
129 |
break;
|
130 |
case '1quarter3quarter':
|
131 |
-
colTxt += '[ezcol_1quarter
|
132 |
-
colTxt += '[ezcol_3quarter_end
|
133 |
break;
|
134 |
case '3quarter1quarter':
|
135 |
-
colTxt += '[ezcol_3quarter
|
136 |
-
colTxt += '[ezcol_1quarter_end
|
137 |
break;
|
138 |
|
139 |
/* 1/5, 2/5, 3/5, 4/5 */
|
140 |
case '5fifth':
|
141 |
-
colTxt += '[ezcol_1fifth
|
142 |
-
colTxt += '[ezcol_1fifth
|
143 |
-
colTxt += '[ezcol_1fifth
|
144 |
-
colTxt += '[ezcol_1fifth
|
145 |
-
colTxt += '[ezcol_1fifth_end
|
146 |
break;
|
147 |
case '2fifth31fifth':
|
148 |
-
colTxt += '[ezcol_2fifth
|
149 |
-
colTxt += '[ezcol_1fifth
|
150 |
-
colTxt += '[ezcol_1fifth
|
151 |
-
colTxt += '[ezcol_1fifth_end
|
152 |
break;
|
153 |
case '1fifth2fifth21fifth':
|
154 |
-
colTxt += '[ezcol_1fifth
|
155 |
-
colTxt += '[ezcol_2fifth
|
156 |
-
colTxt += '[ezcol_1fifth
|
157 |
-
colTxt += '[ezcol_1fifth_end
|
158 |
break;
|
159 |
case '21fifth2fifth1fifth':
|
160 |
-
colTxt += '[ezcol_1fifth
|
161 |
-
colTxt += '[ezcol_1fifth
|
162 |
-
colTxt += '[ezcol_2fifth
|
163 |
-
colTxt += '[ezcol_1fifth_end
|
164 |
break;
|
165 |
case '31fifth2fifth':
|
166 |
-
colTxt += '[ezcol_1fifth
|
167 |
-
colTxt += '[ezcol_1fifth
|
168 |
-
colTxt += '[ezcol_1fifth
|
169 |
-
colTxt += '[ezcol_2fifth_end
|
170 |
break;
|
171 |
case '3fifth21fifth':
|
172 |
-
colTxt += '[ezcol_3fifth
|
173 |
-
colTxt += '[ezcol_1fifth
|
174 |
-
colTxt += '[ezcol_1fifth_end
|
175 |
break;
|
176 |
case '1fifth3fifth1fifth':
|
177 |
-
colTxt += '[ezcol_1fifth
|
178 |
-
colTxt += '[ezcol_3fifth
|
179 |
-
colTxt += '[ezcol_1fifth_end
|
180 |
break;
|
181 |
case '21fifth3fifth':
|
182 |
-
colTxt += '[ezcol_1fifth
|
183 |
-
colTxt += '[ezcol_1fifth
|
184 |
-
colTxt += '[ezcol_3fifth_end
|
185 |
break;
|
186 |
case '2fifth3fifth':
|
187 |
-
colTxt += '[ezcol_2fifth
|
188 |
-
colTxt += '[ezcol_3fifth_end
|
189 |
break;
|
190 |
case '3fifth2fifth':
|
191 |
-
colTxt += '[ezcol_3fifth
|
192 |
-
colTxt += '[ezcol_2fifth_end
|
193 |
break;
|
194 |
case '1fifth4fifth':
|
195 |
-
colTxt += '[ezcol_1fifth
|
196 |
-
colTxt += '[ezcol_4fifth_end
|
197 |
break;
|
198 |
case '4fifth1fifth':
|
199 |
-
colTxt += '[ezcol_4fifth
|
200 |
-
colTxt += '[ezcol_1fifth_end
|
201 |
break;
|
202 |
}
|
203 |
insertText();
|
@@ -435,6 +436,17 @@ select {
|
|
435 |
</tr>
|
436 |
</table>
|
437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
<hr>
|
439 |
|
440 |
<table border="0" cellpadding="2" cellspacing="0" width="100%">
|
1 |
<?php
|
2 |
+
while(!is_file('wp-load.php')){
|
3 |
if(is_dir('../')){ chdir('../'); }
|
4 |
+
else die('Could not find wp-load.php.');
|
5 |
}
|
6 |
+
require_once('wp-load.php');
|
|
|
|
|
|
|
|
|
|
|
7 |
// check for rights
|
8 |
if ( !is_user_logged_in() || !current_user_can('edit_posts') )
|
9 |
wp_die(__("You are not allowed to be here"));
|
10 |
+
global $wp_scripts;
|
11 |
+
global $wpdb;
|
12 |
?>
|
13 |
<!DOCTYPE html>
|
14 |
<html>
|
41 |
text-align: center;
|
42 |
}
|
43 |
</style>
|
44 |
+
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
|
45 |
+
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
46 |
+
<script src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
|
47 |
+
<script src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
|
48 |
+
<script src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
|
49 |
+
<script>
|
50 |
var colTxt = ' ';
|
51 |
function init() {
|
52 |
tinyMCEPopup.resizeToInnerSize();
|
53 |
}
|
54 |
|
55 |
function insertColumns(col) {
|
56 |
+
colTxt = '';
|
57 |
+
colClass = jQuery('#txtColClass').val().trim();
|
58 |
+
colClass = (colClass != '')? ' class="'+colClass+'"' : '' ;
|
59 |
switch(col)
|
60 |
{
|
61 |
/* single columns */
|
62 |
case 'quarter':
|
63 |
+
colTxt += '[ezcol_1quarter]Quarter Column[/ezcol_1quarter]';
|
64 |
break;
|
65 |
case 'half':
|
66 |
+
colTxt += '[ezcol_1half]Half Column[/ezcol_1half]';
|
67 |
break;
|
68 |
case 'threequarter':
|
69 |
+
colTxt += '[ezcol_3quarter]Three Quarter Column[/ezcol_3quarter]';
|
70 |
break;
|
71 |
case 'third':
|
72 |
+
colTxt += '[ezcol_1third]Third Column[/ezcol_1third]';
|
73 |
break;
|
74 |
case 'twothirds':
|
75 |
+
colTxt += '[ezcol_2third]Two Thirds Column[/ezcol_2third]';
|
76 |
break;
|
77 |
case 'onefifth':
|
78 |
+
colTxt += '[ezcol_1fifth]One Fifth Column[/ezcol_1fifth]';
|
79 |
break;
|
80 |
case 'twofifths':
|
81 |
+
colTxt += '[ezcol_2fifth]Two Fifths Column[/ezcol_2fifth]';
|
82 |
break;
|
83 |
case 'threefifths':
|
84 |
+
colTxt += '[ezcol_3fifth]Three Fifths Column[/ezcol_3fifth]';
|
85 |
break;
|
86 |
case 'fourfifths':
|
87 |
+
colTxt += '[ezcol_4fifth]Four Fifths Column[/ezcol_4fifth]';
|
88 |
break;
|
89 |
|
90 |
/* 1/3, 2/3 */
|
91 |
case '3third':
|
92 |
+
colTxt += '[ezcol_1third'+colClass+']Third Column[/ezcol_1third] ';
|
93 |
+
colTxt += '[ezcol_1third'+colClass+']Third Column[/ezcol_1third] ';
|
94 |
+
colTxt += '[ezcol_1third_end'+colClass+']Third Column[/ezcol_1third_end]';
|
95 |
break;
|
96 |
case '1third2third':
|
97 |
+
colTxt += '[ezcol_1third'+colClass+']Third Column[/ezcol_1third] ';
|
98 |
+
colTxt += '[ezcol_2third_end'+colClass+']Two Thirds Column[/ezcol_2third_end]';
|
99 |
break;
|
100 |
case '2third1third':
|
101 |
+
colTxt += '[ezcol_2third'+colClass+']Two Thirds Column[/ezcol_2third] ';
|
102 |
+
colTxt += '[ezcol_1third_end'+colClass+']Third Column[/ezcol_1third_end]';
|
103 |
break;
|
104 |
|
105 |
/* 1/4, 1/2, 3/4 */
|
106 |
case '4quarter':
|
107 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
108 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
109 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
110 |
+
colTxt += '[ezcol_1quarter_end'+colClass+']Quarter Column[/ezcol_1quarter_end]';
|
111 |
break;
|
112 |
case '1half2quarter':
|
113 |
+
colTxt += '[ezcol_1half'+colClass+']Half Column[/ezcol_1half] ';
|
114 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
115 |
+
colTxt += '[ezcol_1quarter_end'+colClass+']Quarter Column[/ezcol_1quarter_end]';
|
116 |
break;
|
117 |
case 'quarterhalfquarter':
|
118 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
119 |
+
colTxt += '[ezcol_1half'+colClass+']Half Column[/ezcol_1half] ';
|
120 |
+
colTxt += '[ezcol_1quarter_end'+colClass+']Quarter Column[/ezcol_1quarter_end]';
|
121 |
break;
|
122 |
case '2quarter1half':
|
123 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
124 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
125 |
+
colTxt += '[ezcol_1half_end'+colClass+']Half Column[/ezcol_1half_end]';
|
126 |
break;
|
127 |
case '2half':
|
128 |
+
colTxt += '[ezcol_1half'+colClass+']Half Column[/ezcol_1half] ';
|
129 |
+
colTxt += '[ezcol_1half_end'+colClass+']Half Column[/ezcol_1half_end]';
|
130 |
break;
|
131 |
case '1quarter3quarter':
|
132 |
+
colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] ';
|
133 |
+
colTxt += '[ezcol_3quarter_end'+colClass+']Three Quarter Column[/ezcol_3quarter_end]';
|
134 |
break;
|
135 |
case '3quarter1quarter':
|
136 |
+
colTxt += '[ezcol_3quarter'+colClass+']Three Quarter Column[/ezcol_3quarter] ';
|
137 |
+
colTxt += '[ezcol_1quarter_end'+colClass+']Quarter Column[/ezcol_1quarter_end]';
|
138 |
break;
|
139 |
|
140 |
/* 1/5, 2/5, 3/5, 4/5 */
|
141 |
case '5fifth':
|
142 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
143 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
144 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
145 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
146 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
147 |
break;
|
148 |
case '2fifth31fifth':
|
149 |
+
colTxt += '[ezcol_2fifth'+colClass+']Two Fifths Column[/ezcol_2fifth] ';
|
150 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
151 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
152 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
153 |
break;
|
154 |
case '1fifth2fifth21fifth':
|
155 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
156 |
+
colTxt += '[ezcol_2fifth'+colClass+']Two Fifths Column[/ezcol_2fifth] ';
|
157 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
158 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
159 |
break;
|
160 |
case '21fifth2fifth1fifth':
|
161 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
162 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
163 |
+
colTxt += '[ezcol_2fifth'+colClass+''+colClass+']Two Fifths Column[/ezcol_2fifth] ';
|
164 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
165 |
break;
|
166 |
case '31fifth2fifth':
|
167 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
168 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
169 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
170 |
+
colTxt += '[ezcol_2fifth_end'+colClass+']Two Fifths Column[/ezcol_2fifth_end]';
|
171 |
break;
|
172 |
case '3fifth21fifth':
|
173 |
+
colTxt += '[ezcol_3fifth'+colClass+']Three Fifths Column[/ezcol_3fifth] ';
|
174 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
175 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
176 |
break;
|
177 |
case '1fifth3fifth1fifth':
|
178 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
179 |
+
colTxt += '[ezcol_3fifth'+colClass+']Three Fifths Column[/ezcol_3fifth] ';
|
180 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
181 |
break;
|
182 |
case '21fifth3fifth':
|
183 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
184 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
185 |
+
colTxt += '[ezcol_3fifth_end'+colClass+']Three Fifths Column[/ezcol_3fifth_end]';
|
186 |
break;
|
187 |
case '2fifth3fifth':
|
188 |
+
colTxt += '[ezcol_2fifth'+colClass+']Two Fifths Column[/ezcol_2fifth] ';
|
189 |
+
colTxt += '[ezcol_3fifth_end'+colClass+']Three Fifths Column[/ezcol_3fifth_end]';
|
190 |
break;
|
191 |
case '3fifth2fifth':
|
192 |
+
colTxt += '[ezcol_3fifth'+colClass+']Three Fifths Column[/ezcol_3fifth] ';
|
193 |
+
colTxt += '[ezcol_2fifth_end'+colClass+']Two Fifths Column[/ezcol_2fifth_end]';
|
194 |
break;
|
195 |
case '1fifth4fifth':
|
196 |
+
colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] ';
|
197 |
+
colTxt += '[ezcol_4fifth_end'+colClass+']Four Fifths Column[/ezcol_4fifth_end]';
|
198 |
break;
|
199 |
case '4fifth1fifth':
|
200 |
+
colTxt += '[ezcol_4fifth'+colClass+']Four Fifths Column[/ezcol_4fifth] ';
|
201 |
+
colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]';
|
202 |
break;
|
203 |
}
|
204 |
insertText();
|
436 |
</tr>
|
437 |
</table>
|
438 |
|
439 |
+
<table border="0" cellpadding="2" cellspacing="0">
|
440 |
+
<tr>
|
441 |
+
<td class="hdrRow">
|
442 |
+
<h3><label for="txtColClass">Add Class to Columns:</label></h3>
|
443 |
+
</td>
|
444 |
+
<td>
|
445 |
+
<input type="text" id="txtColClass" size="10">
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
+
</table>
|
449 |
+
|
450 |
<hr>
|
451 |
|
452 |
<table border="0" cellpadding="2" cellspacing="0" width="100%">
|