Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 5 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
11 css/columns.css
@@ -1,7 +1,7 @@
/**
* CSS for handling the [column] shortcode styles.
*
- * @version 20120917
+ * @version 20121007
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2012, Justin Tadlock
* @link http://justintadlock.com
@@ -18,15 +18,18 @@
clear: both;
visibility: hidden;
}
-.column {
+.column-grid .column {
float: left;
margin-right: 5%;
+ margin-left: 0;
}
-.column-first {
+.column-grid .column-first {
+ margin-left: 0;
}
-.column-last {
+.column-grid .column-last {
float: right;
margin-right: 0;
+ margin-left: 0;
}
/**
View
2  css/columns.min.css
@@ -1 +1 @@
-.column-grid{clear:both}.column-grid:after{content:".";display:block;height:0;clear:both;visibility:hidden}.column{float:left;margin-right:5%}.column-first{}.column-last{float:right;margin-right: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%}
+.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%}
View
13 grid-columns.php
@@ -3,7 +3,7 @@
* Plugin Name: Grid Columns
* Plugin URI: http://themehybrid.com/plugins/grid-columns
* Description: A [column] shortcode plugin.
- * Version: 0.1
+ * Version: 0.1.1
* Author: Justin Tadlock
* Author URI: http://justintadlock.com
*
@@ -23,7 +23,7 @@
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package GridColumns
- * @version 0.1.0
+ * @version 0.1.1
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2012, Justin Tadlock
* @link http://themehybrid.com/plugins/grid-columns
@@ -91,6 +91,11 @@ public function __construct() {
/* Enqueue stylesheets on 'wp_enqueue_scripts'. */
add_action( 'wp_enqueue_scripts', array( &$this, 'enqueue_styles' ), 1 );
+
+ /* Apply filters to the column content. */
+ add_filter( 'gc_column_content', 'wpautop' );
+ add_filter( 'gc_column_content', 'shortcode_unautop' );
+ add_filter( 'gc_column_content', 'do_shortcode' );
}
/**
@@ -121,7 +126,7 @@ public function enqueue_styles() {
'grid-columns',
trailingslashit( plugin_dir_url( __FILE__ ) ) . "css/columns$suffix.css",
null,
- '20120917'
+ '20121007'
);
}
@@ -231,7 +236,7 @@ public function do_shortcode( $attr, $content = null ) {
}
/* Add the current column to the output. */
- $output .= '<div class="' . $column_class . '">' . wpautop( do_shortcode( $content ) ) . '</div>';
+ $output .= '<div class="' . $column_class . '">' . apply_filters( 'gc_column_content', $content ) . '</div>';
/* If this is the last column. */
if ( $this->is_last_column ) {
View
8 readme.txt
@@ -5,7 +5,7 @@ Tags: shortcode
Requires at least: 3.4
Tested up to: 3.5
License: GPLv2 or later
-Stable tag: 0.1
+Stable tag: 0.1.1
A [column] shortcode that allows users to create columnized content.
@@ -61,6 +61,12 @@ If you need a more detailed guide, see `readme.html`, which is included with the
== Changelog ==
+**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**
* Plugin released. Everything is new!

No commit comments for this range

Something went wrong with that request. Please try again.