Changeset 791582
- Timestamp:
- 10/22/2013 02:56:28 AM (12 years ago)
- Location:
- easy-columns/trunk
- Files:
-
- 6 edited
-
css/easy-columns.css (modified) (1 diff)
-
easy-columns-options.php (modified) (21 diffs)
-
easy-columns.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
-
tinymce/editor_plugin.js (modified) (1 diff)
-
tinymce/window.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-columns/trunk/css/easy-columns.css
r767230 r791582 86 86 clear: both !important; 87 87 display: block !important; 88 margin-bottom: 5px !important;89 padding-top: 5px !important;88 margin-bottom: 0px !important; 89 padding-top: 0px !important; 90 90 width: 100% !important; 91 91 background: none !important; -
easy-columns/trunk/easy-columns-options.php
r763435 r791582 1 1 <?php 2 2 function write_sel($n,$v){ 3 echo '<select id="'.$n.'" name="'.$n.'" >' . "\r\n";3 echo '<select id="'.$n.'" name="'.$n.'" class="ezcol-input">' . "\r\n"; 4 4 if($v == 'px'){ 5 5 echo '<option value="px" selected="selected">px</option>' . "\r\n"; … … 12 12 } 13 13 ?> 14 <style> 15 .ezcol-input { 16 border-radius: 3px !important; 17 border: 1px solid #888 !important; 18 } 19 </style> 14 20 <div class="wrap" style="max-width:950px !important;"> 15 21 … … 73 79 <td valign="middle"> 74 80 <?php if($this->options['use_custom']){ ?> 75 <input type="checkbox" id="use_custom" name="use_custom" value="true" checked="checked" >81 <input type="checkbox" id="use_custom" name="use_custom" value="true" checked="checked" class="ezcol-input"> 76 82 <?php } else { ?> 77 <input type="checkbox" id="use_custom" name="use_custom" value="true" >83 <input type="checkbox" id="use_custom" name="use_custom" value="true" class="ezcol-input"> 78 84 <?php } ?> 79 85 </td> … … 104 110 </td> 105 111 <td valign="middle"> 106 <input type="text" id="quarter_width" name="quarter_width" value="<?php echo $this->options['quarter_width']; ?>" size="6" >112 <input type="text" id="quarter_width" name="quarter_width" value="<?php echo $this->options['quarter_width']; ?>" size="6" class="ezcol-input"> 107 113 108 114 <?php write_sel('quarter_width_type',$this->options['quarter_width_type']); ?> … … 112 118 </td> 113 119 <td valign="middle"> 114 <input type="text" id="onehalf_width" name="onehalf_width" value="<?php echo $this->options['onehalf_width']; ?>" size="6" >120 <input type="text" id="onehalf_width" name="onehalf_width" value="<?php echo $this->options['onehalf_width']; ?>" size="6" class="ezcol-input"> 115 121 116 122 <?php write_sel('onehalf_width_type',$this->options['onehalf_width_type']); ?> … … 120 126 </td> 121 127 <td valign="middle"> 122 <input type="text" id="threequarter_width" name="threequarter_width" value="<?php echo $this->options['threequarter_width']; ?>" size="6" >128 <input type="text" id="threequarter_width" name="threequarter_width" value="<?php echo $this->options['threequarter_width']; ?>" size="6" class="ezcol-input"> 123 129 124 130 <?php write_sel('threequarter_width_type',$this->options['threequarter_width_type']); ?> … … 131 137 </td> 132 138 <td valign="middle"> 133 <input type="text" id="quarter_margin" name="quarter_margin" value="<?php echo $this->options['quarter_margin']; ?>" size="6" >139 <input type="text" id="quarter_margin" name="quarter_margin" value="<?php echo $this->options['quarter_margin']; ?>" size="6" class="ezcol-input"> 134 140 135 141 <?php write_sel('quarter_margin_type',$this->options['quarter_margin_type']); ?> … … 139 145 </td> 140 146 <td valign="middle"> 141 <input type="text" id="onehalf_margin" name="onehalf_margin" value="<?php echo $this->options['onehalf_margin']; ?>" size="6" >147 <input type="text" id="onehalf_margin" name="onehalf_margin" value="<?php echo $this->options['onehalf_margin']; ?>" size="6" class="ezcol-input"> 142 148 143 149 <?php write_sel('onehalf_margin_type',$this->options['onehalf_margin_type']); ?> … … 147 153 </td> 148 154 <td valign="middle"> 149 <input type="text" id="threequarter_margin" name="threequarter_margin" value="<?php echo $this->options['threequarter_margin']; ?>" size="6" >155 <input type="text" id="threequarter_margin" name="threequarter_margin" value="<?php echo $this->options['threequarter_margin']; ?>" size="6" class="ezcol-input"> 150 156 151 157 <?php write_sel('threequarter_margin_type',$this->options['threequarter_margin_type']); ?> … … 174 180 </td> 175 181 <td valign="middle"> 176 <input type="text" id="onethird_width" name="onethird_width" value="<?php echo $this->options['onethird_width']; ?>" size="6" >182 <input type="text" id="onethird_width" name="onethird_width" value="<?php echo $this->options['onethird_width']; ?>" size="6" class="ezcol-input"> 177 183 178 184 <?php write_sel('onethird_width_type',$this->options['onethird_width_type']); ?> … … 182 188 </td> 183 189 <td valign="middle"> 184 <input type="text" id="twothird_width" name="twothird_width" value="<?php echo $this->options['twothird_width']; ?>" size="6" >190 <input type="text" id="twothird_width" name="twothird_width" value="<?php echo $this->options['twothird_width']; ?>" size="6" class="ezcol-input"> 185 191 186 192 <?php write_sel('twothird_width_type',$this->options['twothird_width_type']); ?> … … 195 201 </td> 196 202 <td valign="middle"> 197 <input type="text" id="onethird_margin" name="onethird_margin" value="<?php echo $this->options['onethird_margin']; ?>" size="6" >203 <input type="text" id="onethird_margin" name="onethird_margin" value="<?php echo $this->options['onethird_margin']; ?>" size="6" class="ezcol-input"> 198 204 199 205 <?php write_sel('onethird_margin_type',$this->options['onethird_margin_type']); ?> … … 203 209 </td> 204 210 <td valign="middle"> 205 <input type="text" id="twothird_margin" name="twothird_margin" value="<?php echo $this->options['twothird_margin']; ?>" size="6" >211 <input type="text" id="twothird_margin" name="twothird_margin" value="<?php echo $this->options['twothird_margin']; ?>" size="6" class="ezcol-input"> 206 212 207 213 <?php write_sel('twothird_margin_type',$this->options['twothird_margin_type']); ?> … … 233 239 </td> 234 240 <td valign="middle"> 235 <input type="text" id="onefifth_width" name="onefifth_width" value="<?php echo $this->options['onefifth_width']; ?>" size="6" >241 <input type="text" id="onefifth_width" name="onefifth_width" value="<?php echo $this->options['onefifth_width']; ?>" size="6" class="ezcol-input"> 236 242 237 243 <?php write_sel('onefifth_width_type',$this->options['onefifth_width_type']); ?> … … 241 247 </td> 242 248 <td valign="middle"> 243 <input type="text" id="twofifth_width" name="twofifth_width" value="<?php echo $this->options['twofifth_width']; ?>" size="6" >249 <input type="text" id="twofifth_width" name="twofifth_width" value="<?php echo $this->options['twofifth_width']; ?>" size="6" class="ezcol-input"> 244 250 245 251 <?php write_sel('twofifth_width_type',$this->options['twofifth_width_type']); ?> … … 249 255 </td> 250 256 <td valign="middle"> 251 <input type="text" id="threefifth_width" name="threefifth_width" value="<?php echo $this->options['threefifth_width']; ?>" size="6" >257 <input type="text" id="threefifth_width" name="threefifth_width" value="<?php echo $this->options['threefifth_width']; ?>" size="6" class="ezcol-input"> 252 258 253 259 <?php write_sel('threefifth_width_type',$this->options['threefifth_width_type']); ?> … … 259 265 </td> 260 266 <td valign="middle"> 261 <input type="text" id="onefifth_margin" name="onefifth_margin" value="<?php echo $this->options['onefifth_margin']; ?>" size="6" >267 <input type="text" id="onefifth_margin" name="onefifth_margin" value="<?php echo $this->options['onefifth_margin']; ?>" size="6" class="ezcol-input"> 262 268 263 269 <?php write_sel('onefifth_margin_type',$this->options['onefifth_margin_type']); ?> … … 267 273 </td> 268 274 <td valign="middle"> 269 <input type="text" id="twofifth_margin" name="twofifth_margin" value="<?php echo $this->options['twofifth_margin']; ?>" size="6" >275 <input type="text" id="twofifth_margin" name="twofifth_margin" value="<?php echo $this->options['twofifth_margin']; ?>" size="6" class="ezcol-input"> 270 276 271 277 <?php write_sel('twofifth_margin_type',$this->options['twofifth_margin_type']); ?> … … 275 281 </td> 276 282 <td valign="middle"> 277 <input type="text" id="threefifth_margin" name="threefifth_margin" value="<?php echo $this->options['threefifth_margin']; ?>" size="6" >283 <input type="text" id="threefifth_margin" name="threefifth_margin" value="<?php echo $this->options['threefifth_margin']; ?>" size="6" class="ezcol-input"> 278 284 279 285 <?php write_sel('threefifth_margin_type',$this->options['threefifth_margin_type']); ?> … … 292 298 </td> 293 299 <td valign="middle" colspan="5"> 294 <input type="text" id="fourfifth_width" name="fourfifth_width" value="<?php echo $this->options['fourfifth_width']; ?>" size="6" >300 <input type="text" id="fourfifth_width" name="fourfifth_width" value="<?php echo $this->options['fourfifth_width']; ?>" size="6" class="ezcol-input"> 295 301 296 302 <?php write_sel('fourfifth_width_type',$this->options['fourfifth_width_type']); ?> … … 302 308 </td> 303 309 <td valign="middle" colspan="5"> 304 <input type="text" id="fourfifth_margin" name="fourfifth_margin" value="<?php echo $this->options['fourfifth_margin']; ?>" size="6" >310 <input type="text" id="fourfifth_margin" name="fourfifth_margin" value="<?php echo $this->options['fourfifth_margin']; ?>" size="6" class="ezcol-input"> 305 311 306 312 <?php write_sel('fourfifth_margin_type',$this->options['fourfifth_margin_type']); ?> 307 313 </td> 308 314 </tr> 309 315 <tr> 316 <td colspan="6"> 317 <hr> 318 </td> 319 </tr> 310 320 </table> 311 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 312 335 <p> 313 <input type="submit" name="Submit" value="Update" />336 <input type="submit" value="Update" name="submit" class="button button-primary button-large"> 314 337 </p> 315 338 -
easy-columns/trunk/easy-columns.php
r767230 r791582 3 3 Plugin Name: Easy Columns 4 4 Plugin URI: http://www.patrickfriedl.com/ 5 Version: v2.1. 15 Version: v2.1.2 6 6 Author: <a href="http://www.patrickfriedl.com">Pat Friedl</a> 7 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>. … … 209 209 $att_str .= (!empty($col_type))? ' '.$col_type : ''; 210 210 $att_str .= (!empty($col_type) && !empty($class))? ' ' : ''; 211 $att_str .= (!empty($class))? $class : '';211 $att_str .= (!empty($class))? ' '.$class : ''; 212 212 $att_str .= '"'; 213 213 $att_str .= (!empty($id))? ' id="'.$id.'"' : ''; … … 226 226 <!-- Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> by Pat Friedl http://www.patrickfriedl.com --> 227 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 --> 228 310 <?php 229 if($this->use_custom)230 {231 if(232 isset($this->options['quarter_width']) || isset($this->options['quarter_margin']) ||233 isset($this->options['onehalf_width']) || isset($this->options['onehalf_margin']) ||234 isset($this->options['threequarter_width']) || isset($this->options['threequarter_margin']) ||235 isset($this->options['onethird_width']) || isset($this->options['onethird_margin']) ||236 isset($this->options['twothird_width']) || isset($this->options['twothird_margin']) ||237 isset($this->options['twothird_width']) || isset($this->options['twothird_margin']) ||238 isset($this->options['fifth_width']) || isset($this->options['fifth_margin']) ||239 isset($this->options['twofifth_width']) || isset($this->options['twofifth_margin']) ||240 isset($this->options['threefifth_width']) || isset($this->options['threefifth_margin']) ||241 isset($this->options['fourfifth_width']) || isset($this->options['fourfifth_margin'])242 ){243 ?>244 <!-- Begin Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> Custom CSS -->245 <style type="text/css" media="screen, projection">246 <?php247 if(isset($this->options['quarter_width']) || isset($this->options['quarter_margin']))248 {249 echo '.ezcol-one-quarter {';250 if(isset($this->options['quarter_width'])) { echo 'width:'.$this->options['quarter_width'].$this->options['quarter_width_type'].';'; }251 if(isset($this->options['quarter_margin'])) { echo 'margin-right:'.$this->options['quarter_margin'].$this->options['quarter_margin_type'].';'; }252 echo '} ';253 }254 if(isset($this->options['onehalf_width']) || isset($this->options['onehalf_margin']))255 {256 echo '.ezcol-one-half {';257 if(isset($this->options['onehalf_width'])) { echo 'width:'.$this->options['onehalf_width'].$this->options['onehalf_width_type'].';'; }258 if(isset($this->options['>onehalf_margin'])) { echo 'margin-right:'.$this->options['onehalf_margin'].$this->options['onehalf_margin_type'].';'; }259 echo '} ';260 }261 if(isset($this->options['threequarter_width']) || isset($this->options['threequarter_margin']))262 {263 echo '.ezcol-three-quarter {';264 if(isset($this->options['threequarter_width'])) { echo 'width:'.$this->options['threequarter_width'].$this->options['threequarter_width_type'].';'; }265 if(isset($this->options['threequarter_margin'])) { echo 'margin-right:'.$this->options['threequarter_margin'].$this->options['threequarter_margin_type'].';'; }266 echo '} ';267 }268 if(isset($this->options['onethird_width']) || isset($this->options['onethird_margin']))269 {270 echo '.ezcol-one-third {';271 if(isset($this->options['onethird_width'])) { echo 'width:'.$this->options['onethird_width'].$this->options['onethird_width_type'].';'; }272 if(isset($this->options['onethird_margin'])) { echo 'margin-right:'.$this->options['onethird_margin'].$this->options['onethird_margin_type'].';'; }273 echo '} ';274 }275 if(isset($this->options['twothird_width']) || isset($this->options['twothird_margin']))276 {277 echo '.ezcol-two-third {';278 if(isset($this->options['twothird_width'])) { echo 'width:'.$this->options['twothird_width'].$this->options['twothird_width_type'].';'; }279 if(isset($this->options['twothird_margin'])) { echo 'margin-right:'.$this->options['twothird_margin'].$this->options['twothird_margin_type'].';'; }280 echo '}';281 }282 if(isset($this->options['fifth_width']) || isset($this->options['fifth_margin']))283 {284 echo '.ezcol-one-fifth {';285 if(isset($this->options['fifth_width'])) { echo 'width:'.$this->options['fifth_width'].$this->options['fifth_width_type'].';'; }286 if(isset($this->options['fifth_margin'])) { echo 'margin-right:'.$this->options['fifth_margin'].$this->options['fifth_margin_type'].';'; }287 echo '}';288 }289 if(isset($this->options['twofifth_width']) || isset($this->options['twofifth_margin']))290 {291 echo '.ezcol-two-fifth {';292 if(isset($this->options['twofifth_width'])) { echo 'width:'.$this->options['twofifth_width'].$this->options['twofifth_width_type'].';'; }293 if(isset($this->options['twofifth_margin'])) { echo 'margin-right:'.$this->options['twofifth_margin'].$this->options['twofifth_margin_type'].';'; }294 echo '}';295 }296 if(isset($this->options['threefifth_width']) || isset($this->options['threefifth_margin']))297 {298 echo '.ezcol-three-fifth {';299 if(isset($this->options['threefifth_width'])) { echo 'width:'.$this->options['threefifth_width'].$this->options['threefifth_width_type'].'; '; }300 if(isset($this->options['threefifth_margin'])) { echo 'margin-right:'.$this->options['threefifth_margin'].$this->options['threefifth_margin_type'].';'; }301 echo '}';302 }303 if(isset($this->options['fourfifth_width']) || isset($this->options['fourfifth_margin']))304 {305 echo '.ezcol-four-fifth {';306 if(isset($this->options['fourfifth_width'])) { echo 'width:'.$this->options['fourfifth_width'].$this->options['fourfifth_width_type'].';'; }307 if(isset($this->options['fourfifth_margin'])) { echo 'margin-right:'.$this->options['fourfifth_margin'].$this->options['fourfifth_margin_type'].';'; }308 echo '}';309 }310 echo "\n";311 ?>312 </style>313 <!-- End Easy Columns <?php echo EZC_PLUGIN_VERSION; ?> Custom CSS -->314 <?php315 }316 311 } // end if($this->use_custom) 317 312 }// end add_css … … 386 381 'fourfifth_width_type' => '%', 387 382 'fourfifth_margin' => '', 388 'fourfifth_margin_type' => '%' 383 'fourfifth_margin_type' => '%', 384 'custom_css' => '' 389 385 ); 390 386 … … 427 423 } 428 424 $this->options = $options; 429 $this->options['use_custom'] = ( isset($_POST['use_custom']))? true : false;425 $this->options['use_custom'] = (!empty($_POST['use_custom']))? true : false; 430 426 update_option($this->ez_columns_options_name, $this->options); 431 427 … … 478 474 if (function_exists('register_uninstall_hook')) 479 475 { 480 register_uninstall_hook(__FILE__, array( &$ez_columns, 'uninstall'));476 register_uninstall_hook(__FILE__, array('EasyColumns', 'uninstall')); 481 477 } 482 478 } -
easy-columns/trunk/readme.txt
r767230 r791582 4 4 Tags: columns, column, grid layout, box, boxes, feature box, layout, magazine, page, posts, magazine columns, magazine layout, float div 5 5 Requires at least: 2.7 6 Tested up to: 3.6 7 Stable tag: 2.1. 16 Tested up to: 3.6.1 7 Stable tag: 2.1.2 8 8 9 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. … … 113 113 == Changelog == 114 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 115 125 = 2.1.1 = 116 126 * Added parent class to keep content max-wisth at 100% to prevent overflow -
easy-columns/trunk/tinymce/editor_plugin.js
r763400 r791582 20 20 file : url + '/window.php?', 21 21 width : 764 + ed.getLang('ezColumns.delta_width', 0), 22 height : 5 00 + ed.getLang('ezColumns.delta_height', 0),22 height : 520 + ed.getLang('ezColumns.delta_height', 0), 23 23 inline : 1 24 24 }, { -
easy-columns/trunk/tinymce/window.php
r763400 r791582 1 1 <?php 2 while(!is_file('wp- config.php')){2 while(!is_file('wp-load.php')){ 3 3 if(is_dir('../')){ chdir('../'); } 4 else die('Could not find WordPress.'); 5 } 6 include('wp-config.php'); 7 8 wp_enqueue_script('jquery'); 9 global $wp_scripts; 10 global $wpdb; 11 4 else die('Could not find wp-load.php.'); 5 } 6 require_once('wp-load.php'); 12 7 // check for rights 13 8 if ( !is_user_logged_in() || !current_user_can('edit_posts') ) 14 9 wp_die(__("You are not allowed to be here")); 10 global $wp_scripts; 11 global $wpdb; 15 12 ?> 16 13 <!DOCTYPE html> … … 45 42 } 46 43 </style> 47 <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script> 48 <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script> 49 <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script> 50 <script language="javascript" type="text/javascript"> 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> 51 50 var colTxt = ' '; 52 51 function init() { … … 55 54 56 55 function insertColumns(col) { 57 colTxt = ' '; 56 colTxt = ''; 57 colClass = jQuery('#txtColClass').val().trim(); 58 colClass = (colClass != '')? ' class="'+colClass+'"' : '' ; 58 59 switch(col) 59 60 { 60 61 /* single columns */ 61 62 case 'quarter': 62 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter]';63 colTxt += '[ezcol_1quarter]Quarter Column[/ezcol_1quarter]'; 63 64 break; 64 65 case 'half': 65 colTxt += '[ezcol_1half id="" class="" style=""]Half Column[/ezcol_1half]';66 colTxt += '[ezcol_1half]Half Column[/ezcol_1half]'; 66 67 break; 67 68 case 'threequarter': 68 colTxt += '[ezcol_3quarter id="" class="" style=""]Three Quarter Column[/ezcol_3quarter]';69 colTxt += '[ezcol_3quarter]Three Quarter Column[/ezcol_3quarter]'; 69 70 break; 70 71 case 'third': 71 colTxt += '[ezcol_1third id="" class="" style=""]Third Column[/ezcol_1third]';72 colTxt += '[ezcol_1third]Third Column[/ezcol_1third]'; 72 73 break; 73 74 case 'twothirds': 74 colTxt += '[ezcol_2third id="" class="" style=""]Two Thirds Column[/ezcol_2third]';75 colTxt += '[ezcol_2third]Two Thirds Column[/ezcol_2third]'; 75 76 break; 76 77 case 'onefifth': 77 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth]';78 colTxt += '[ezcol_1fifth]One Fifth Column[/ezcol_1fifth]'; 78 79 break; 79 80 case 'twofifths': 80 colTxt += '[ezcol_2fifth id="" class="" style=""]Two Fifths Column[/ezcol_2fifth]';81 colTxt += '[ezcol_2fifth]Two Fifths Column[/ezcol_2fifth]'; 81 82 break; 82 83 case 'threefifths': 83 colTxt += '[ezcol_3fifth id="" class="" style=""]Three Fifths Column[/ezcol_3fifth]';84 colTxt += '[ezcol_3fifth]Three Fifths Column[/ezcol_3fifth]'; 84 85 break; 85 86 case 'fourfifths': 86 colTxt += '[ezcol_4fifth id="" class="" style=""]Four Fifths Column[/ezcol_4fifth]';87 colTxt += '[ezcol_4fifth]Four Fifths Column[/ezcol_4fifth]'; 87 88 break; 88 89 89 90 /* 1/3, 2/3 */ 90 91 case '3third': 91 colTxt += '[ezcol_1third id="" class="" style=""]Third Column[/ezcol_1third] ';92 colTxt += '[ezcol_1third id="" class="" style=""]Third Column[/ezcol_1third] ';93 colTxt += '[ezcol_1third_end id="" class="" style=""]Third Column[/ezcol_1third_end]';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]'; 94 95 break; 95 96 case '1third2third': 96 colTxt += '[ezcol_1third id="" class="" style=""]Third Column[/ezcol_1third] ';97 colTxt += '[ezcol_2third_end id="" class="" style=""]Two Thirds Column[/ezcol_2third_end]';97 colTxt += '[ezcol_1third'+colClass+']Third Column[/ezcol_1third] '; 98 colTxt += '[ezcol_2third_end'+colClass+']Two Thirds Column[/ezcol_2third_end]'; 98 99 break; 99 100 case '2third1third': 100 colTxt += '[ezcol_2third id="" class="" style=""]Two Thirds Column[/ezcol_2third] ';101 colTxt += '[ezcol_1third_end id="" class="" style=""]Third Column[/ezcol_1third_end]';101 colTxt += '[ezcol_2third'+colClass+']Two Thirds Column[/ezcol_2third] '; 102 colTxt += '[ezcol_1third_end'+colClass+']Third Column[/ezcol_1third_end]'; 102 103 break; 103 104 104 105 /* 1/4, 1/2, 3/4 */ 105 106 case '4quarter': 106 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';107 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';108 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';109 colTxt += '[ezcol_1quarter_end id="" class="" style=""]Quarter Column[/ezcol_1quarter_end]';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]'; 110 111 break; 111 112 case '1half2quarter': 112 colTxt += '[ezcol_1half id="" class="" style=""]Half Column[/ezcol_1half] ';113 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';114 colTxt += '[ezcol_1quarter_end id="" class="" style=""]Quarter Column[/ezcol_1quarter_end]';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]'; 115 116 break; 116 117 case 'quarterhalfquarter': 117 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';118 colTxt += '[ezcol_1half id="" class="" style=""]Half Column[/ezcol_1half] ';119 colTxt += '[ezcol_1quarter_end id="" class="" style=""]Quarter Column[/ezcol_1quarter_end]';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]'; 120 121 break; 121 122 case '2quarter1half': 122 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';123 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';124 colTxt += '[ezcol_1half_end id="" class="" style=""]Half Column[/ezcol_1half_end]';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]'; 125 126 break; 126 127 case '2half': 127 colTxt += '[ezcol_1half id="" class="" style=""]Half Column[/ezcol_1half] ';128 colTxt += '[ezcol_1half_end id="" class="" style=""]Half Column[/ezcol_1half_end]';128 colTxt += '[ezcol_1half'+colClass+']Half Column[/ezcol_1half] '; 129 colTxt += '[ezcol_1half_end'+colClass+']Half Column[/ezcol_1half_end]'; 129 130 break; 130 131 case '1quarter3quarter': 131 colTxt += '[ezcol_1quarter id="" class="" style=""]Quarter Column[/ezcol_1quarter] ';132 colTxt += '[ezcol_3quarter_end id="" class="" style=""]Three Quarter Column[/ezcol_3quarter_end]';132 colTxt += '[ezcol_1quarter'+colClass+']Quarter Column[/ezcol_1quarter] '; 133 colTxt += '[ezcol_3quarter_end'+colClass+']Three Quarter Column[/ezcol_3quarter_end]'; 133 134 break; 134 135 case '3quarter1quarter': 135 colTxt += '[ezcol_3quarter id="" class="" style=""]Three Quarter Column[/ezcol_3quarter] ';136 colTxt += '[ezcol_1quarter_end id="" class="" style=""]Quarter Column[/ezcol_1quarter_end]';136 colTxt += '[ezcol_3quarter'+colClass+']Three Quarter Column[/ezcol_3quarter] '; 137 colTxt += '[ezcol_1quarter_end'+colClass+']Quarter Column[/ezcol_1quarter_end]'; 137 138 break; 138 139 139 140 /* 1/5, 2/5, 3/5, 4/5 */ 140 141 case '5fifth': 141 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';142 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';143 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';144 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';145 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';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]'; 146 147 break; 147 148 case '2fifth31fifth': 148 colTxt += '[ezcol_2fifth id="" class="" style=""]Two Fifths Column[/ezcol_2fifth] ';149 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';150 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';151 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';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]'; 152 153 break; 153 154 case '1fifth2fifth21fifth': 154 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';155 colTxt += '[ezcol_2fifth id="" class="" style=""]Two Fifths Column[/ezcol_2fifth] ';156 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';157 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';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]'; 158 159 break; 159 160 case '21fifth2fifth1fifth': 160 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';161 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';162 colTxt += '[ezcol_2fifth id="" class="" style=""]Two Fifths Column[/ezcol_2fifth] ';163 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';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]'; 164 165 break; 165 166 case '31fifth2fifth': 166 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';167 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';168 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';169 colTxt += '[ezcol_2fifth_end id="" class="" style=""]Two Fifths Column[/ezcol_2fifth_end]';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]'; 170 171 break; 171 172 case '3fifth21fifth': 172 colTxt += '[ezcol_3fifth id="" class="" style=""]Three Fifths Column[/ezcol_3fifth] ';173 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';174 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';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]'; 175 176 break; 176 177 case '1fifth3fifth1fifth': 177 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';178 colTxt += '[ezcol_3fifth id="" class="" style=""]Three Fifths Column[/ezcol_3fifth] ';179 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';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]'; 180 181 break; 181 182 case '21fifth3fifth': 182 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';183 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';184 colTxt += '[ezcol_3fifth_end id="" class="" style=""]Three Fifths Column[/ezcol_3fifth_end]';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]'; 185 186 break; 186 187 case '2fifth3fifth': 187 colTxt += '[ezcol_2fifth id="" class="" style=""]Two Fifths Column[/ezcol_2fifth] ';188 colTxt += '[ezcol_3fifth_end id="" class="" style=""]Three Fifths Column[/ezcol_3fifth_end]';188 colTxt += '[ezcol_2fifth'+colClass+']Two Fifths Column[/ezcol_2fifth] '; 189 colTxt += '[ezcol_3fifth_end'+colClass+']Three Fifths Column[/ezcol_3fifth_end]'; 189 190 break; 190 191 case '3fifth2fifth': 191 colTxt += '[ezcol_3fifth id="" class="" style=""]Three Fifths Column[/ezcol_3fifth] ';192 colTxt += '[ezcol_2fifth_end id="" class="" style=""]Two Fifths Column[/ezcol_2fifth_end]';192 colTxt += '[ezcol_3fifth'+colClass+']Three Fifths Column[/ezcol_3fifth] '; 193 colTxt += '[ezcol_2fifth_end'+colClass+']Two Fifths Column[/ezcol_2fifth_end]'; 193 194 break; 194 195 case '1fifth4fifth': 195 colTxt += '[ezcol_1fifth id="" class="" style=""]One Fifth Column[/ezcol_1fifth] ';196 colTxt += '[ezcol_4fifth_end id="" class="" style=""]Four Fifths Column[/ezcol_4fifth_end]';196 colTxt += '[ezcol_1fifth'+colClass+']One Fifth Column[/ezcol_1fifth] '; 197 colTxt += '[ezcol_4fifth_end'+colClass+']Four Fifths Column[/ezcol_4fifth_end]'; 197 198 break; 198 199 case '4fifth1fifth': 199 colTxt += '[ezcol_4fifth id="" class="" style=""]Four Fifths Column[/ezcol_4fifth] ';200 colTxt += '[ezcol_1fifth_end id="" class="" style=""]One Fifth Column[/ezcol_1fifth_end]';200 colTxt += '[ezcol_4fifth'+colClass+']Four Fifths Column[/ezcol_4fifth] '; 201 colTxt += '[ezcol_1fifth_end'+colClass+']One Fifth Column[/ezcol_1fifth_end]'; 201 202 break; 202 203 } … … 436 437 </table> 437 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 438 450 <hr> 439 451
Note: See TracChangeset
for help on using the changeset viewer.