Column Shortcodes - Version 0.4

Version Description

  • added improvements made for inclusion on WordPress.com VIP ( thanks to danielbachhuber )
  • added WordPress coding conventions ( see http://codex.wordpress.org/WordPress_Coding_Standards )
  • added fix for script and style loading
Download this release

Release Info

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

Code changes from version 0.3 to 0.4

assets/css/admin-rtl.css CHANGED
@@ -1,6 +1,6 @@
1
  #cpsh .cpsh-title {
2
  width: 100%;
3
- text-align: right;
4
  }
5
  #cpsh .columns {
6
  padding-left: 0;
1
  #cpsh .cpsh-title {
2
  width: 100%;
3
+ text-align: right;
4
  }
5
  #cpsh .columns {
6
  padding-left: 0;
assets/css/admin.css CHANGED
@@ -27,7 +27,7 @@
27
  padding-left: 94px;
28
  min-width: 130px;
29
  text-decoration: none;
30
- background: transparent url(../images/columns.png) no-repeat left 6px;
31
  }
32
  #cpsh .cp-one_half { background-position: left 6px; }
33
  #cpsh .cp-one_half_last { background-position: left -14px; }
27
  padding-left: 94px;
28
  min-width: 130px;
29
  text-decoration: none;
30
+ background: transparent url(../images/columns.png) no-repeat left 6px;
31
  }
32
  #cpsh .cp-one_half { background-position: left 6px; }
33
  #cpsh .cp-one_half_last { background-position: left -14px; }
assets/css/shortcodes-rtl.css CHANGED
@@ -1,4 +1,4 @@
1
- /* =General CSS
2
  -------------------------------------------------------------- */
3
  .one_half,
4
  .one_third,
@@ -12,7 +12,7 @@
12
  .one_sixth {
13
  float: right;
14
  }
