Column Shortcodes - Version 0.6.5

Version Description

  • added filter to prevent loading of frontend styles: add_filter( 'cpsh_load_styles', '__return_false' );
  • added 5/6 column;
Download this release

Release Info

Developer tschutter
Plugin Icon 128x128 Column Shortcodes
Version 0.6.5
Comparing to
See all releases

Code changes from version 0.6.3 to 0.6.5

assets/css/admin-rtl.css CHANGED
@@ -34,7 +34,9 @@
34
  #cpsh .cp-four_fifth_last { background-position: right -334px; }
35
  #cpsh .cp-one_sixth { background-position: right -354px; }
36
  #cpsh .cp-one_sixth_last { background-position: right -374px; }
37
- #cpsh .cp-full_width { background-position: right -394px; }
 
 
38
 
39
  /* =Settings
40
  -------------------------------------------------------------- */
34
  #cpsh .cp-four_fifth_last { background-position: right -334px; }
35
  #cpsh .cp-one_sixth { background-position: right -354px; }
36
  #cpsh .cp-one_sixth_last { background-position: right -374px; }
37
+ #cpsh .cp-five_sixth { background-position: right -394px; }
38
+ #cpsh .cp-five_sixth_last { background-position: right -414px; }
39
+ #cpsh .cp-full_width { background-position: right -434px; }
40
 
41
  /* =Settings
42
  -------------------------------------------------------------- */
assets/css/admin.css CHANGED
@@ -57,7 +57,9 @@
57
  #cpsh .cp-four_fifth_last { background-position: left -334px; }
58
  #cpsh .cp-one_sixth { background-position: left -354px; }
59
  #cpsh .cp-one_sixth_last { background-position: left -374px; }
60
- #cpsh .cp-full_width { background-position: left -394px; }
 
 
61
 
62
  /* =Settings
63
  -------------------------------------------------------------- */
57
  #cpsh .cp-four_fifth_last { background-position: left -334px; }
58
  #cpsh .cp-one_sixth { background-position: left -354px; }
59
  #cpsh .cp-one_sixth_last { background-position: left -374px; }
60
+ #cpsh .cp-five_sixth { background-position: left -394px; }
61
+ #cpsh .cp-five_sixth_last { background-position: left -414px; }
62
+ #cpsh .cp-full_width { background-position: left -434px; }
63
 
64
  /* =Settings
65
  -------------------------------------------------------------- */
assets/css/shortcodes-rtl.css CHANGED
@@ -9,7 +9,8 @@
9
  .two_fifth,
10
  .three_fifth,
11
  .four_fifth,
12
- .one_sixth {
 
13
  float: right;
14
  }
