WordPress.org

Plugin Directory

Changeset 782403


Ignore:
Timestamp:
10/04/13 05:00:59 (7 months ago)
Author:
greenshady
Message:

Updating plugin to version 0.2.0.

Location:
grid-columns
Files:
11 added
5 edited

Legend:

Unmodified
Added
Removed
  • grid-columns/trunk/css/columns.css

    r610370 r782403  
    22 * CSS for handling the [column] shortcode styles. 
    33 * 
    4  * @version   20121007 
     4 * @version   20130123 
    55 * @author    Justin Tadlock <justin@justintadlock.com> 
    6  * @copyright Copyright (c) 2012, Justin Tadlock 
     6 * @copyright Copyright (c) 2013, Justin Tadlock 
    77 * @link      http://justintadlock.com 
    88 * @license   http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    3131    margin-right: 0; 
    3232    margin-left: 0; 
     33    } 
     34 
     35/* Some rules in case wpautop() goes a little crazy. */ 
     36.column-grid br, 
     37.column-grid p:empty { 
     38    display: none; 
     39    } 
     40.column-grid .column br { 
     41    display: block; 
    3342    } 
    3443 
     
    110119.column-grid-12 .column-push-2  { margin-left: 17.5%;  } 
    111120.column-grid-12 .column-push-1  { margin-left: 8.75%;  } 
     121 
     122/* === Right-to-Left === */ 
     123 
     124.rtl .column-grid .column { 
     125    float: right; 
     126    margin-left: 5%; 
     127    margin-right: 0; 
     128    } 
     129.rtl .column-grid .column-first { 
     130    margin-right: 0; 
     131    } 
     132.rtl .column-grid .column-last { 
     133    float: left; 
     134    margin-right: 0; 
     135    margin-left: 0; 
     136    } 
     137 
     138.rtl .column-grid-2 .column-push-1 { margin-right: 52.5%; } 
     139 
     140.rtl .column-grid-3 .column-push-2 { margin-right: 70%; } 
     141.rtl .column-grid-3 .column-push-1 { margin-right: 35%; } 
     142 
     143.rtl .column-grid-4 .column-push-3 { margin-right: 78.75%; } 
     144.rtl .column-grid-4 .column-push-2 { margin-right: 52.5%;  } 
     145.rtl .column-grid-4 .column-push-1 { margin-right: 26.25%; } 
     146 
     147.rtl .column-grid-5 .column-push-4 { margin-right: 84%; } 
     148.rtl .column-grid-5 .column-push-3 { margin-right: 63%; } 
     149.rtl .column-grid-5 .column-push-2 { margin-right: 42%; } 
     150.rtl .column-grid-5 .column-push-1 { margin-right: 21%; } 
     151 
     152.rtl .column-grid-12 .column-push-11 { margin-right: 96.25%; } 
     153.rtl .column-grid-12 .column-push-10 { margin-right: 87.5%;  } 
     154.rtl .column-grid-12 .column-push-9  { margin-right: 78.75%; } 
     155.rtl .column-grid-12 .column-push-8  { margin-right: 69%;    } 
     156.rtl .column-grid-12 .column-push-7  { margin-right: 61.25%; } 
     157.rtl .column-grid-12 .column-push-6  { margin-right: 52.5%;  } 
     158.rtl .column-grid-12 .column-push-5  { margin-right: 43.75%; } 
     159.rtl .column-grid-12 .column-push-4  { margin-right: 35%;    } 
     160.rtl .column-grid-12 .column-push-3  { margin-right: 26.25%; } 
     161.rtl .column-grid-12 .column-push-2  { margin-right: 17.5%;  } 
     162.rtl .column-grid-12 .column-push-1  { margin-right: 8.75%;  } 
  • grid-columns/trunk/css/columns.min.css

    r610370 r782403  
    1 .column-grid{clear:both}.column-grid:after{content:".";display:block;height:0;clear:both;visibility:hidden}.column-grid .column{float:left;margin-right:5%;margin-left:0}.column-grid .column-first{margin-left:0}.column-grid .column-last{float:right;margin-right:0;margin-left:0}.column-grid-2 .column-span-2{width:100%}.column-grid-2 .column-span-1{width:47.5%}.column-grid-2 .column-push-1{margin-left:52.5%}.column-grid-3 .column-span-3{width:100%}.column-grid-3 .column-span-2{width:65%}.column-grid-3 .column-span-1{width:30%}.column-grid-3 .column-push-2{margin-left:70%}.column-grid-3 .column-push-1{margin-left:35%}.column-grid-4 .column-span-4{width:100%}.column-grid-4 .column-span-3{width:73.75%}.column-grid-4 .column-span-2{width:47.5%}.column-grid-4 .column-span-1{width:21.25%}.column-grid-4 .column-push-3{margin-left:78.75%}.column-grid-4 .column-push-2{margin-left:52.5%}.column-grid-4 .column-push-1{margin-left:26.25%}.column-grid-5 .column-span-5{width:100%}.column-grid-5 .column-span-4{width:79%}.column-grid-5 .column-span-3{width:58%}.column-grid-5 .column-span-2{width:37%}.column-grid-5 .column-span-1{width:16%}.column-grid-5 .column-push-4{margin-left:84%}.column-grid-5 .column-push-3{margin-left:63%}.column-grid-5 .column-push-2{margin-left:42%}.column-grid-5 .column-push-1{margin-left:21%}.column-grid-12 .column-span-12{width:100%}.column-grid-12 .column-span-11{width:91.25%}.column-grid-12 .column-span-10{width:82.5%}.column-grid-12 .column-span-9 {width:73.75%}.column-grid-12 .column-span-8 {width:65%}.column-grid-12 .column-span-7 {width:56.25%}.column-grid-12 .column-span-6 {width:47.5%}.column-grid-12 .column-span-5 {width:38.75%}.column-grid-12 .column-span-4 {width:30%}.column-grid-12 .column-span-3 {width:21.25%}.column-grid-12 .column-span-2 {width:12.5%}.column-grid-12 .column-span-1 {width:3.75%}.column-grid-12 .column-push-11{margin-left:96.25%}.column-grid-12 .column-push-10{margin-left:87.5%}.column-grid-12 .column-push-9 {margin-left:78.75%}.column-grid-12 .column-push-8 {margin-left:69%}.column-grid-12 .column-push-7 {margin-left:61.25%}.column-grid-12 .column-push-6 {margin-left:52.5%}.column-grid-12 .column-push-5 {margin-left:43.75%}.column-grid-12 .column-push-4 {margin-left:35%}.column-grid-12 .column-push-3 {margin-left:26.25%}.column-grid-12 .column-push-2 {margin-left:17.5%}.column-grid-12 .column-push-1 {margin-left:8.75%} 
     1.column-grid{clear:both}.column-grid:after{content:".";display:block;height:0;clear:both;visibility:hidden}.column-grid .column{float:left;margin-right:5%;margin-left:0}.column-grid .column-first{margin-left:0}.column-grid .column-last{float:right;margin-right:0;margin-left:0}.column-grid br,.column-grid p:empty{display:none}.column-grid .column br{display:block}.column-grid-2 .column-span-2{width:100%}.column-grid-2 .column-span-1{width:47.5%}.column-grid-2 .column-push-1{margin-left:52.5%}.column-grid-3 .column-span-3{width:100%}.column-grid-3 .column-span-2{width:65%}.column-grid-3 .column-span-1{width:30%}.column-grid-3 .column-push-2{margin-left:70%}.column-grid-3 .column-push-1{margin-left:35%}.column-grid-4 .column-span-4{width:100%}.column-grid-4 .column-span-3{width:73.75%}.column-grid-4 .column-span-2{width:47.5%}.column-grid-4 .column-span-1{width:21.25%}.column-grid-4 .column-push-3{margin-left:78.75%}.column-grid-4 .column-push-2{margin-left:52.5%}.column-grid-4 .column-push-1{margin-left:26.25%}.column-grid-5 .column-span-5{width:100%}.column-grid-5 .column-span-4{width:79%}.column-grid-5 .column-span-3{width:58%}.column-grid-5 .column-span-2{width:37%}.column-grid-5 .column-span-1{width:16%}.column-grid-5 .column-push-4{margin-left:84%}.column-grid-5 .column-push-3{margin-left:63%}.column-grid-5 .column-push-2{margin-left:42%}.column-grid-5 .column-push-1{margin-left:21%}.column-grid-12 .column-span-12{width:100%}.column-grid-12 .column-span-11{width:91.25%}.column-grid-12 .column-span-10{width:82.5%}.column-grid-12 .column-span-9 {width:73.75%}.column-grid-12 .column-span-8 {width:65%}.column-grid-12 .column-span-7 {width:56.25%}.column-grid-12 .column-span-6 {width:47.5%}.column-grid-12 .column-span-5 {width:38.75%}.column-grid-12 .column-span-4 {width:30%}.column-grid-12 .column-span-3 {width:21.25%}.column-grid-12 .column-span-2 {width:12.5%}.column-grid-12 .column-span-1 {width:3.75%}.column-grid-12 .column-push-11{margin-left:96.25%}.column-grid-12 .column-push-10{margin-left:87.5%}.column-grid-12 .column-push-9 {margin-left:78.75%}.column-grid-12 .column-push-8 {margin-left:69%}.column-grid-12 .column-push-7 {margin-left:61.25%}.column-grid-12 .column-push-6 {margin-left:52.5%}.column-grid-12 .column-push-5 {margin-left:43.75%}.column-grid-12 .column-push-4 {margin-left:35%}.column-grid-12 .column-push-3 {margin-left:26.25%}.column-grid-12 .column-push-2 {margin-left:17.5%}.column-grid-12 .column-push-1 {margin-left:8.75%}.rtl .column-grid .column{float:right;margin-left:5%;margin-right:0}.rtl .column-grid .column-first{margin-right:0}.rtl .column-grid .column-last{float:left;margin-right:0;margin-left:0}.rtl .column-grid-2 .column-push-1{margin-right:52.5%}.rtl .column-grid-3 .column-push-2{margin-right:70%}.rtl .column-grid-3 .column-push-1{margin-right:35%}.rtl .column-grid-4 .column-push-3{margin-right:78.75%}.rtl .column-grid-4 .column-push-2{margin-right:52.5%}.rtl .column-grid-4 .column-push-1{margin-right:26.25%}.rtl .column-grid-5 .column-push-4{margin-right:84%}.rtl .column-grid-5 .column-push-3{margin-right:63%}.rtl .column-grid-5 .column-push-2{margin-right:42%}.rtl .column-grid-5 .column-push-1{margin-right:21%}.rtl .column-grid-12 .column-push-11{margin-right:96.25%}.rtl .column-grid-12 .column-push-10{margin-right:87.5%}.rtl .column-grid-12 .column-push-9 {margin-right:78.75%}.rtl .column-grid-12 .column-push-8 {margin-right:69%}.rtl .column-grid-12 .column-push-7 {margin-right:61.25%}.rtl .column-grid-12 .column-push-6 {margin-right:52.5%}.rtl .column-grid-12 .column-push-5 {margin-right:43.75%}.rtl .column-grid-12 .column-push-4 {margin-right:35%}.rtl .column-grid-12 .column-push-3 {margin-right:26.25%}.rtl .column-grid-12 .column-push-2 {margin-right:17.5%}.rtl .column-grid-12 .column-push-1 {margin-right:8.75%} 
  • grid-columns/trunk/docs/readme.html

    r607491 r782403  
    2323 
    2424<ul> 
    25     <li><a href="#install">How to install the plugin</a></li> 
    2625    <li><a href="#how">How the plugin works</a></li> 
    2726    <li><a href="#basic">Basic usage</a></li> 
    2827    <li><a href="#advanced">Advanced usage</a></li> 
    29     <li><a href="#faq">Frequently-asked questions</a></li> 
    30     <li><a href="#support">Support</a></li> 
    31     <li><a href="#copyright">Copyright and License</a></li> 
    3228</ul> 
    33  
    34 <h2 id="install">How to install the plugin</h2> 
    35  
    36 <ol> 
    37     <li>Uzip the <code>grid-columns.zip</code> folder.</li> 
    38     <li>Upload the <code>grid-columns</code> folder to your <code>/wp-content/plugins</code> directory.</li> 
    39     <li>In your WordPress dashboard, head over to the <em>Plugins</em> section.</li> 
    40     <li>Activate <em>Grid Columns</em>.</li> 
    41 </ol> 
    4229 
    4330<h2 id="how">How does it work?</h2> 
     
    190177</div> 
    191178 
    192 <h2 id="faq">Frequently-asked questions</h2> 
    193  
    194 <h3>Help!  My site's broken!  What should I do?</h3> 
    195  
    196 <p>Most likely, it's because you either have too many spans or not enough spans for your grid.  Make sure each <code>span</code> argument for your <code>[column]</code> shortcode equals exactly the <code>grid</code> argument.</p> 
    197  
    198 <h3>But, I did everything right.</h3> 
    199  
    200 <p>If you're absolutely sure you're math is correct, it could be a conflict with your theme.  It'd be impossible for me to know without seeing it in use on your site, so you'll either need to ask on my support forums or get your theme developer to help.</p> 
    201  
    202 <h3>Can I have more than one set of grid columns in a post?</h3> 
    203  
    204 <p>Yes.  Absolutely.  Just make sure each grid has the correct number of columns before starting a new one.</p> 
    205  
    206 <h3>Can I nest columns?</h3> 
    207  
    208 <p>No.  This is a limitation of WordPress.</p> 
    209  
    210 <h3>Can I use other shortcodes within the <code>[column]</code> shortcode?</h3> 
    211  
    212 <p>Yes, you can.  However, keep in mind, that I can't guarantee that your plugin developer knows what he's doing and created his shortcode correctly.  But, yes, you can do this with properly-coded shortcodes.</p> 
    213  
    214 <h3>Can I put content between two different column shortcodes?</h3> 
    215  
    216 <p>It's possible, but you'll probably break something.  I recommend against attempting this.</p> 
    217  
    218 <h2 id="support">Plugin support</h2> 
    219  
    220 <p>I run a WordPress community called <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a>, which is where I fully support all of my WordPress projects, including plugins.  You can sign up for an account to get plugin support for a small yearly fee ($29 <acronym title="United States Dollars">USD</acronym> at the time of writing).</p> 
    221  
    222 <p>I know.  I know.  You might not want to pay for support, but just consider it a donation to the project.  To continue making cool, <acronym title="GNU General Public License">GPL</acronym>-licensed plugins and having the time to support them, I must pay the bills.</p> 
    223  
    224 <h2 id="copyright">Copyright and license</h2> 
    225  
    226 <p>Grid Columns is licensed under the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" title="GNU GPL">GNU General Public License</a>, version 2 (or later).</p> 
    227  
    228 <p>This plugin is copyrighted to <a href="http://justintadlock.com" title="Justin Tadlock">Justin Tadlock</a>.</p> 
    229  
    230 <p>2012 &copy; Justin Tadlock.</p> 
    231  
    232179</body> 
    233180</html> 
  • grid-columns/trunk/grid-columns.php

    r610370 r782403  
    44 * Plugin URI: http://themehybrid.com/plugins/grid-columns 
    55 * Description: A [column] shortcode plugin. 
    6  * Version: 0.1.1 
     6 * Version: 0.2.0 
    77 * Author: Justin Tadlock 
    88 * Author URI: http://justintadlock.com 
     
    2424 * 
    2525 * @package   GridColumns 
    26  * @version   0.1.1 
     26 * @version   0.2.0 
    2727 * @author    Justin Tadlock <justin@justintadlock.com> 
    28  * @copyright Copyright (c) 2012, Justin Tadlock 
     28 * @copyright Copyright (c) 2012 - 2013, Justin Tadlock 
    2929 * @link      http://themehybrid.com/plugins/grid-columns 
    3030 * @license   http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    3434 
    3535    /** 
     36     * Holds the instance of this class. 
     37     * 
     38     * @since  0.2.0 
     39     * @access private 
     40     * @var    object 
     41     */ 
     42    private static $instance; 
     43 
     44    /** 
    3645     * The current grid. 
    3746     * 
     
    8897 
    8998        /* Register shortcodes on 'init'. */ 
    90         add_action( 'init', array( &$this, 'register_shortcode' ) ); 
     99        add_action( 'init', array( $this, 'register_shortcode' ) ); 
    91100 
    92101        /* Enqueue stylesheets on 'wp_enqueue_scripts'. */ 
    93         add_action( 'wp_enqueue_scripts', array( &$this, 'enqueue_styles' ), 1 ); 
     102        add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 1 ); 
    94103 
    95104        /* Apply filters to the column content. */ 
     
    107116     */ 
    108117    public function register_shortcode() { 
    109         add_shortcode( 'column', array( &$this, 'do_shortcode' ) ); 
     118        add_shortcode( 'column', array( $this, 'do_shortcode' ) ); 
    110119    } 
    111120 
     
    127136            trailingslashit( plugin_dir_url( __FILE__ ) ) . "css/columns$suffix.css", 
    128137            null, 
    129             '20121007' 
     138            '20130123' 
    130139        ); 
    131140    } 
     
    262271    public function reset() { 
    263272 
    264         foreach ( get_class_vars( __CLASS__ ) as $name => $default ) 
    265             $this->$name = $default; 
     273        foreach ( get_class_vars( __CLASS__ ) as $name => $default ) { 
     274 
     275            if ( 'instance' !== $name ) 
     276                $this->$name = $default; 
     277        } 
     278    } 
     279 
     280    /** 
     281     * Returns the instance. 
     282     * 
     283     * @since  0.2.0 
     284     * @access public 
     285     * @return object 
     286     */ 
     287    public static function get_instance() { 
     288 
     289        if ( !self::$instance ) 
     290            self::$instance = new self; 
     291 
     292        return self::$instance; 
    266293    } 
    267294} 
    268295 
    269 new Grid_Columns(); 
     296Grid_Columns::get_instance(); 
    270297 
    271298?> 
  • grid-columns/trunk/readme.txt

    r610370 r782403  
    11=== Grid Columns === 
     2 
    23Contributors: greenshady 
    3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3687060 
     4Donate link: http://themehybrid.com/donate 
    45Tags: shortcode 
    56Requires at least: 3.4 
    6 Tested up to: 3.5 
     7Tested up to: 3.7 
    78License: GPLv2 or later 
    8 Stable tag: 0.1.1 
     9Stable tag: 0.2.0 
    910 
    10 A [column] shortcode that allows users to create columnized content. 
     11A [column] shortcode for creating columnized content. 
    1112 
    1213== Description == 
    1314 
    14 *Grid Columns* was created to fix the problem in which many theme developers were adding 20+ column shortcodes to their themes for something that should be extremely simple and done with only a single shortcode. 
     15This plugin has one function and one function only &mdash; to make columns.  You use it by inputting content between `[column]` and `[/column]` within your post content editor (or anywhere shortcodes are allowed). 
    1516 
    16 This plugin has one function and one function only &mdash; to make columns.  You use it by inputting content between `[column]` and `[/column]` within your post content editor (or anywhere shortcodes are allowed).  You can view usage examples within the `docs/readme.html` file. 
     17Grid Columns was created to fix the problem in which many theme developers were adding 20+ column shortcodes to their themes for something that should be extremely simple and done with only a single shortcode. 
    1718 
    18 Support for this plugin is handled on the Theme Hybrid <a href="http://themehybrid.com/support">support forums</a>. 
     19### Professional Support 
     20 
     21If you need professional plugin support from me, the plugin author, you can access the support forums at [Theme Hybrid](http://themehybrid.com/support), which is a professional WordPress help/support site where I handle support for all my plugins and themes for a community of 40,000+ users (and growing). 
     22 
     23### Plugin Development 
     24 
     25If you're a theme author, plugin author, or just a code hobbyist, you can follow the development of this plugin on it's [GitHub repository](https://github.com/justintadlock/grid-columns).  
     26 
     27### Donations 
     28 
     29Yes, I do accept donations.  If you want to buy me a beer or whatever, you can do so from my [donations page](http://themehybrid.com/donate).  I appreciate all donations, no matter the size.  Further development of this plugin is not contingent on donations, but they are always a nice incentive. 
    1930 
    2031== Installation == 
    2132 
    22331. Uzip the `grid-columns.zip` folder. 
    23 1. Upload the `grid-columns` folder to your `/wp-content/plugins` directory. 
    24 1. In your WordPress dashboard, head over to the *Plugins* section. 
    25 1. Activate *Grid Columns*. 
     342. Upload the `grid-columns` folder to your `/wp-content/plugins` directory. 
     353. In your WordPress dashboard, head over to the *Plugins* section. 
     364. Activate *Grid Columns*. 
    2637 
    2738== Frequently Asked Questions == 
    2839 
    29 = Why was this plugin created? = 
     40### Why was this plugin created? 
    3041 
    3142Many theme developers add several column shortcodes to their themes (note: this isn't allowed on WordPress.org).  Essentially, the theme developers are doing a few things wrong: 
     
    3849This plugin allows you to switch between any theme (no lock-in to your current theme).  It was also developed with WordPress standards and usability in mind. 
    3950 
    40 = How do I use the [column] shortcode? = 
     51### How do I use the [column] shortcode? 
    4152 
    4253You can find more detailed instructions in the plugin's `docs/readme.html` file. 
     
    4455Everything is based on a grid.  By default, this grid is "4".  So, you can set up four columns like so: 
    4556 
    46 ` 
    47 [column grid="4" span="1"]Some content[/column] 
    48  
    49 [column grid="4" span="1"]Some content[/column] 
    50  
    51 [column grid="4" span="1"]Some content[/column] 
    52  
    53 [column grid="4" span="1"]Some content[/column] 
    54 ` 
     57    [column grid="4" span="1"]Some content[/column] 
     58     
     59    [column grid="4" span="1"]Some content[/column] 
     60     
     61    [column grid="4" span="1"]Some content[/column] 
     62     
     63    [column grid="4" span="1"]Some content[/column] 
    5564 
    5665You'll notice that each "span" is equal to the number of columns in the grid.  So, if the span is "1", it's equal to one column.  If the span is "2", it's equal to two columns.  You can only have as many spans/columns as the grid allows.  Therefore, `grid="4"` means you can only have four columns. 
    5766 
    58 = Can I get more detailed instructions? = 
     67### Can I get more detailed instructions? 
    5968 
    6069If you need a more detailed guide, see `readme.html`, which is included with the plugin.  It has a few examples and explains everything. 
    6170 
     71### Help!  My site's broken!  What should I do? 
     72 
     73Most likely, it's because you either have too many spans or not enough spans for your grid.  Make sure each `span` argument for your `[column]` shortcode equals exactly the `grid` argument. 
     74 
     75### But, I did everything right. 
     76 
     77If you're absolutely sure you're math is correct, it could be a conflict with your theme.  It'd be impossible for me to know without seeing it in use on your site, so you'll either need to ask on my support forums or get your theme developer to help. 
     78 
     79### Can I have more than one set of grid columns in a post? 
     80 
     81Yes.  Absolutely.  Just make sure each grid has the correct number of columns before starting a new one. 
     82 
     83### Can I nest columns? 
     84 
     85No.  This is a limitation of how WordPress handles shortcodes. 
     86 
     87### Can I use other shortcodes within the `[column]` shortcode? 
     88 
     89Yes, you can.  However, keep in mind, that I can't guarantee that your plugin developer knows what he's doing and created his shortcode correctly.  But, yes, you can do this with properly-coded shortcodes. 
     90 
     91### Can I put content between two different column shortcodes? 
     92 
     93It's possible, but you'll probably break something.  I recommend against attempting this. 
     94 
    6295== Changelog == 
    6396 
    64 **Version 0.1.1** 
     97### Version 0.2.0 
     98 
     99* Added CSS style rules to override some issues with WordPress' `wpautop()`, which sometimes adds empty `<p>` and extra `<br />` tags. 
     100* Added support for right-to-left languages. 
     101* No more anonymous objects created by the plugin class. 
     102* No need for `&` when adding an action/filter. 
     103 
     104### Version 0.1.1 
    65105 
    66106* Add more specific prefixes in the CSS. 
     
    68108* Add the `gc_column_content` filter hook and use it to apply formatting. 
    69109 
    70 **Version 0.1** 
     110### Version 0.1.0 
    71111 
    72112* Plugin released.  Everything is new! 
Note: See TracChangeset for help on using the changeset viewer.