15
- .clear_column {
16
  clear:both;
17
  display:block;
18
  font-size:0; height:0;
@@ -58,9 +58,9 @@
58
 
59
  /* =Small Margins Template
60
  -------------------------------------------------------------- */
61
- /*
62
  .one_half {
63
- width: 48%;
64
  margin-left: 2%;
65
  }
66
  .one_third {
@@ -98,5 +98,5 @@
98
  .one_sixth {
99
  width: 16%;
100
  margin-left: 0.6%;
101
- }
102
  */
1
+ /* =General CSS
2
  -------------------------------------------------------------- */
3
  .one_half,
4
  .one_third,
12
  .one_sixth {
13
  float: right;
14
  }
15
+ .clear_column {
16
  clear:both;
17
  display:block;
18
  font-size:0; height:0;
58
 
59
  /* =Small Margins Template
60
  -------------------------------------------------------------- */
61
+ /*
62
  .one_half {
63
+ width: 48%;
64
  margin-left: 2%;
65
  }
66
  .one_third {
98
  .one_sixth {
99
  width: 16%;
100
  margin-left: 0.6%;
101
+ }
102
  */
assets/css/shortcodes.css CHANGED
@@ -1,4 +1,4 @@
1
- /* =General CSS
2
  -------------------------------------------------------------- */
3
  .one_half,
4
  .one_third,
@@ -12,7 +12,7 @@
12
  .one_sixth {
13
  float: left;
14
  }
15
- .clear_column {
16
  clear:both;
17
  display:block;
18
  font-size:0; height:0;
@@ -58,9 +58,9 @@
58
 
59
  /* =Small Margins Template
60
  -------------------------------------------------------------- */
61
- /*
62
  .one_half {
63
- width: 48%;
64
  margin-right: 2%;
65
  }
66
  .one_third {
@@ -98,5 +98,5 @@
98
  .one_sixth {
99
  width: 16%;
100
  margin-right: 0.6%;
101
- }
102
  */
1
+ /* =General CSS
2
  -------------------------------------------------------------- */
3
  .one_half,
4
  .one_third,
12
  .one_sixth {
13
  float: left;
14
  }
15
+ .clear_column {
16
  clear:both;
17
  display:block;
18
  font-size:0; height:0;
58
 
59
  /* =Small Margins Template
60
  -------------------------------------------------------------- */
61
+ /*
62
  .one_half {
63
+ width: 48%;
64
  margin-right: 2%;
65
  }
66
  .one_third {
98
  .one_sixth {
99
  width: 16%;
100
  margin-right: 0.6%;
101
+ }
102
  */
assets/js/admin.js CHANGED
@@ -1,7 +1,7 @@
1
  (function($) {
2
 
3
- $(document).ready(function()
4
- {
5
  codepressShortcodes();
6
  });
7
 
@@ -13,9 +13,9 @@
13
  {
14
  // Insert shortcode
15
  $('#cpsh .insert-shortcode').live('click', function(event) {
16
-
17
  var shortcode = $(this).attr('rel');
18
-
19
  window.send_to_editor(shortcode);
20
 
21
  // Prevent default action
@@ -23,5 +23,5 @@
23
  return false;
24
  });
25
  }
26
-
27
  })(jQuery);
1
  (function($) {
2
 
3
+ $(document).ready(function()
4
+ {
5
  codepressShortcodes();
6
  });
7
 
13
  {
14
  // Insert shortcode
15
  $('#cpsh .insert-shortcode').live('click', function(event) {
16
+
17
  var shortcode = $(this).attr('rel');
18
+
19
  window.send_to_editor(shortcode);
20
 
21
  // Prevent default action
23
  return false;
24
  });
25
  }
26
+
27
  })(jQuery);
column-shortcodes.php CHANGED
@@ -1,340 +1,375 @@
1
- <?php
2
- /*
3
- Plugin Name: Column Shortcodes
4
- Version: 0.3
5
- Description: Adds shortcodes to easily create columns in your posts or pages
6
- Author: Codepress
7
- Author URI: http://www.codepress.nl
8
- Plugin URI: http://www.codepress.nl/plugins/
9
- Text Domain: column-shortcodes
10
- Domain Path: /languages
11
- License: GPLv2
12
-
13
- Copyright 2011 Codepress info@codepress.nl
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License version 2 as published by
17
- the Free Software Foundation.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program; if not, write to the Free Software
26
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
- */
28
-
29
- define( 'CPSH_VERSION', '0.3' );
30
- define( 'CPSH_URL', plugins_url('', __FILE__) );
31
- define( 'CPSH_TEXTDOMAIN', 'column-shortcodes' );
32
-
33
- // Long posts should require a higher limit, see http://core.trac.wordpress.org/ticket/8553
34
- @ini_set('pcre.backtrack_limit', 500000);
35
-
36
- /**
37
- * Column Shortcodes
38
- *
39
- * @since 0.1
40
- *
41
- */
42
- class Codepress_Column_Shortcodes
43
- {
44
- /**
45
- * Constructor
46
- *
47
- * @since 0.1
48
- */
49
- function __construct()
50
- {
51
- add_action( 'wp_loaded', array( $this, 'init') );
52
- }
53
-
54
- /**
55
- * Initialize plugin.
56
- *
57
- * @since 0.1
58
- */
59
- public function init()
60
- {
61
- $this->add_shortcodes();
62
-
63
- add_action('admin_init', array( $this, 'add_editor_buttons' ) );
64
- add_action( 'admin_footer', array( $this, 'popup' ) );
65
-
66
- // styling
67
- add_action( 'admin_print_styles', array( $this, 'admin_styles') );
68
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles') );
69
-
70
- // scripts, only load when editor is available
71
- add_action( 'tiny_mce_plugins', array( $this, 'admin_scripts') );
72
-
73
- // translations
74
- load_plugin_textdomain( CPSH_TEXTDOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
75
- }
76
-
77
- /**
78
- * Register admin css
79
- *
80
- * @since 0.1
81
- */
82
- public function admin_styles()
83
- {
84
- wp_enqueue_style( 'cpsh-admin', CPSH_URL.'/assets/css/admin.css', array(), CPSH_VERSION, 'all' );
85
-
86
- if ( is_rtl() ) {
87
- wp_enqueue_style( 'cpsh-admin-rtl', CPSH_URL.'/assets/css/admin-rtl.css', array(), CPSH_VERSION, 'all' );
88
- }
89
- }
90
-
91
- /**
92
- * Register admin scripts
93
- *
94
- * @since 0.1
95
- */
96
- public function admin_scripts( $plugins )
97
- {
98
- wp_enqueue_script( 'cpsh-admin', CPSH_URL.'/assets/js/admin.js', array('jquery'), CPSH_VERSION );
99
-
100
- return $plugins;
101
- }
102
-
103
- /**
104
- * Register frontend styles
105
- *
106
- * @since 1.0
107
- */
108
- public function frontend_styles()
109
- {
110
- if ( ! is_rtl() ) {
111
- wp_enqueue_style( 'cpsh-shortcodes', CPSH_URL.'/assets/css/shortcodes.css', array(), CPSH_VERSION, 'all' );
112
- } else {
113
- wp_enqueue_style( 'cpsh-shortcodes-rtl', CPSH_URL.'/assets/css/shortcodes-rtl.css', array(), CPSH_VERSION, 'all' );
114
- }
115
-
116
- }
117
-
118
- /**
119
- * Add shortcodes
120
- *
121
- * @since 0.1
122
- */
123
- function add_shortcodes()
124
- {
125
- foreach ( $this->get_shortcodes() as $shortcode ) {
126
- add_shortcode($shortcode['name'], array( $this, 'columns') );
127
- }
128
- }
129
-
130
- /**
131
- * Insert Markup
132
- *
133
- * @since 0.1
134
- */
135
- function columns($atts, $content = null, $name='')
136
- {
137
- extract(shortcode_atts(array(
138
- "id" => '',
139
- "class" => ''
140
- ), $atts));
141
-
142
- $content = $this->content_helper($content);
143
-
144
- $id = ($id <> '') ? " id='" . esc_attr( $id ) . "'" : '';
145
- $class = ($class <> '') ? esc_attr( ' ' . $class ) : '';
146
-
147
- $pos = strpos($name,'_last');
148
-
149
- if($pos !== false)
150
- $name = str_replace('_last',' last_column',$name);
151
-
152
- $output = "<div{$id} class='{$name}{$class}'>{$content}</div>";
153
-
154
- if($pos !== false)
155
- $output .= "<div class='clear_column'></div>";
156
-
157
- return $output;
158
- }
159
-
160
- /**
161
- * Add buttons to TimyMCE
162
- *
163
- * @since 0.1
164
- */
165
- function add_editor_buttons()
166
- {
167
- global $pagenow;
168
-
169
- if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) && in_array($pagenow, array('post-new.php', 'page-new.php', 'post.php', 'page.php', 'profile.php', 'user-edit.php', 'user-new.php') ) ) {
170
-
171
- // add html buttons, when using this filter
172
- if( apply_filters('add_shortcode_html_buttons', false ) ) {
173
- add_action( 'admin_head', array( $this, 'add_html_buttons' ) );
174
- }
175
-
176
- // add shortcode button
177
- add_action( 'media_buttons', array( $this, 'add_shortcode_button' ), 100 );
178
- }
179
- }
180
-
181
- /**
182
- * Add shortcode button to TimyMCE
183
- *
184
- * @since 0.1
185
- */
186
- function add_shortcode_button( $page = null, $target = null )
187
- {
188
- echo "
189
- <a href='#TB_inline?width=640&height=600&inlineId=cpsh-wrap' class='thickbox' title='" . __( 'Select shortcode', CPSH_TEXTDOMAIN ) . "' data-page='{$page}' data-target='{$target}'>
190
- <img src='" . CPSH_URL . "/assets/images/shortcode.png' alt='' />
191
- </a>
192
- ";
193
- }
194
-
195
- /**
196
- * TB window Popup
197
- *
198
- * @since 0.1
199
- */
200
- function popup()
201
- {
202
- $buttons = $this->get_shortcodes();
203
-
204
- // buttons
205
- $select = '';
206
- foreach ( $buttons as $button ) {
207
-
208
- $open_tag = str_replace('\n', '', $button['options']['open_tag']);
209
- $close_tag = str_replace('\n', '', $button['options']['close_tag']);
210
-
211
- $select .= "
212
- <a href='javascript:;' rel='{$open_tag}{$close_tag}' class='cp-{$button['name']} columns insert-shortcode'>
213
- {$button['options']['display_name']}
214
- </a>";
215
- }
216
-
217
- // popup frame
218
- $popup = "
219
- <div id='cpsh-wrap' style='display:none'>
220
- <div id='cpsh'>
221
- <div id='cpsh-generator-shell'>
222
- <div id='cpsh-generator-header'>
223
- <h2 class='cpsh-title'>" . __('Column shortcodes', CPSH_TEXTDOMAIN) . "</h2>
224
- {$select}
225
- </div>
226
- <div id='cpsh-settings'></div>
227
- </div>
228
- </div>
229
- </div>
230
- ";
231
-
232
- echo $popup;
233
- }
234
-
235
- /**
236
- * get shortcodes
237
- *
238
- * @since 0.1
239
- */
240
- function get_shortcodes()
241
- {
242
- $shortcodes = array();
243
-
244
- // define column shortcodes
245
- $column_shortcodes = array(
246
- 'one_half' => array ('display_name' => __('one half', CPSH_TEXTDOMAIN) ),
247
- 'one_third' => array ('display_name' => __('one third', CPSH_TEXTDOMAIN) ),
248
- 'one_fourth' => array ('display_name' => __('one fourth', CPSH_TEXTDOMAIN) ),
249
- 'two_third' => array ('display_name' => __('two third', CPSH_TEXTDOMAIN) ),
250
- 'three_fourth' => array ('display_name' => __('three fourth', CPSH_TEXTDOMAIN) ),
251
- 'one_fifth' => array ('display_name' => __('one fifth', CPSH_TEXTDOMAIN) ),
252
- 'two_fifth' => array ('display_name' => __('two fifth', CPSH_TEXTDOMAIN) ),
253
- 'three_fifth' => array ('display_name' => __('three fifth', CPSH_TEXTDOMAIN) ),
254
- 'four_fifth' => array ('display_name' => __('four fifth', CPSH_TEXTDOMAIN) ),
255
- 'one_sixth' => array ('display_name' => __('one sixth', CPSH_TEXTDOMAIN) )
256
- );
257
-
258
- foreach ( $column_shortcodes as $shortcode => $options ) {
259
- $shortcodes[] = array(
260
- 'name' => $shortcode,
261
- 'options' => array(
262
- 'display_name' => $options['display_name'],
263
- 'open_tag' => '\n'."[{$shortcode}]",
264
- 'close_tag' => "[/{$shortcode}]".'\n',
265
- 'key' => ''
266
- )
267
- );
268
- $shortcodes[] = array(
269
- 'name' => "{$shortcode}_last",
270
- 'options' => array(
271
- 'display_name' => $options['display_name'] . ' (' . __('last', CPSH_TEXTDOMAIN) . ')',
272
- 'open_tag' => '\n'."[{$shortcode}_last]",
273
- 'close_tag' => "[/{$shortcode}_last]".'\n',
274
- 'key' => ''
275
- )
276
- );
277
- }
278
-
279
- return $shortcodes;
280
- }
281
-
282
- /**
283
- * Add buttons to TimyMCE HTML tab
284
- *
285
- * @since 0.1
286
- */
287
- function add_html_buttons()
288
- {
289
- wp_print_scripts( 'quicktags' );
290
-
291
- $shortcodes = $this->get_shortcodes();
292
-
293
- // output script
294
- $script = '';
295
- foreach ( $shortcodes as $shortcode ) {
296
- $options = $shortcode['options'];
297
-
298
- $script .= "edButtons[edButtons.length] = new edButton('ed_{$shortcode['name']}'
299
- ,'{$shortcode['name']}'
300
- ,'{$options['open_tag']}'
301
- ,'{$options['close_tag']}'
302
- ,'{$options['key']}'
303
- ); \n";
304
- }
305
-
306
- $script = "
307
- <script type='text/javascript'>\n
308
- /* <![CDATA[ */ \n
309
- {$script}
310
- \n /* ]]> */ \n
311
- </script>
312
- ";
313
-
314
- echo $script;
315
- }
316
-
317
- /**
318
- * Content Helper
319
- *
320
- * @since 0.1
321
- */
322
- function content_helper( $content, $paragraph_tag = false, $br_tag = false )
323
- {
324
- $content = preg_replace('#^<\/p>|^<br \/>|<p>$#', '', $content);
325
-
326
- if ( $br_tag ) {
327
- $content = preg_replace('#<br \/>#', '', $content);
328
- }
329
-
330
- if ( $paragraph_tag ) {
331
- $content = preg_replace('#<p>|</p>#', '', $content);
332
- }
333
-
334
- return do_shortcode( shortcode_unautop( trim($content) ) );
335
- }
336
- }
337
-
338
- new Codepress_Column_Shortcodes();
339
-
340
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Column Shortcodes
4
+ Version: 0.4
5
+ Description: Adds shortcodes to easily create columns in your posts or pages
6
+ Author: Codepress
7
+ Author URI: http://www.codepress.nl
8
+ Plugin URI: http://www.codepress.nl/plugins/
9
+ Text Domain: column-shortcodes
10
+ Domain Path: /languages
11
+ License: GPLv2
12
+
13
+ Copyright 2011-2013 Codepress info@codepress.nl
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License version 2 as published by
17
+ the Free Software Foundation.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
+ */
28
+
29
+ define( 'CPSH_VERSION', '0.4' );
30
+ define( 'CPSH_URL', plugins_url( '', __FILE__ ) );
31
+ define( 'CPSH_TEXTDOMAIN', 'column-shortcodes' );
32
+
33
+ // Long posts should require a higher limit, see http://core.trac.wordpress.org/ticket/8553
34
+ @ini_set( 'pcre.backtrack_limit', 500000 );
35
+
36
+ /**
37
+ * Column Shortcodes
38
+ *
39
+ * @since 0.1
40
+ */
41
+ class Codepress_Column_Shortcodes {
42
+
43
+ /**
44
+ * Constructor
45
+ *
46
+ * @since 0.1
47
+ */
48
+ function __construct() {
49
+ add_action( 'wp_loaded', array( $this, 'init') );
50
+ }
51
+
52
+ /**
53
+ * Initialize plugin.
54
+ *
55
+ * @since 0.1
56
+ */
57
+ public function init() {
58
+ $this->add_shortcodes();
59
+
60
+ add_action('admin_init', array( $this, 'add_editor_buttons' ) );
61
+ add_action( 'admin_footer', array( $this, 'popup' ) );
62
+
63
+ // styling
64
+ add_action( 'admin_print_styles', array( $this, 'admin_styles') );
65
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_styles') );
66
+
67
+ // scripts, only load when editor is available
68
+ add_filter( 'tiny_mce_plugins', array( $this, 'admin_scripts') );
69
+
70
+ // translations
71
+ load_plugin_textdomain( CPSH_TEXTDOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
72
+ }
73
+
74
+ /**
75
+ * Register admin css
76
+ *
77
+ * @since 0.1
78
+ */
79
+ public function admin_styles() {
80
+ if ( $this->has_permissions() && $this->is_edit_screen() ) {
81
+
82
+ wp_enqueue_style( 'cpsh-admin', CPSH_URL.'/assets/css/admin.css', array(), CPSH_VERSION, 'all' );
83
+
84
+ if ( is_rtl() ) {
85
+ wp_enqueue_style( 'cpsh-admin-rtl', CPSH_URL.'/assets/css/admin-rtl.css', array(), CPSH_VERSION, 'all' );
86
+ }
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Register admin scripts
92
+ *
93
+ * @since 0.1
94
+ */
95
+ public function admin_scripts( $plugins ) {
96
+ if ( $this->has_permissions() && $this->is_edit_screen() ) {
97
+ wp_enqueue_script( 'cpsh-admin', CPSH_URL.'/assets/js/admin.js', array('jquery'), CPSH_VERSION );
98
+ }
99
+
100
+ return $plugins;
101
+ }
102
+
103
+ /**
104
+ * Register frontend styles
105
+ *
106
+ * @since 0.1
107
+ */
108
+ public function frontend_styles() {
109
+ if ( ! is_rtl() ) {
110
+ wp_enqueue_style( 'cpsh-shortcodes', CPSH_URL.'/assets/css/shortcodes.css', array(), CPSH_VERSION, 'all' );
111
+ } else {
112
+ wp_enqueue_style( 'cpsh-shortcodes-rtl', CPSH_URL.'/assets/css/shortcodes-rtl.css', array(), CPSH_VERSION, 'all' );
113
+ }
114
+
115
+ }
116
+
117
+ /**
118
+ * Add shortcodes
119
+ *
120
+ * @since 0.1
121
+ */
122
+ private function add_shortcodes() {
123
+ foreach ( $this->get_shortcodes() as $shortcode ) {
124
+ add_shortcode( $shortcode['name'], array( $this, 'columns' ) );
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Insert Markup
130
+ *
131
+ * @since 0.1
132
+ *
133
+ * @param array $atts
134
+ * @param string $content
135
+ * @param string $name
136
+ * @return string $ouput Column HTML output
137
+ */
138
+ function columns( $atts, $content = null, $name='' ) {
139
+ $atts = shortcode_atts(array(
140
+ "id" => '',
141
+ "class" => ''
142
+ ), $atts );
143
+
144
+ $id = sanitize_text_field( $atts['id'] );
145
+ $class = sanitize_text_field( $atts['class'] );
146
+ $content = $this->content_helper( $content );
147
+
148
+ $id = ( $id <> '' ) ? " id='" . esc_attr( $id ) . "'" : '';
149
+ $class = ( $class <> '' ) ? esc_attr( ' ' . $class ) : '';
150
+
151
+ $pos = strpos( $name, '_last' );
152
+
153
+ if ( false !== $pos ) {
154
+ $name = str_replace( '_last', ' last_column', $name );
155
+ }
156
+
157
+ $output = "<div{$id} class='{$name}{$class}'>{$content}</div>";
158
+
159
+ if ( false !== $pos ) {
160
+ $output .= "<div class='clear_column'></div>";
161
+ }
162
+
163
+ return $output;
164
+ }
165
+
166
+ /**
167
+ * Is edit screen
168
+ *
169
+ * @since 0.4
170
+ */
171
+ private function is_edit_screen() {
172
+ global $pagenow;
173
+
174
+ if ( in_array( $pagenow, array( 'post-new.php', 'page-new.php', 'post.php', 'page.php', 'profile.php', 'user-edit.php', 'user-new.php' ) ) )
175
+ return true;
176
+
177
+ return false;
178
+ }
179
+
180
+ /**
181
+ * has permissions
182
+ *
183
+ * @since 0.4
184
+ */
185
+ private function has_permissions() {
186
+ if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) )
187
+ return true;
188
+
189
+ return false;
190
+ }
191
+
192
+ /**
193
+ * Add buttons to TimyMCE
194
+ *
195
+ * @since 0.1
196
+ */
197
+ function add_editor_buttons() {
198
+ global $pagenow;
199
+
200
+ if ( $this->has_permissions() && $this->is_edit_screen() ) {
201
+
202
+ // add html buttons, when using this filter
203
+ if( apply_filters( 'add_shortcode_html_buttons', false ) ) {
204
+ add_action( 'admin_head', array( $this, 'add_html_buttons' ) );
205
+ }
206
+
207
+ // add shortcode button
208
+ add_action( 'media_buttons', array( $this, 'add_shortcode_button' ), 100 );
209
+ }
210
+ }
211
+
212
+ /**
213
+ * Add shortcode button to TimyMCE
214
+ *
215
+ * @since 0.1
216
+ *
217
+ * @param string $page
218
+ * @param string $target
219
+ */
220
+ public function add_shortcode_button( $page = null, $target = null ) {
221
+ echo "
222
+ <a href='#TB_inline?width=640&height=600&inlineId=cpsh-wrap' class='thickbox' title='" . __( 'Select shortcode', CPSH_TEXTDOMAIN ) . "' data-page='{$page}' data-target='{$target}'>
223
+ <img src='" . CPSH_URL . "/assets/images/shortcode.png' alt='' />
224
+ </a>
225
+ ";
226
+ }
227
+
228
+ /**
229
+ * TB window Popup
230
+ *
231
+ * @since 0.1
232
+ */
233
+ public function popup() {
234
+ $buttons = $this->get_shortcodes();
235
+
236
+ // buttons
237
+ $select = '';
238
+ foreach ( $buttons as $button ) {
239
+
240
+ $open_tag = str_replace('\n', '', $button['options']['open_tag']);
241
+ $close_tag = str_replace('\n', '', $button['options']['close_tag']);
242
+
243
+ $select .= "
244
+ <a href='javascript:;' rel='{$open_tag}{$close_tag}' class='cp-{$button['name']} columns insert-shortcode'>
245
+ {$button['options']['display_name']}
246
+ </a>";
247
+ }
248
+
249
+ ?>
250
+
251
+ <div id="cpsh-wrap" style="display:none">
252
+ <div id="cpsh">
253
+ <div id="cpsh-generator-shell">
254
+ <div id="cpsh-generator-header">
255
+ <h2 class="cpsh-title"><?php _e( "Column shortcodes", CPSH_TEXTDOMAIN ); ?></h2>
256
+ <?php echo $select; ?>
257
+ </div>
258
+ <div id="cpsh-settings"></div>
259
+ </div>
260
+ </div>
261
+ </div>
262
+
263
+ <?php
264
+ }
265
+
266
+ /**
267
+ * get shortcodes
268
+ *
269
+ * @since 0.1
270
+ */
271
+ function get_shortcodes() {
272
+ static $shortcodes;
273
+
274
+ if ( ! empty( $shortcodes ) )
275
+ return $shortcodes;
276
+
277
+ // define column shortcodes
278
+ $column_shortcodes = array(
279
+ 'one_half' => array ('display_name' => __('one half', CPSH_TEXTDOMAIN) ),
280
+ 'one_third' => array ('display_name' => __('one third', CPSH_TEXTDOMAIN) ),
281
+ 'one_fourth' => array ('display_name' => __('one fourth', CPSH_TEXTDOMAIN) ),
282
+ 'two_third' => array ('display_name' => __('two third', CPSH_TEXTDOMAIN) ),
283
+ 'three_fourth' => array ('display_name' => __('three fourth', CPSH_TEXTDOMAIN) ),
284
+ 'one_fifth' => array ('display_name' => __('one fifth', CPSH_TEXTDOMAIN) ),
285
+ 'two_fifth' => array ('display_name' => __('two fifth', CPSH_TEXTDOMAIN) ),
286
+ 'three_fifth' => array ('display_name' => __('three fifth', CPSH_TEXTDOMAIN) ),
287
+ 'four_fifth' => array ('display_name' => __('four fifth', CPSH_TEXTDOMAIN) ),
288
+ 'one_sixth' => array ('display_name' => __('one sixth', CPSH_TEXTDOMAIN) )
289
+ );
290
+
291
+ foreach ( $column_shortcodes as $shortcode => $options ) {
292
+ $shortcodes[] = array(
293
+ 'name' => $shortcode,
294
+ 'options' => array(
295
+ 'display_name' => $options['display_name'],
296
+ 'open_tag' => '\n'."[{$shortcode}]",
297
+ 'close_tag' => "[/{$shortcode}]".'\n',
298
+ 'key' => ''
299
+ )
300
+ );
301
+ $shortcodes[] = array(
302
+ 'name' => "{$shortcode}_last",
303
+ 'options' => array(
304
+ 'display_name' => $options['display_name'] . ' (' . __('last', CPSH_TEXTDOMAIN) . ')',
305
+ 'open_tag' => '\n'."[{$shortcode}_last]",
306
+ 'close_tag' => "[/{$shortcode}_last]".'\n',
307
+ 'key' => ''
308
+ )
309
+ );
310
+ }
311
+
312
+ return $shortcodes;
313
+ }
314
+
315
+ /**
316
+ * Add buttons to TimyMCE HTML tab
317
+ *
318
+ * @since 0.1
319
+ */
320
+ function add_html_buttons() {
321
+ wp_print_scripts( 'quicktags' );
322
+
323
+ $shortcodes = $this->get_shortcodes();
324
+
325
+ // output script
326
+ $script = '';
327
+ foreach ( $shortcodes as $shortcode ) {
328
+ $options = $shortcode['options'];
329
+
330
+ $script .= "edButtons[edButtons.length] = new edButton('ed_{$shortcode['name']}'
331
+ ,'{$shortcode['name']}'
332
+ ,'{$options['open_tag']}'
333
+ ,'{$options['close_tag']}'
334
+ ,'{$options['key']}'
335
+ ); \n";
336
+ }
337
+
338
+ $script = "
339
+ <script type='text/javascript'>\n
340
+ /* <![CDATA[ */ \n
341
+ {$script}
342
+ \n /* ]]> */ \n
343
+ </script>
344
+ ";
345
+
346
+ echo $script;
347
+ }
348
+
349
+ /**
350
+ * Content Helper
351
+ *
352
+ * @since 0.1
353
+ *
354
+ * @param string $content
355
+ * @param bool $paragraph_tag Filter p-tags
356
+ * @param bool $br_tag Filter br-tags
357
+ * @return string Shortcode
358
+ */
359
+ function content_helper( $content, $paragraph_tag = false, $br_tag = false )
360
+ {
361
+ $content = preg_replace( '#^<\/p>|^<br \/>|<p>$#', '', $content );
362
+
363
+ if ( $br_tag ) {
364
+ $content = preg_replace( '#<br \/>#', '', $content );
365
+ }
366
+
367
+ if ( $paragraph_tag ) {
368
+ $content = preg_replace( '#<p>|</p>#', '', $content );
369
+ }
370
+
371
+ return do_shortcode( shortcode_unautop( trim( $content ) ) );
372
+ }
373
+ }
374
+
375
+ new Codepress_Column_Shortcodes();
languages/column-shortcodes-es_ES.mo CHANGED
Binary file
languages/column-shortcodes-es_ES.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-07-20 15:46+0100\n"
6
- "PO-Revision-Date: 2012-08-28 08:24+0100\n"
7
  "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
@@ -12,53 +12,58 @@ msgstr ""
12
  "X-Poedit-KeywordsList: __;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SourceCharset: utf-8\n"
 
15
  "X-Poedit-SearchPath-0: .\n"
16
  "X-Poedit-SearchPath-1: ..\n"
17
 
18
- #: ../column-shortcodes.php:174
19
  msgid "Select shortcode"
20
  msgstr "Seleccione códigos abreviados"
21
 
22
- #: ../column-shortcodes.php:208
23
  msgid "Column shortcodes"
24
  msgstr "Códigos disponibles"
25
 
26
- #: ../column-shortcodes.php:231
27
  msgid "one half"
28
  msgstr "la mitad"
29
 
30
- #: ../column-shortcodes.php:232
31
  msgid "one third"
32
  msgstr "un tercio"
33
 
34
- #: ../column-shortcodes.php:233
35
  msgid "one fourth"
36
  msgstr "un cuarto"
37
 
38
- #: ../column-shortcodes.php:234
39
  msgid "two third"
40
  msgstr "dos tercios"
41
 
42
- #: ../column-shortcodes.php:235
43
  msgid "three fourth"
44
  msgstr "tres cuartos"
45
 
46
- #: ../column-shortcodes.php:236
47
  msgid "one fifth"
48
  msgstr "un quinto"
49
 
50
- #: ../column-shortcodes.php:237
51
  msgid "two fifth"
52
  msgstr "dos quintos"
53
 
54
- #: ../column-shortcodes.php:238
55
  msgid "three fifth"
56
  msgstr "tres quintos"
57
 
58
- #: ../column-shortcodes.php:239
 
 
 
 
59
  msgid "one sixth"
60
  msgstr "un sexto"
61
 
62
- #: ../column-shortcodes.php:255
63
  msgid "last"
64
  msgstr "final"
2
  msgstr ""
3
  "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-01-23 11:01+0100\n"
6
+ "PO-Revision-Date: 2013-01-23 11:01+0100\n"
7
  "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
12
  "X-Poedit-KeywordsList: __;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Generator: Poedit 1.5.4\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPath-1: ..\n"
18
 
19
+ #: ../column-shortcodes.php:222
20
  msgid "Select shortcode"
21
  msgstr "Seleccione códigos abreviados"
22
 
23
+ #: ../column-shortcodes.php:255
24
  msgid "Column shortcodes"
25
  msgstr "Códigos disponibles"
26
 
27
+ #: ../column-shortcodes.php:280
28
  msgid "one half"
29
  msgstr "la mitad"
30
 
31
+ #: ../column-shortcodes.php:281
32
  msgid "one third"
33
  msgstr "un tercio"
34
 
35
+ #: ../column-shortcodes.php:282
36
  msgid "one fourth"
37
  msgstr "un cuarto"
38
 
39
+ #: ../column-shortcodes.php:283
40
  msgid "two third"
41
  msgstr "dos tercios"
42
 
43
+ #: ../column-shortcodes.php:284
44
  msgid "three fourth"
45
  msgstr "tres cuartos"
46
 
47
+ #: ../column-shortcodes.php:285
48
  msgid "one fifth"
49
  msgstr "un quinto"
50
 
51
+ #: ../column-shortcodes.php:286
52
  msgid "two fifth"
53
  msgstr "dos quintos"
54
 
55
+ #: ../column-shortcodes.php:287
56
  msgid "three fifth"
57
  msgstr "tres quintos"
58
 
59
+ #: ../column-shortcodes.php:288
60
+ msgid "four fifth"
61
+ msgstr "cuatro quintos"
62
+
63
+ #: ../column-shortcodes.php:289
64
  msgid "one sixth"
65
  msgstr "un sexto"
66
 
67
+ #: ../column-shortcodes.php:305
68
  msgid "last"
69
  msgstr "final"
languages/column-shortcodes-he_IL.mo CHANGED
Binary file
languages/column-shortcodes-he_IL.po CHANGED
@@ -2,10 +2,11 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-08-27 16:24+0100\n"
6
- "PO-Revision-Date: 2013-01-08 11:58+0200\n"
7
- "Last-Translator: ramiy <r_a_m_i@hotmail.com>\n"
8
  "Language-Team: Rami Y (wp-tricks.co.il) <r_a_m_i@hotmail.com>\n"
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -13,54 +14,57 @@ msgstr ""
13
  "X-Poedit-Basepath: .\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Generator: Poedit 1.5.4\n"
16
- "Language: Hebrew\n"
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPath-1: ..\n"
19
 
20
- #: ../column-shortcodes.php:174
21
  msgid "Select shortcode"
22
  msgstr "בחר פקודת מקרו"
23
 
24
- #: ../column-shortcodes.php:208
25
  msgid "Column shortcodes"
26
  msgstr "טור פקודות מקרו"
27
 
28
- #: ../column-shortcodes.php:231
29
  msgid "one half"
30
  msgstr "חצי"
31
 
32
- #: ../column-shortcodes.php:232
33
  msgid "one third"
34
  msgstr "שליש"
35
 
36
- #: ../column-shortcodes.php:233
37
  msgid "one fourth"
38
  msgstr "רבע"
39
 
40
- #: ../column-shortcodes.php:234
41
  msgid "two third"
42
  msgstr "שני שליש"
43
 
44
- #: ../column-shortcodes.php:235
45
  msgid "three fourth"
46
  msgstr "שלוש רבעים"
47
 
48
- #: ../column-shortcodes.php:236
49
  msgid "one fifth"
50
  msgstr "חמישית"
51
 
52
- #: ../column-shortcodes.php:237
53
  msgid "two fifth"
54
  msgstr "שתי חמישיות"
55
 
56
- #: ../column-shortcodes.php:238
57
  msgid "three fifth"
58
  msgstr "שלוש חמישיות"
59
 
60
- #: ../column-shortcodes.php:239
 
 
 
 
61
  msgid "one sixth"
62
  msgstr "שישית"
63
 
64
- #: ../column-shortcodes.php:255
65
  msgid "last"
66
  msgstr "אחרון"
2
  msgstr ""
3
  "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-01-23 10:59+0100\n"
6
+ "PO-Revision-Date: 2013-01-23 11:00+0100\n"
7
+ "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Rami Y (wp-tricks.co.il) <r_a_m_i@hotmail.com>\n"
9
+ "Language: Hebrew\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Generator: Poedit 1.5.4\n"
 
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPath-1: ..\n"
19
 
20
+ #: ../column-shortcodes.php:222
21
  msgid "Select shortcode"
22
  msgstr "בחר פקודת מקרו"
23
 
24
+ #: ../column-shortcodes.php:255
25
  msgid "Column shortcodes"
26
  msgstr "טור פקודות מקרו"
27
 
28
+ #: ../column-shortcodes.php:280
29
  msgid "one half"
30
  msgstr "חצי"
31
 
32
+ #: ../column-shortcodes.php:281
33
  msgid "one third"
34
  msgstr "שליש"
35
 
36
+ #: ../column-shortcodes.php:282
37
  msgid "one fourth"
38
  msgstr "רבע"
39
 
40
+ #: ../column-shortcodes.php:283
41
  msgid "two third"
42
  msgstr "שני שליש"
43
 
44
+ #: ../column-shortcodes.php:284
45
  msgid "three fourth"
46
  msgstr "שלוש רבעים"
47
 
48
+ #: ../column-shortcodes.php:285
49
  msgid "one fifth"
50
  msgstr "חמישית"
51
 
52
+ #: ../column-shortcodes.php:286
53
  msgid "two fifth"
54
  msgstr "שתי חמישיות"
55
 
56
+ #: ../column-shortcodes.php:287
57
  msgid "three fifth"
58
  msgstr "שלוש חמישיות"
59
 
60
+ #: ../column-shortcodes.php:288
61
+ msgid "four fifth"
62
+ msgstr "חמישיות"
63
+
64
+ #: ../column-shortcodes.php:289
65
  msgid "one sixth"
66
  msgstr "שישית"
67
 
68
+ #: ../column-shortcodes.php:305
69
  msgid "last"
70
  msgstr "אחרון"
languages/column-shortcodes-nl_NL.mo CHANGED
Binary file
languages/column-shortcodes-nl_NL.po CHANGED
@@ -1,117 +1,85 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Column Shortcodes v0.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-07-20 15:46+0100\n"
6
- "PO-Revision-Date: 2012-08-14 10:03:31+0000\n"
7
  "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: \n"
14
- "X-Poedit-Country: \n"
15
- "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
17
  "X-Poedit-Basepath: .\n"
18
- "X-Poedit-Bookmarks: \n"
 
19
  "X-Poedit-SearchPath-0: .\n"
20
- "X-Textdomain-Support: yes"
21
 
22
- #: column-shortcodes.php:174
23
- #@ column-shortcodes
24
  msgid "Select shortcode"
25
  msgstr "Selecteer shortcode "
26
 
27
- #: column-shortcodes.php:208
28
- #@ column-shortcodes
29
  msgid "Column shortcodes"
30
  msgstr "Kolom shortcodes"
31
 
32
- #: column-shortcodes.php:231
33
- #@ column-shortcodes
34
  msgid "one half"
35
  msgstr "half"
36
 
37
- #: column-shortcodes.php:232
38
- #@ column-shortcodes
39
  msgid "one third"
40
  msgstr "een derde"
41
 
42
- #: column-shortcodes.php:233
43
- #@ column-shortcodes
44
  msgid "one fourth"
45
  msgstr "een vierde"
46
 
47
- #: column-shortcodes.php:234
48
- #@ column-shortcodes
49
  msgid "two third"
50
  msgstr "tweederde"
51
 
52
- #: column-shortcodes.php:235
53
- #@ column-shortcodes
54
  msgid "three fourth"
55
  msgstr "drie vierde"
56
 
57
- #: column-shortcodes.php:236
58
- #@ column-shortcodes
59
  msgid "one fifth"
60
  msgstr "een vijfde"
61
 
62
- #: column-shortcodes.php:237
63
- #@ column-shortcodes
64
  msgid "two fifth"
65
  msgstr "twee vijfde"
66
 
67
- #: column-shortcodes.php:238
68
- #@ column-shortcodes
69
  msgid "three fifth"
70
  msgstr "drie vijfde"
71
 
72
- #: column-shortcodes.php:239
73
- #@ column-shortcodes
 
 
 
 
 
74
  msgid "one sixth"
75
  msgstr "een zesde"
76
 
77
- #: column-shortcodes.php:255
78
- #@ column-shortcodes
79
  msgid "last"
80
  msgstr "laatste"
81
-
82
- #. translators: plugin header field 'Name'
83
- #: column-shortcodes.php:0
84
- #@ column-shortcodes
85
- msgid "Column Shortcodes"
86
- msgstr ""
87
-
88
- #. translators: plugin header field 'PluginURI'
89
- #: column-shortcodes.php:0
90
- #@ column-shortcodes
91
- msgid "http://www.codepress.nl/plugins/"
92
- msgstr ""
93
-
94
- #. translators: plugin header field 'Description'
95
- #: column-shortcodes.php:0
96
- #@ column-shortcodes
97
- msgid "Adds shortcodes to easily create columns in your posts or pages"
98
- msgstr ""
99
-
100
- #. translators: plugin header field 'Author'
101
- #: column-shortcodes.php:0
102
- #@ column-shortcodes
103
- msgid "Codepress"
104
- msgstr ""
105
-
106
- #. translators: plugin header field 'AuthorURI'
107
- #: column-shortcodes.php:0
108
- #@ column-shortcodes
109
- msgid "http://www.codepress.nl"
110
- msgstr ""
111
-
112
- #. translators: plugin header field 'Version'
113
- #: column-shortcodes.php:0
114
- #@ column-shortcodes
115
- msgid "0.1"
116
- msgstr ""
117
-
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-01-23 11:02+0100\n"
6
+ "PO-Revision-Date: 2013-01-23 11:02+0100\n"
7
  "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-SourceCharset: UTF-8\n"
14
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
15
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
 
16
  "X-Poedit-Basepath: .\n"
17
+ "X-Textdomain-Support: yes\n"
18
+ "X-Generator: Poedit 1.5.4\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
+ "X-Poedit-SearchPath-1: ..\n"
21
 
22
+ # @ column-shortcodes
23
+ #: ../column-shortcodes.php:222
24
  msgid "Select shortcode"
25
  msgstr "Selecteer shortcode "
26
 
27
+ # @ column-shortcodes
28
+ #: ../column-shortcodes.php:255
29
  msgid "Column shortcodes"
30
  msgstr "Kolom shortcodes"
31
 
32
+ # @ column-shortcodes
33
+ #: ../column-shortcodes.php:280
34
  msgid "one half"
35
  msgstr "half"
36
 
37
+ # @ column-shortcodes
38
+ #: ../column-shortcodes.php:281
39
  msgid "one third"
40
  msgstr "een derde"
41
 
42
+ # @ column-shortcodes
43
+ #: ../column-shortcodes.php:282
44
  msgid "one fourth"
45
  msgstr "een vierde"
46
 
47
+ # @ column-shortcodes
48
+ #: ../column-shortcodes.php:283
49
  msgid "two third"
50
  msgstr "tweederde"
51
 
52
+ # @ column-shortcodes
53
+ #: ../column-shortcodes.php:284
54
  msgid "three fourth"
55
  msgstr "drie vierde"
56
 
57
+ # @ column-shortcodes
58
+ #: ../column-shortcodes.php:285
59
  msgid "one fifth"
60
  msgstr "een vijfde"
61
 
62
+ # @ column-shortcodes
63
+ #: ../column-shortcodes.php:286
64
  msgid "two fifth"
65
  msgstr "twee vijfde"
66
 
67
+ # @ column-shortcodes
68
+ #: ../column-shortcodes.php:287
69
  msgid "three fifth"
70
  msgstr "drie vijfde"
71
 
72
+ # @ column-shortcodes
73
+ #: ../column-shortcodes.php:288
74
+ msgid "four fifth"
75
+ msgstr "vier vijfde"
76
+
77
+ # @ column-shortcodes
78
+ #: ../column-shortcodes.php:289
79
  msgid "one sixth"
80
  msgstr "een zesde"
81
 
82
+ # @ column-shortcodes
83
+ #: ../column-shortcodes.php:305
84
  msgid "last"
85
  msgstr "laatste"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/column-shortcodes.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-07-20 15:46+0100\n"
6
- "PO-Revision-Date: 2012-07-20 15:46+0100\n"
7
  "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
@@ -11,55 +11,59 @@ msgstr ""
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: __;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SourceCharset: utf-8\n"
 
15
  "X-Poedit-SearchPath-0: .\n"
16
  "X-Poedit-SearchPath-1: ..\n"
17
 
18
- #: ../column-shortcodes.php:174
19
  msgid "Select shortcode"
20
  msgstr ""
21
 
22
- #: ../column-shortcodes.php:208
23
  msgid "Column shortcodes"
24
  msgstr ""
25
 
26
- #: ../column-shortcodes.php:231
27
  msgid "one half"
28
  msgstr ""
29
 
30
- #: ../column-shortcodes.php:232
31
  msgid "one third"
32
  msgstr ""
33
 
34
- #: ../column-shortcodes.php:233
35
  msgid "one fourth"
36
  msgstr ""
37
 
38
- #: ../column-shortcodes.php:234
39
  msgid "two third"
40
  msgstr ""
41
 
42
- #: ../column-shortcodes.php:235
43
  msgid "three fourth"
44
  msgstr ""
45
 
46
- #: ../column-shortcodes.php:236
47
  msgid "one fifth"
48
  msgstr ""
49
 
50
- #: ../column-shortcodes.php:237
51
  msgid "two fifth"
52
  msgstr ""
53
 
54
- #: ../column-shortcodes.php:238
55
  msgid "three fifth"
56
  msgstr ""
57
 
58
- #: ../column-shortcodes.php:239
 
 
 
 
59
  msgid "one sixth"
60
  msgstr ""
61
 
62
- #: ../column-shortcodes.php:255
63
  msgid "last"
64
  msgstr ""
65
-
2
  msgstr ""
3
  "Project-Id-Version: Column Shortcodes\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-01-23 11:01+0100\n"
6
+ "PO-Revision-Date: 2013-01-23 11:02+0100\n"
7
  "Last-Translator: Codepress <info@codepress.nl>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "X-Poedit-KeywordsList: __;_e\n"
13
  "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Generator: Poedit 1.5.4\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
  "X-Poedit-SearchPath-1: ..\n"
18
 
19
+ #: ../column-shortcodes.php:222
20
  msgid "Select shortcode"
21
  msgstr ""
22
 
23
+ #: ../column-shortcodes.php:255
24
  msgid "Column shortcodes"
25
  msgstr ""
26
 
27
+ #: ../column-shortcodes.php:280
28
  msgid "one half"
29
  msgstr ""
30
 
31
+ #: ../column-shortcodes.php:281
32
  msgid "one third"
33
  msgstr ""
34
 
35
+ #: ../column-shortcodes.php:282
36
  msgid "one fourth"
37
  msgstr ""
38
 
39
+ #: ../column-shortcodes.php:283
40
  msgid "two third"
41
  msgstr ""
42
 
43
+ #: ../column-shortcodes.php:284
44
  msgid "three fourth"
45
  msgstr ""
46
 
47
+ #: ../column-shortcodes.php:285
48
  msgid "one fifth"
49
  msgstr ""
50
 
51
+ #: ../column-shortcodes.php:286
52
  msgid "two fifth"
53
  msgstr ""
54
 
55
+ #: ../column-shortcodes.php:287
56
  msgid "three fifth"
57
  msgstr ""
58
 
59
+ #: ../column-shortcodes.php:288
60
+ msgid "four fifth"
61
+ msgstr ""
62
+
63
+ #: ../column-shortcodes.php:289
64
  msgid "one sixth"
65
  msgstr ""
66
 
67
+ #: ../column-shortcodes.php:305
68
  msgid "last"
69
  msgstr ""
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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.5
7
- Stable tag: 0.3
8
 
9
  Adds shortcodes to easily create columns in your posts or pages.
10
 
@@ -81,7 +81,6 @@ By default these buttons are hidden. If you'd like to use them you can add this
81
  add_filter('add_shortcode_html_buttons', '__return_true' );
82
  `
83
 
84
-
85
  = Where do I add my content? =
86
 
87
  When you have selected a shorcode it will be placed in you editor. You will see something like this:
@@ -102,7 +101,7 @@ You can easily overwrite the existing stylesheet. For example you would like to
102
 
103
  `
104
  .one_half {
105
- width: 48%;
106
  margin-right: 2%;
107
  }
108
  .one_third {
@@ -140,7 +139,7 @@ You can easily overwrite the existing stylesheet. For example you would like to
140
  .one_sixth {
141
  width: 16%;
142
  margin-right: 0.6%;
143
- }
144
  `
145
 
146
  = Will you be adding more shortcodes? =
@@ -161,10 +160,17 @@ You will find a .po file in the languages folder which you can use. You can send
161
 
162
  == Changelog ==
163
 
 
 
 
 
 
 
164
  = 0.3 =
165
 
166
  * added RTL support and Hebrew language ( thanks to Rami Yushuvaey )
167
  * added Slovak translation ( thanks to Branco from WebHostingGeeks )
 
168
 
169
  = 0.2 =
170
 
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.5
7
+ Stable tag: 0.4
8
 
9
  Adds shortcodes to easily create columns in your posts or pages.
10
 
81
  add_filter('add_shortcode_html_buttons', '__return_true' );
82
  `
83
 
 
84
  = Where do I add my content? =
85
 
86
  When you have selected a shorcode it will be placed in you editor. You will see something like this:
101
 
102
  `
103
  .one_half {
104
+ width: 48%;
105
  margin-right: 2%;
106
  }
107
  .one_third {
139
  .one_sixth {
140
  width: 16%;
141
  margin-right: 0.6%;
142
+ }
143
  `
144
 
145
  = Will you be adding more shortcodes? =
160
 
161
  == Changelog ==
162
 
163
+ = 0.4 =
164
+
165
+ * added improvements made for inclusion on WordPress.com VIP ( thanks to danielbachhuber )
166
+ * added WordPress coding conventions ( see http://codex.wordpress.org/WordPress_Coding_Standards )
167
+ * added fix for script and style loading
168
+
169
  = 0.3 =
170
 
171
  * added RTL support and Hebrew language ( thanks to Rami Yushuvaey )
172
  * added Slovak translation ( thanks to Branco from WebHostingGeeks )
173
+ * added column 4/5
174
 
175
  = 0.2 =
176