Coder Social home page Coder Social logo

getdave / grid-columns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justintadlock/grid-columns

0.0 1.0 0.0 196 KB

For the love of all that is Holy, stop putting 22 column shortcodes in a theme for what's possible with one. A plugin.

CSS 39.26% PHP 60.74%

grid-columns's Introduction

Grid Columns

A [column] shortcode for creating columnized content.

This plugin has one function and one function only — to make columns. You use it by inputting content between [column] and [/column] within your post content editor (or anywhere shortcodes are allowed).

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.

Why the plugin was created

Many 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:

  • They lock users into using their themes forever.
  • They create 20+ shortcodes for what is possible for one. This makes it look like their themes have more "features".
  • They remove core WordPress filters that other plugins rely on.
  • The code is just poorly developed altogether (most likely because they all copied from the same, bad source).

This 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.

Uage

You can find more detailed instructions in the plugin's docs/readme.html file.

Everything is based on a grid. By default, this grid is "4". So, you can set up four columns like so:

[column grid="4" span="1"]Some content[/column]

[column grid="4" span="1"]Some content[/column]

[column grid="4" span="1"]Some content[/column]

[column grid="4" span="1"]Some content[/column]

You'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.

Changelog

Version 0.2.0

  • Added CSS style rules to override some issues with WordPress' wpautop(), which sometimes adds empty <p> and extra <br /> tags.
  • Added support for right-to-left languages.
  • No more anonymous objects created by the plugin class.
  • No need for & when adding an action/filter.

Version 0.1.1

  • Add more specific prefixes in the CSS.
  • Add some better margin handling in case other CSS code is overwriting things willy-nilly.
  • Add the gc_column_content filter hook and use it to apply formatting.

Version 0.1.0

  • Plugin released. Everything is new!

Professional Support

If you need professional plugin support from me, the plugin author, you can access the support forums at Theme Hybrid, 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).

Copyright and License

This project is licensed under the GNU GPL, version 2 or later.

2012 – 2013 © Justin Tadlock.

grid-columns's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.