15
  .clear_column {
@@ -55,6 +56,9 @@
55
  .one_sixth {
56
  width: 16.6%;
57
  }
 
 
 
58
 
59
  /* =Responsive
60
  -------------------------------------------------------------- */
@@ -70,7 +74,8 @@
70
  .two_fifth,
71
  .three_fifth,
72
  .four_fifth,
73
- .one_sixth {
 
74
  clear: both;
75
  width: 100%;
76
  margin-left: 0;
9
  .two_fifth,
10
  .three_fifth,
11
  .four_fifth,
12
+ .one_sixth,
13
+ .five_sixth {
14
  float: right;
15
  }
16
  .clear_column {
56
  .one_sixth {
57
  width: 16.6%;
58
  }
59
+ .five_sixth {
60
+ width: 83.4%;
61
+ }
62
 
63
  /* =Responsive
64
  -------------------------------------------------------------- */
74
  .two_fifth,
75
  .three_fifth,
76
  .four_fifth,
77
+ .one_sixth,
78
+ .five_sixth {
79
  clear: both;
80
  width: 100%;
81
  margin-left: 0;
assets/css/shortcodes.css CHANGED
@@ -10,7 +10,8 @@
10
  .two_fifth,
11
  .three_fifth,
12
  .four_fifth,
13
- .one_sixth {
 
14
  float: left;
15
  }
16
  .clear_column {
@@ -59,6 +60,9 @@
59
  .one_sixth {
60
  width: 16.6%;
61
  }
 
 
 
62
 
63
  /* =Responsive
64
  -------------------------------------------------------------- */
@@ -74,7 +78,8 @@
74
  .two_fifth,
75
  .three_fifth,
76
  .four_fifth,
77
- .one_sixth {
 
78
  clear: both;
79
  width: 100%;
80
  margin-left: 0;
10
  .two_fifth,
11
  .three_fifth,
12
  .four_fifth,
13
+ .one_sixth,
14
+ .five_sixth {
15
  float: left;
16
  }
17
  .clear_column {
60
  .one_sixth {
61
  width: 16.6%;
62
  }
63
+ .five_sixth {
64
+ width: 83.4%;
65
+ }
66
 
67
  /* =Responsive
68
  -------------------------------------------------------------- */
78
  .two_fifth,
79
  .three_fifth,
80
  .four_fifth,
81
+ .one_sixth,
82
+ .five_sixth {
83
  clear: both;
84
  width: 100%;
85
  margin-left: 0;
assets/images/columns-rtl.png CHANGED
Binary file
assets/images/columns.png CHANGED
Binary file
assets/js/admin.js CHANGED
@@ -3,7 +3,6 @@
3
  $(document).ready(function()
4
  {
5
  codepressShortcodes();
6
-
7
  codepressPaddingGenerator();
8
  });
9
 
3
  $(document).ready(function()
4
  {
5
  codepressShortcodes();
 
6
  codepressPaddingGenerator();
7
  });
8
 
column-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  Plugin Name: Column Shortcodes
5
- Version: 0.6.3
6
  Description: Adds shortcodes to easily create columns in your posts or pages
7
  Author: Codepress
8
  Author URI: http://www.codepresshq.com/
@@ -11,7 +11,7 @@ Text Domain: column-shortcodes
11
  Domain Path: /languages
12
  License: GPLv2
13
 
14
- Copyright 2011-2013 Codepress info@codepress.nl
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License version 2 as published by
@@ -27,7 +27,7 @@ along with this program; if not, write to the Free Software
27
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  */
29
 
30
- define( 'CPSH_VERSION', '0.6.3' );
31
  define( 'CPSH_URL', plugins_url( '', __FILE__ ) );
32
  define( 'CPSH_TEXTDOMAIN', 'column-shortcodes' );
33
 
@@ -119,10 +119,12 @@ class Codepress_Column_Shortcodes {
119
  * @since 0.1
120
  */
121
  public function frontend_styles() {
122
- if ( ! is_rtl() ) {
123
- wp_enqueue_style( 'cpsh-shortcodes', CPSH_URL.'/assets/css/shortcodes.css', array(), CPSH_VERSION, 'all' );
124
- } else {
125
- wp_enqueue_style( 'cpsh-shortcodes-rtl', CPSH_URL.'/assets/css/shortcodes-rtl.css', array(), CPSH_VERSION, 'all' );
 
 
126
  }
127
  }
128
 
@@ -196,7 +198,7 @@ class Codepress_Column_Shortcodes {
196
  $name = str_replace( $this->prefix, '', $name );
197
  }
198
 
199
- $output = "<div{$id} class='{$name}{$class}'>{$content}</div>";
200
 
201
  if ( false !== $pos ) {
202
  $output .= "<div class='clear_column'></div>";
@@ -213,8 +215,11 @@ class Codepress_Column_Shortcodes {
213
  private function is_edit_screen() {
214
  global $pagenow;
215
 
216
- if ( in_array( $pagenow, array( 'post-new.php', 'page-new.php', 'post.php', 'page.php', 'profile.php', 'user-edit.php', 'user-new.php' ) ) )
 
 
217
  return true;
 
218
 
219
  return false;
220
  }
@@ -260,7 +265,7 @@ class Codepress_Column_Shortcodes {
260
  */
261
  public function add_shortcode_button( $page = null, $target = null ) {
262
  ?>
263
- <a href="#TB_inline?width=640&amp;height=600&amp;inlineId=cpsh-wrap" class="thickbox" title="<?php _e( 'Select shortcode', CPSH_TEXTDOMAIN ); ?>" data-page="<?php echo $page; ?>" data-target="<?php echo $target; ?>">
264
  <img src="<?php echo CPSH_URL . "/assets/images/shortcode.png";?>" alt="" />
265
  </a>
266
  <?php
@@ -331,7 +336,7 @@ class Codepress_Column_Shortcodes {
331
 
332
  </div><!--cpsh-generator-shell-->
333
 
334
- <p class='description'>This is a <a href="http://www.codepresshq.com">Codepress</a> plugin.</p>
335
  </div>
336
  </div>
337
 
@@ -351,17 +356,18 @@ class Codepress_Column_Shortcodes {
351
 
352
  // define column shortcodes
353
  $column_shortcodes = apply_filters( 'cpsh_column_shortcodes', array(
354
- 'full_width' => array ('display_name' => __('full width', CPSH_TEXTDOMAIN) ),
355
- 'one_half' => array ('display_name' => __('one half', CPSH_TEXTDOMAIN) ),
356
- 'one_third' => array ('display_name' => __('one third', CPSH_TEXTDOMAIN) ),
357
- 'one_fourth' => array ('display_name' => __('one fourth', CPSH_TEXTDOMAIN) ),
358
- 'two_third' => array ('display_name' => __('two third', CPSH_TEXTDOMAIN) ),
359
- 'three_fourth' => array ('display_name' => __('three fourth', CPSH_TEXTDOMAIN) ),
360
- 'one_fifth' => array ('display_name' => __('one fifth', CPSH_TEXTDOMAIN) ),
361
- 'two_fifth' => array ('display_name' => __('two fifth', CPSH_TEXTDOMAIN) ),
362
- 'three_fifth' => array ('display_name' => __('three fifth', CPSH_TEXTDOMAIN) ),
363
- 'four_fifth' => array ('display_name' => __('four fifth', CPSH_TEXTDOMAIN) ),
364
- 'one_sixth' => array ('display_name' => __('one sixth', CPSH_TEXTDOMAIN) )
 
365
  ));
366
 
367
  if ( ! $column_shortcodes )
@@ -459,4 +465,4 @@ class Codepress_Column_Shortcodes {
459
  }
460
  }
461
 
462
- new Codepress_Column_Shortcodes();
2
 
3
  /*
4
  Plugin Name: Column Shortcodes
5
+ Version: 0.6.5
6
  Description: Adds shortcodes to easily create columns in your posts or pages
7
  Author: Codepress
8
  Author URI: http://www.codepresshq.com/
11
  Domain Path: /languages
12
  License: GPLv2
13
 
14
+ Copyright 2011-2014 Codepress info@codepress.nl
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License version 2 as published by
27
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  */
29
 
30
+ define( 'CPSH_VERSION', '0.6.5' );
31
  define( 'CPSH_URL', plugins_url( '', __FILE__ ) );
32
  define( 'CPSH_TEXTDOMAIN', 'column-shortcodes' );
33
 
119
  * @since 0.1
120
  */
121
  public function frontend_styles() {
122
+ if ( apply_filters( 'cpsh_load_styles', true ) ) {
123
+ if ( ! is_rtl() ) {
124
+ wp_enqueue_style( 'cpsh-shortcodes', CPSH_URL.'/assets/css/shortcodes.css', array(), CPSH_VERSION, 'all' );
125
+ } else {
126
+ wp_enqueue_style( 'cpsh-shortcodes-rtl', CPSH_URL.'/assets/css/shortcodes-rtl.css', array(), CPSH_VERSION, 'all' );
127
+ }
128
  }
129
  }
130
 
198
  $name = str_replace( $this->prefix, '', $name );
199
  }
200
 
201
+ $output = "<div{$id} class='content-column {$name}{$class}'>{$content}</div>";
202
 
203
  if ( false !== $pos ) {
204
  $output .= "<div class='clear_column'></div>";
215
  private function is_edit_screen() {
216
  global $pagenow;
217
 
218
+ $allowed_screens = apply_filters( 'cpsh_allowed_screens', array( 'post-new.php', 'page-new.php', 'post.php', 'page.php', 'profile.php', 'user-edit.php', 'user-new.php' ) );
219
+
220
+ if ( in_array( $pagenow, $allowed_screens ) ) {
221
  return true;
222
+ }
223
 
224
  return false;
225
  }
265
  */
266
  public function add_shortcode_button( $page = null, $target = null ) {
267
  ?>
268
+ <a href="#TB_inline?width=640&amp;height=600&amp;inlineId=cpsh-wrap" class="thickbox button" title="<?php _e( 'Select shortcode', CPSH_TEXTDOMAIN ); ?>" data-page="<?php echo $page; ?>" data-target="<?php echo $target; ?>">
269
  <img src="<?php echo CPSH_URL . "/assets/images/shortcode.png";?>" alt="" />
270
  </a>
271
  <?php
336
 
337
  </div><!--cpsh-generator-shell-->
338
 
339
+ <p class='description'>Checkout <a href="http://www.codepresshq.com">other plugins by Codepress</a>.</p>
340
  </div>
341
  </div>
342
 
356
 
357
  // define column shortcodes
358
  $column_shortcodes = apply_filters( 'cpsh_column_shortcodes', array(
359
+ 'full_width' => array( 'display_name' => __('full width', CPSH_TEXTDOMAIN ) ),
360
+ 'one_half' => array( 'display_name' => __('one half', CPSH_TEXTDOMAIN ) ),
361
+ 'one_third' => array( 'display_name' => __('one third', CPSH_TEXTDOMAIN ) ),
362
+ 'one_fourth' => array( 'display_name' => __('one fourth', CPSH_TEXTDOMAIN ) ),
363
+ 'two_third' => array( 'display_name' => __('two third', CPSH_TEXTDOMAIN ) ),
364
+ 'three_fourth' => array( 'display_name' => __('three fourth', CPSH_TEXTDOMAIN ) ),
365
+ 'one_fifth' => array( 'display_name' => __('one fifth', CPSH_TEXTDOMAIN ) ),
366
+ 'two_fifth' => array( 'display_name' => __('two fifth', CPSH_TEXTDOMAIN ) ),
367
+ 'three_fifth' => array( 'display_name' => __('three fifth', CPSH_TEXTDOMAIN ) ),
368
+ 'four_fifth' => array( 'display_name' => __('four fifth', CPSH_TEXTDOMAIN ) ),
369
+ 'one_sixth' => array( 'display_name' => __('one sixth', CPSH_TEXTDOMAIN ) ),
370
+ 'five_sixth' => array( 'display_name' => __('five sixth', CPSH_TEXTDOMAIN ) )
371
  ));
372
 
373
  if ( ! $column_shortcodes )
465
  }
466
  }
467
 
468
+ new Codepress_Column_Shortcodes();
languages/column-shortcodes-pl_PL.mo ADDED
Binary file
languages/column-shortcodes-pl_PL.po ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #
2
+ # Translators:
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Column Shortcodes\n"
6
+ "Report-Msgid-Bugs-To: \n"
7
+ "POT-Creation-Date: 2013-07-19 10:04+0100\n"
8
+ "PO-Revision-Date: 2014-03-10 08:25+0100\n"
9
+ "Last-Translator: Adrian Ambroziak <adrian.ambroziak@gmail.com>\n"
10
+ "Language-Team: Adrian Ambroziak - Poland <adrian.ambroziak@gmail.com>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Language: pl_PL\n"
15
+ "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
16
+ "X-Generator: Poedit 1.5.4\n"
17
+ "X-Poedit-Basepath: .\n"
18
+ "X-Poedit-KeywordsList: __;_e\n"
19
+ "X-Poedit-SourceCharset: UTF-8\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPath-1: ..\n"
22
+
23
+ #: ../column-shortcodes.php:246
24
+ msgid "Select shortcode"
25
+ msgstr "Wybierz układ kolumn"
26
+
27
+ #: ../column-shortcodes.php:282
28
+ msgid "Column shortcodes"
29
+ msgstr "Skróty kolumn"
30
+
31
+ #: ../column-shortcodes.php:289
32
+ msgid "Column padding ( optional )"
33
+ msgstr "Odstępy między kolumnami (opcjonalnie)"
34
+
35
+ #: ../column-shortcodes.php:291
36
+ msgid ""
37
+ "Use the input fields below to customize the padding of your column shortcode."
38
+ msgstr ""
39
+ "Użyj poniższych pól wejściowych, żeby dostosować odstępy w układzie kolumn."
40
+
41
+ #: ../column-shortcodes.php:292
42
+ msgid "Enter padding first, then select your column shortcode."
43
+ msgstr "Najpierw podaj odstępy, potem wybierz układ kolumn"
44
+
45
+ #: ../column-shortcodes.php:307
46
+ msgid "reset"
47
+ msgstr "skasuj"
48
+
49
+ #: ../column-shortcodes.php:335
50
+ msgid "full width"
51
+ msgstr "pełna szerokość"
52
+
53
+ #: ../column-shortcodes.php:336
54
+ msgid "one half"
55
+ msgstr "jedna druga"
56
+
57
+ #: ../column-shortcodes.php:337
58
+ msgid "one third"
59
+ msgstr "jedna trzecia"
60
+
61
+ #: ../column-shortcodes.php:338
62
+ msgid "one fourth"
63
+ msgstr "jedna czwarta"
64
+
65
+ #: ../column-shortcodes.php:339
66
+ msgid "two third"
67
+ msgstr "dwie trzecie"
68
+
69
+ #: ../column-shortcodes.php:340
70
+ msgid "three fourth"
71
+ msgstr "trzy czwarte"
72
+
73
+ #: ../column-shortcodes.php:341
74
+ msgid "one fifth"
75
+ msgstr "jedna piąta"
76
+
77
+ #: ../column-shortcodes.php:342
78
+ msgid "two fifth"
79
+ msgstr "dwie piąte"
80
+
81
+ #: ../column-shortcodes.php:343
82
+ msgid "three fifth"
83
+ msgstr "trzy piąte"
84
+
85
+ #: ../column-shortcodes.php:344
86
+ msgid "four fifth"
87
+ msgstr "cztery piąte"
88
+
89
+ #: ../column-shortcodes.php:345
90
+ msgid "one sixth"
91
+ msgstr "jedna szósta"
92
+
93
+ #: ../column-shortcodes.php:373
94
+ msgid "last"
95
+ msgstr "ostatnia kolumna"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: codepress, tschutter, davidmosterd
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
4
  Tags: columns, column, shortcodes, shortcode, divider, layout, posts, editor, wp-admin, admin, codepress, wordpress
5
  Requires at least: 3.1
6
- Tested up to: 3.7.1
7
- Stable tag: 0.6.3
8
 
9
  Adds shortcodes to easily create columns in your posts or pages.
10
 
@@ -27,6 +27,7 @@ There are 10 different column widths available from which you can make all combi
27
  * three fifth (3/5)
28
  * four fifth (4/5)
29
  * one sixth (1/6)
 
30
 
31
  A preset stylesheet is included, which you can also overwrite to you liking in your theme's stylesheet.
32
 
@@ -73,6 +74,8 @@ You could also type in the shortcode yourself inside the editor. The following s
73
  [four_fifth_last][/four_fifth_last]
74
  [one_sixth][/one_sixth]
75
  [one_sixth_last][/one_sixth_last]
 
 
76
  `
77
 
78
  **Another option**
@@ -136,6 +139,7 @@ function hide_column_shortcodes( $shortcodes ) {
136
  // unset( $shortcodes['three_fifth'] );
137
  // unset( $shortcodes['four_fifth'] );
138
  // unset( $shortcodes['one_sixth'] );
 
139
 
140
  return $shortcodes;
141
  }
@@ -229,6 +233,14 @@ You can easily overwrite the existing stylesheet. For example you would like to
229
  }
230
  `
231
 
 
 
 
 
 
 
 
 
232
  = Will you be adding more shortcodes? =
233
 
234
  We would love to hear your feedback and suggestions on this. Just send an email to <a href="mailto:info@codepress.nl">info@codepress.nl</a>.
@@ -247,6 +259,13 @@ You will find a .po file in the languages folder which you can use. You can send
247
 
248
  == Changelog ==
249
 
 
 
 
 
 
 
 
250
  = 0.6.3 =
251
  * updated languages
252
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
4
  Tags: columns, column, shortcodes, shortcode, divider, layout, posts, editor, wp-admin, admin, codepress, wordpress
5
  Requires at least: 3.1
6
+ Tested up to: 3.9.2
7
+ Stable tag: 0.6.45
8
 
9
  Adds shortcodes to easily create columns in your posts or pages.
10
 
27
  * three fifth (3/5)
28
  * four fifth (4/5)
29
  * one sixth (1/6)
30
+ * five sixth (5/6)
31
 
32
  A preset stylesheet is included, which you can also overwrite to you liking in your theme's stylesheet.
33
 
74
  [four_fifth_last][/four_fifth_last]
75
  [one_sixth][/one_sixth]
76
  [one_sixth_last][/one_sixth_last]
77
+ [five_sixth][/five_sixth]
78
+ [five_sixth_last][/five_sixth_last]
79
  `
80
 
81
  **Another option**
139
  // unset( $shortcodes['three_fifth'] );
140
  // unset( $shortcodes['four_fifth'] );
141
  // unset( $shortcodes['one_sixth'] );
142
+ // unset( $shortcodes['five_sixth'] );
143
 
144
  return $shortcodes;
145
  }
233
  }
234
  `
235
 
236
+ = How can I prevent the loading of the frontend styling =
237
+
238
+ If you would like to prevent the loading of the column styling on the frontend; place the following in your functions.php
239
+
240
+ `
241
+ add_filter( 'cpsh_load_styles', '__return_false' );
242
+ `
243
+
244
  = Will you be adding more shortcodes? =
245
 
246
  We would love to hear your feedback and suggestions on this. Just send an email to <a href="mailto:info@codepress.nl">info@codepress.nl</a>.
259
 
260
  == Changelog ==
261
 
262
+ = 0.6.5 =
263
+ * added filter to prevent loading of frontend styles: add_filter( 'cpsh_load_styles', '__return_false' );
264
+ * added 5/6 column;
265
+
266
+ = 0.6.4 =
267
+ * updated icon for WP3.8
268
+
269
  = 0.6.3 =
270
  * updated languages
271