Admin Columns - Version 1.1.3

Version Description

  • added bug fix for WP3.3beta ( thanks to raonip and ronbme for pointing this out )
Download this release

Release Info

Developer codepress
Plugin Icon 128x128 Admin Columns
Version 1.1.3
Comparing to
See all releases

Code changes from version 1.0 to 1.1.3

assets/css/admin-column.css CHANGED
@@ -109,7 +109,7 @@
109
  display: block;
110
  margin-right: 30px;
111
  overflow: hidden;
112
- height: 15px;
113
  }
114
  #general-cpac-settings .cpac-option-list li .cpac-type-options input {
115
  margin-top: 6px;
@@ -206,4 +206,24 @@
206
  }
207
  #restore-cpac-settings .inside .description {
208
  color: #832525;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
109
  display: block;
110
  margin-right: 30px;
111
  overflow: hidden;
112
+ height: 17px;
113
  }
114
  #general-cpac-settings .cpac-option-list li .cpac-type-options input {
115
  margin-top: 6px;
206
  }
207
  #restore-cpac-settings .inside .description {
208
  color: #832525;
209
+ }
210
+ #likethisplugin-cpac-settings {
211
+ padding: 0 0 10px;
212
+ }
213
+ #likethisplugin-cpac-settings ul {
214
+ margin-left: 20px;
215
+ }
216
+ #likethisplugin-cpac-settings li {
217
+ list-style: square;
218
+ line-height: 16px;
219
+ }
220
+ #likethisplugin-cpac-settings li a {
221
+ text-decoration: none;
222
+ }
223
+ #likethisplugin-cpac-settings li.donate_link a {
224
+ color: green;
225
+ text-decoration: underline;
226
+ }
227
+ #likethisplugin-cpac-settings li.donate_link a:hover {
228
+ color: darkgreen;
229
  }
codepress-admin-columns.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: Codepress Admin Columns
4
- Version: 1.0.1
5
- Description: This plugin makes it easy to customize Admin Columns for your Posts, Pages and Custom Post Type Screens.
6
- Author: Tobias Schutter
7
  Author URI: http://www.codepress.nl
8
  Plugin URI: http://www.codepress.nl/plugins/codepress-admin-columns/
9
  Text Domain: codepress-admin-columns
@@ -26,14 +26,14 @@ 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( 'CPAC_VERSION', '1.0.1' );
30
 
31
  /**
32
  * Init Class
33
  *
34
  * @since 1.0
35
  */
36
- $cpac = new Codepress_Admin_Columns;
37
 
38
  /**
39
  * Advanced Admin Columns Class
@@ -73,7 +73,7 @@ class Codepress_Admin_Columns
73
  $this->handle_requests();
74
  $this->options = get_option('cpac_options');
75
  $this->options_default = get_option('cpac_options_default');
76
-
77
  // slug
78
  $this->slug = 'codepress-admin-columns';
79
  $this->textdomain = 'codepress-admin-columns';
@@ -81,14 +81,15 @@ class Codepress_Admin_Columns
81
  // translations
82
  load_plugin_textdomain( $this->textdomain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
83
 
84
- // Actions and hooks
85
  add_action( 'admin_menu', array( &$this, 'settings_menu') );
86
  add_action( 'admin_init', array( &$this, 'register_settings') );
87
  add_action( 'admin_init', array( &$this, 'register_columns' ) );
88
  add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts') );
89
- add_action( 'manage_pages_custom_column', array( &$this, 'manage_column_value'), 10, 2 );
90
- add_action( 'manage_posts_custom_column', array( &$this, 'manage_column_value'), 10, 2 );
91
- add_action( 'admin_print_styles' , array( &$this, 'column_styles') );
 
92
  add_filter( 'request', array( &$this, 'handle_requests_orderby_column') );
93
  add_filter( 'plugin_action_links', array( &$this, 'add_settings_link'), 10, 2);
94
  }
@@ -140,187 +141,142 @@ class Codepress_Admin_Columns
140
  */
141
  public function register_columns()
142
  {
 
143
  foreach ( $this->post_types as $post_type ) {
144
 
145
  // register column per post type
146
- add_filter("manage_edit-{$post_type}_columns", array(&$this, 'callback_set_column'));
147
 
148
  // register column as sortable
149
- add_filter( "manage_edit-{$post_type}_sortable_columns", array(&$this, 'callback_set_sortable_column'));
150
  }
 
 
 
 
151
  }
152
 
153
  /**
154
- * Callback Set Column
155
  *
156
  * @since 1.0
157
  */
158
- public function callback_set_column($columns)
159
  {
160
  global $post_type;
161
- $columns = $this->set_column($columns, $post_type);
162
 
163
- return $columns;
 
 
 
 
 
 
 
 
 
 
164
  }
165
 
166
  /**
167
- * Callback Set Sortable Column
168
  *
169
- * @since 1.0
170
  */
171
- public function callback_set_sortable_column($columns)
172
  {
173
- global $post_type;
174
- $columns = $this->set_sortable_filter($columns, $post_type);
175
-
176
- return $columns;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  }
178
 
179
  /**
180
- * Settings Page Template.
181
  *
182
- * This function in conjunction with others usei the WordPress
183
- * Settings API to create a settings page where users can adjust
184
- * the behaviour of this plugin.
 
 
 
 
 
 
 
 
185
  *
186
- * @since 1.0
187
  */
188
- public function plugin_settings_page()
189
  {
190
- // loop through post types
191
- $rows = '';
192
- foreach ( $this->post_types as $post_type ) {
193
-
194
- // post type label
195
- $label = $this->get_singular_name($post_type);
196
-
197
- // id
198
- $id = $this->sanitize_string($post_type);
199
-
200
- // build draggable boxes
201
- $boxes = $this->get_column_options($post_type);
202
-
203
- // class
204
- $class = $this->is_menu_type_current($post_type) ? ' current' : ' hidden';
205
 
206
- $rows .= "
207
- <tr id='cpac-box-{$id}' valign='top' class='cpac-box-row{$class}'>
208
- <th class='cpac_post_type' scope='row'>
209
- {$label}
210
- </th>
211
- <td>
212
- <h3 class='cpac_post_type hidden'>{$label}</h3>
213
- {$boxes}
214
- </td>
215
- </tr>
216
- ";
217
- }
218
-
219
- // Post Type Menu
220
- $menu = $this->get_post_type_menu();
221
 
222
- ?>
223
- <div id="cpac" class="wrap">
224
- <?php screen_icon($this->slug) ?>
225
- <h2><?php _e('Codepress Admin Columns', $this->textdomain); ?></h2>
226
- <?php echo $menu ?>
227
- <div class="postbox-container" style="width:70%;">
228
- <div class="metabox-holder">
229
- <div class="meta-box-sortables">
230
-
231
- <div id="general-cpac-settings" class="postbox">
232
- <div title="Click to toggle" class="handlediv"><br></div>
233
- <h3 class="hndle">
234
- <span><?php _e('Admin Columns', $this->textdomain ); ?></span>
235
- </h3>
236
- <div class="inside">
237
- <form method="post" action="options.php">
238
-
239
- <?php settings_fields( 'cpac-settings-group' ); ?>
240
-
241
- <table class="form-table">
242
-
243
- <?php echo $rows ?>
244
-
245
- <tr class="bottom" valign="top">
246
- <th scope="row"></th>
247
- <td>
248
- <p class="submit">
249
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
250
- </p>
251
- </td>
252
- </tr>
253
- </table>
254
- </form>
255
- </div>
256
- </div><!-- general-settings -->
257
-
258
- <div id="restore-cpac-settings" class="postbox">
259
- <div title="Click to toggle" class="handlediv"><br></div>
260
- <h3 class="hndle">
261
- <span><?php _e('Restore defaults', $this->textdomain) ?></span>
262
- </h3>
263
- <div class="inside">
264
- <form method="post" action="">
265
- <input type="submit" class="button" name="cpac-restore-defaults" value="<?php _e('Restore default settings', $this->textdomain ) ?>" onclick="return confirm('<?php _e("Warning! ALL saved admin columns data will be deleted. This cannot be undone. \'OK\' to delete, \'Cancel\' to stop", $this->textdomain); ?>');" />
266
- </form>
267
- <p class="description"><?php _e('This will delete all column settings and restore the default settings.', $this->textdomain); ?></p>
268
- </div>
269
- </div><!-- restore-cpac-settings -->
270
-
271
- </div>
272
- </div>
273
- </div><!-- .postbox-container -->
274
-
275
- <div class="postbox-container" style="width:20%;">
276
- <div class="metabox-holder">
277
- <div class="meta-box-sortables">
278
-
279
- <div id="side-cpac-settings" class="postbox">
280
- <div title="Click to toggle" class="handlediv"><br></div>
281
- <h3 class="hndle">
282
- <span><?php _e('Need support?', $this->textdomain) ?></span>
283
- </h3>
284
- <div class="inside">
285
- <p><?php printf(__('If you are having problems with this plugin, please talk about them in the <a href="%s">Support forums</a>.', $this->textdomain), 'http://wordpress.org/tags/codepress-admin-columns' );?></p>
286
- <p><?php printf(__("If you're sure you've found a bug, or have a feature request, please <a href='%s'>submit your feedback</a>.", $this->textdomain), 'http://www.codepress.nl/plugins/codepress-admin-columns#feedback');?></p>
287
- </div>
288
- </div><!-- side-cpac-settings -->
289
-
290
- </div>
291
- </div>
292
- </div><!-- .postbox-container -->
293
-
294
- </div>
295
- <?php
296
  }
297
-
298
  /**
299
  * Get a list of Column options per post type
300
  *
301
  * @since 1.0
302
  */
303
- private function get_column_options($post_type)
304
  {
305
  // merge all columns
306
- $display_columns = $this->get_merged_columns($post_type);
307
 
308
  // define
309
  $list = '';
310
 
311
  // loop throught the active columns
312
  if ( $display_columns ) {
313
- foreach ( $display_columns as $key => $values ) {
314
 
315
  // add items to the list
316
- $list .= $this->get_box($post_type, $key, $values);
317
 
318
  }
319
  }
320
 
321
  // custom field button
322
  $button_add_column = '';
323
- if ( $this->get_postmeta_by_posttype($post_type) )
324
  $button_add_column = "<a href='javacript:;' class='cpac-add-customfield-column button'>+ " . __('Add Custom Field Column') . "</a>";
325
 
326
  return "
@@ -339,60 +295,62 @@ class Codepress_Admin_Columns
339
  *
340
  * @since 1.0
341
  */
342
- private function get_merged_columns($post_type)
343
  {
344
  //get saved database columns
345
- $db_columns = $this->get_db_columns($post_type);
346
-
347
- // get wp default columns
348
- $wp_default_columns = $this->get_wp_default_columns($post_type);
349
 
350
- // get custom columns
351
- $wp_custom_columns = $this->get_custom_columns($post_type);
352
-
353
- // merge wp default and custom columns
354
- $default_columns = wp_parse_args($wp_custom_columns, $wp_default_columns);
355
 
 
 
 
 
 
 
 
 
 
356
  // loop throught the active columns
357
  if ( $db_columns ) {
358
- foreach ( $db_columns as $key => $values ) {
359
 
360
  // get column meta options from custom columns
361
- if ( strpos($key, 'column-meta-') !== false )
362
- $db_columns[$key]['options'] = $wp_custom_columns['column-meta-1']['options'];
363
 
364
  // add static options
365
  else
366
- $db_columns[$key]['options'] = $default_columns[$key]['options'];
367
 
368
- unset($default_columns[$key]);
369
  }
370
  }
371
 
372
  // merge all
373
- $display_columns = wp_parse_args($db_columns, $default_columns);
374
-
375
  return $display_columns;
376
  }
377
-
378
-
379
  /**
380
  * Get checkbox
381
  *
382
  * @since 1.0
383
  */
384
- private function get_box($post_type, $key, $values)
385
  {
386
  $classes = array();
387
 
388
  // set state
389
  $state = isset($values['state']) ? $values['state'] : '';
390
 
391
- // set sortorder
392
- $sortorder = isset($values['sortorder']) && $values['sortorder'] == 'on' ? 'on' : '';
393
-
394
  // class
395
- $classes[] = "cpac-box-{$key}";
396
  if ( $state )
397
  $classes[] = 'active';
398
  if ( ! empty($values['options']['class']) )
@@ -400,7 +358,7 @@ class Codepress_Admin_Columns
400
  $class = implode(' ', $classes);
401
 
402
  // more box options
403
- $more_options = $this->get_additional_box_options($post_type, $key, $values);
404
  $action = "<a class='cpac-action' href='#open'>open</a>";
405
 
406
  // hide box options
@@ -414,8 +372,7 @@ class Codepress_Admin_Columns
414
  <div class='cpac-type-options'>
415
 
416
  <div class='cpac-checkbox'></div>
417
- <input type='hidden' class='cpac-state' name='cpac_options[columns][{$post_type}][{$key}][state]' value='{$state}'/>
418
- <input type='hidden' name='cpac_options[columns][{$post_type}][{$key}][sortorder]' value='{$sortorder}'/>
419
  <label class='main-label'>{$values['label']}</label>
420
  </div>
421
  <div class='cpac-meta-title'>
@@ -423,8 +380,8 @@ class Codepress_Admin_Columns
423
  <span>{$values['options']['type_label']}</span>
424
  </div>
425
  <div class='cpac-type-inside'>
426
- <label for='cpac_options[columns][{$post_type}][{$key}][label]'>Label: </label>
427
- <input type='text' name='cpac_options[columns][{$post_type}][{$key}][label]' value='{$values['label']}' class='text'/>
428
  <br/>
429
  {$more_options}
430
  </div>
@@ -439,13 +396,13 @@ class Codepress_Admin_Columns
439
  *
440
  * @since 1.0
441
  */
442
- private function get_additional_box_options($post_type, $key, $values)
443
  {
444
  $fields = '';
445
 
446
  // Custom Fields
447
- if ( strpos($key, 'column-meta-') !== false )
448
- $fields .= $this->get_box_options_customfields($post_type, $key, $values);
449
 
450
  return $fields;
451
  }
@@ -455,7 +412,7 @@ class Codepress_Admin_Columns
455
  *
456
  * @since 1.0
457
  */
458
- private function get_box_options_customfields($post_type, $key, $values)
459
  {
460
  // get post meta fields
461
  $fields = $this->get_postmeta_by_posttype($post_type);
@@ -485,10 +442,13 @@ class Codepress_Admin_Columns
485
  'library_id' => __('Media Library Icon', $this->textdomain),
486
  'excerpt' => __('Excerpt'),
487
  'array' => __('Multiple Values', $this->textdomain),
 
488
  );
489
 
490
- // add filters
491
- $fieldtypes = apply_filters('cpac-field-types', $fieldtypes );
 
 
492
  foreach ( $fieldtypes as $fkey => $fieldtype ) {
493
  $fieldtype_options .= sprintf
494
  (
@@ -499,12 +459,16 @@ class Codepress_Admin_Columns
499
  );
500
  }
501
 
 
 
 
 
502
  if ( empty($field_options) )
503
  return false;
504
 
505
  // add remove button
506
  $remove = '<p class="remove-description description">'.__('This field can not be removed', $this->textdomain).'</p>';
507
- if ( $key != 'column-meta-1') {
508
  $remove = "
509
  <p>
510
  <a href='javascript:;' class='cpac-delete-custom-field-box'>".__('Remove')."</a>
@@ -513,12 +477,18 @@ class Codepress_Admin_Columns
513
  }
514
 
515
  $inside = "
516
- <label for='cpac_options[columns][{$post_type}][{$key}][field]'>Custom Field: </label>
517
- <select name='cpac_options[columns][{$post_type}][{$key}][field]'>{$field_options}</select>
518
  <br/>
519
- <label for='cpac_options[columns][{$post_type}][{$key}][field_type]'>Field Type: </label>
520
- <select name='cpac_options[columns][{$post_type}][{$key}][field_type]'>{$fieldtype_options}</select>
521
  <br/>
 
 
 
 
 
 
522
  {$remove}
523
  ";
524
 
@@ -564,7 +534,20 @@ class Codepress_Admin_Columns
564
  wp_enqueue_script( 'jquery-ui-sortable' );
565
  wp_enqueue_script( 'cpac-admin', $this->plugin_url('/assets/js/admin-column.js'), array('jquery', 'jquery-ui-sortable'), CPAC_VERSION );
566
  }
567
-
 
 
 
 
 
 
 
 
 
 
 
 
 
568
  /**
569
  * Get post types
570
  *
@@ -630,7 +613,7 @@ class Codepress_Admin_Columns
630
  }
631
 
632
  /**
633
- * Save geocode coordinates of focus location.
634
  *
635
  * @since 1.0
636
  */
@@ -651,9 +634,15 @@ class Codepress_Admin_Columns
651
 
652
  // stores the default columns that are set by WP or set in the theme.
653
  $wp_default_columns = array();
 
 
654
  foreach ( $this->post_types as $post_type ) {
655
- $wp_default_columns[$post_type] = $this->get_wp_default_columns($post_type);
656
  }
 
 
 
 
657
  update_option( 'cpac_options_default', $wp_default_columns );
658
  }
659
 
@@ -720,20 +709,20 @@ class Codepress_Admin_Columns
720
  *
721
  * @since 1.0
722
  */
723
- public function manage_column_value($key, $post_id)
724
  {
725
- $type = $key;
726
 
727
  // Check for taxonomies, such as column-taxonomy-[taxname]
728
  if ( strpos($type, 'column-taxonomy-') !== false )
729
  $type = 'column-taxonomy';
730
 
731
  // Check for custom fields, such as column-meta-[customfieldname]
732
- if ( strpos($type, 'column-meta-') !== false )
733
  $type = 'column-meta';
734
 
735
  // Hook
736
- do_action('cpac-manage-column', $type, $key, $post_id);
737
 
738
  // Switch Types
739
  $result = '';
@@ -787,9 +776,14 @@ class Codepress_Admin_Columns
787
  $result = get_post($post_id)->post_name;
788
  break;
789
 
 
 
 
 
 
790
  // Taxonomy
791
  case "column-taxonomy" :
792
- $tax = str_replace('column-taxonomy-','',$key);
793
  $tags = get_the_terms($post_id, $tax);
794
  $tarr = array();
795
  if ( $tax == 'post_format' && empty($tags) ) {
@@ -805,7 +799,7 @@ class Codepress_Admin_Columns
805
 
806
  // Custom Field
807
  case "column-meta" :
808
- $result = $this->get_column_value_custom_field($post_id, $key);
809
  break;
810
 
811
  // Attachment
@@ -814,7 +808,7 @@ class Codepress_Admin_Columns
814
  break;
815
 
816
  default :
817
- $result = get_post_meta( $post_id, $key, true );
818
 
819
  endswitch;
820
 
@@ -823,13 +817,66 @@ class Codepress_Admin_Columns
823
 
824
  echo $result;
825
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
826
 
827
  /**
828
  * Get column value of post attachments
829
  *
830
  * @since 1.0
831
  */
832
- private function get_column_value_attachments($post_id)
833
  {
834
  $result = '';
835
  $attachments = get_posts(array(
@@ -851,11 +898,15 @@ class Codepress_Admin_Columns
851
  *
852
  * @since 1.0
853
  */
854
- private function get_column_value_custom_field($post_id, $key)
855
  {
856
- $columns = $this->get_db_columns( get_post_type($post_id) );
857
- $field = isset($columns[$key]['field']) ? $columns[$key]['field'] : '';
858
- $fieldtype = isset($columns[$key]['field_type']) ? $columns[$key]['field_type'] : '';
 
 
 
 
859
 
860
  // Get meta field value
861
  $meta = get_post_meta($post_id, $field, true);
@@ -891,6 +942,9 @@ class Codepress_Admin_Columns
891
 
892
  endswitch;
893
 
 
 
 
894
  return $meta;
895
  }
896
 
@@ -909,43 +963,18 @@ class Codepress_Admin_Columns
909
  $retVal[] = $r_pieces;
910
  }
911
  }
912
- return implode( $glue, $retVal );
913
- }
914
-
915
- /**
916
- * Set Columns for Registering
917
- *
918
- * @since 1.0
919
- */
920
- private function set_column($columns, $post_type)
921
- {
922
- $db_columns = $this->get_db_columns($post_type);
923
 
924
- if ( !$db_columns )
925
- return $columns;
926
-
927
- // set already loaded columns by plugins
928
- $set_columns = $this->filter_preset_columns($columns, $post_type);
929
-
930
- // loop through columns
931
- foreach ( $db_columns as $key => $values ) {
932
-
933
- // is active
934
- if ( isset($values['state']) && $values['state'] == 'on' ){
935
-
936
- // register format
937
- $set_columns[$key] = $values['label'];
938
- }
939
- }
940
- return $set_columns;
941
- }
942
 
943
  /**
944
  * Set columns. These columns apply either for every post or set by a plugin.
945
  *
946
  * @since 1.0
947
  */
948
- private function filter_preset_columns($columns, $post_type = 'post')
949
  {
950
  $options = $this->options_default;
951
 
@@ -953,7 +982,7 @@ class Codepress_Admin_Columns
953
  return $columns;
954
 
955
  // we use the wp default columns for filtering...
956
- $db_columns = $options[$post_type];
957
 
958
  // ... the ones that are set by plugins, theme functions and such.
959
  $dif_columns = array_diff(array_keys($columns), array_keys($db_columns));
@@ -967,44 +996,24 @@ class Codepress_Admin_Columns
967
  }
968
 
969
  return $pre_columns;
970
- }
971
 
972
  /**
973
- * Set sortable columns
974
  *
975
  * @since 1.0
976
  */
977
- private function set_sortable_filter($columns, $post_type)
978
  {
979
- $db_columns = $this->get_db_columns($post_type);
980
-
981
- if ( !$db_columns )
982
- return $columns;
983
-
984
- // loop through columns
985
- foreach ( $db_columns as $key => $values ) {
986
-
987
- // is active
988
- if ( isset($values['sortorder']) && $values['sortorder'] == 'on' ){
989
-
990
- // register format
991
- $columns[$key] = $this->sanitize_string($values['label']);
992
- }
993
- }
994
- return $columns;
995
- }
996
-
997
- /**
998
- * Get WP default supported admin columns per post type.
999
- *
1000
- * @since 1.0
1001
- */
1002
- private function get_wp_default_columns($post_type = 'post')
1003
- {
1004
- // load some dependencies
1005
- require_once(ABSPATH . 'wp-admin\includes\template.php');
1006
- require_once(ABSPATH . 'wp-admin\includes\class-wp-list-table.php');
1007
- require_once(ABSPATH . 'wp-admin\includes\class-wp-posts-list-table.php');
1008
 
1009
  // we need to change the current screen
1010
  global $current_screen;
@@ -1016,12 +1025,53 @@ class Codepress_Admin_Columns
1016
  // ...so we can get its columns
1017
  $columns = WP_Posts_List_Table::get_columns();
1018
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1019
  // we remove the checkbox column as an option...
1020
  unset($columns['cb']);
1021
 
1022
  // change to uniform format
1023
  $uniform_columns = array();
1024
- foreach ( $columns as $key => $label ) {
1025
  $hide_options = false;
1026
  $type_label = $label;
1027
 
@@ -1030,8 +1080,8 @@ class Codepress_Admin_Columns
1030
  $type_label = __('Comments', $this->textdomain);
1031
  $hide_options = true;
1032
  }
1033
-
1034
- $uniform_colums[$key] = array(
1035
  'label' => $label,
1036
  'state' => 'on',
1037
  'options' => array(
@@ -1041,96 +1091,78 @@ class Codepress_Admin_Columns
1041
  )
1042
  );
1043
  }
1044
-
1045
- // reset current screen
1046
- $current_screen = $org_current_screen;
1047
-
1048
  return $uniform_colums;
1049
  }
1050
-
1051
  /**
1052
- * Add extra columns
1053
  *
1054
  * @since 1.0
1055
  */
1056
- private function get_custom_columns($post_type)
1057
  {
1058
  $custom_columns = array();
1059
 
1060
- // default arguments
1061
- $defaults = array(
1062
- 'label' => '',
1063
- 'sortorder' => '',
1064
- 'state' => '',
1065
-
1066
- // options are static
1067
- 'options' => array(
1068
- 'type_label' => __('Custom', $this->textdomain),
1069
- 'hide_options' => false,
1070
- 'class' => 'cpac-box-custom',
1071
- )
1072
- );
1073
-
1074
  // Thumbnail support
1075
  if ( post_type_supports($post_type, 'thumbnail') ) {
1076
- $custom_columns['column-featured_image'] = wp_parse_args( array(
1077
  'label' => __('Featured Image', $this->textdomain),
1078
  'options' => array(
1079
  'type_label' => __('Image', $this->textdomain)
1080
  )
1081
- ), $defaults);
1082
  }
1083
 
1084
  // Excerpt support
1085
  if ( post_type_supports($post_type, 'editor') ) {
1086
- $custom_columns['column-excerpt'] = wp_parse_args( array(
1087
  'label' => __('Excerpt', $this->textdomain),
1088
  'options' => array(
1089
  'type_label' => __('Excerpt', $this->textdomain)
1090
  )
1091
- ), $defaults);
1092
  }
1093
 
1094
  // Sticky support
1095
  if ( $post_type == 'post' ) {
1096
- $custom_columns['column-sticky'] = wp_parse_args( array(
1097
  'label' => __('Sticky', $this->textdomain),
1098
  'options' => array(
1099
  'type_label' => __('Sticky', $this->textdomain)
1100
  )
1101
- ), $defaults);
1102
  }
1103
 
1104
  // Order support
1105
  if ( post_type_supports($post_type, 'page-attributes') ) {
1106
- $custom_columns['column-order'] = wp_parse_args( array(
1107
- 'label' => __('Page Order', $this->textdomain),
1108
- 'sortorder' => 'on',
1109
  'options' => array(
1110
- 'type_label' => __('Order', $this->textdomain)
 
1111
  )
1112
- ), $defaults);
1113
  }
1114
 
1115
  // Page Template
1116
  if ( $post_type == 'page' ) {
1117
- $custom_columns['column-page-template'] = wp_parse_args( array(
1118
  'label' => __('Page Template', $this->textdomain),
1119
- 'sortorder' => 'on',
1120
  'options' => array(
1121
- 'type_label' => __('Page Template', $this->textdomain)
 
1122
  )
1123
- ), $defaults);
1124
  }
1125
 
1126
  // Post Formats
1127
  if ( post_type_supports($post_type, 'post-formats') ) {
1128
- $custom_columns['column-post_formats'] = wp_parse_args( array(
1129
  'label' => __('Post Format', $this->textdomain),
1130
  'options' => array(
1131
  'type_label' => __('Post Format', $this->textdomain)
1132
  )
1133
- ), $defaults);
1134
  }
1135
 
1136
  // Taxonomy support
@@ -1138,57 +1170,157 @@ class Codepress_Admin_Columns
1138
  if ( $taxonomies ) {
1139
  foreach ( $taxonomies as $tax_slug => $tax ) {
1140
  if ( $tax_slug != 'post_tag' && $tax_slug != 'category' && $tax_slug != 'post_format' ) {
1141
- $custom_columns['column-taxonomy-'.$tax->name] = wp_parse_args( array(
1142
  'label' => $tax->label,
1143
  'options' => array(
1144
  'type_label' => __('Taxonomy', $this->textdomain)
1145
  )
1146
- ), $defaults);
1147
  }
1148
  }
1149
  }
1150
 
1151
  // Post ID support
1152
- $custom_columns['column-postid'] = wp_parse_args( array(
1153
- 'label' => 'ID',
1154
- 'sortorder' => 'on',
1155
  'options' => array(
1156
  'type_label' => 'ID',
 
1157
  )
1158
- ), $defaults);
1159
 
1160
  // Slug support
1161
- $custom_columns['column-page-slug'] = wp_parse_args( array(
1162
  'label' => __('Slug', $this->textdomain),
1163
- 'sortorder' => 'on',
1164
  'options' => array(
1165
  'type_label' => __('Slug', $this->textdomain),
 
 
 
 
 
 
 
 
 
1166
  )
1167
- ), $defaults);
1168
 
1169
  // Attachment support
1170
- $custom_columns['column-attachment'] = wp_parse_args( array(
1171
  'label' => __('Attachment', $this->textdomain),
1172
- 'sortorder' => 'on',
1173
  'options' => array(
1174
- 'type_label' => __('Attachment', $this->textdomain)
 
1175
  )
1176
- ), $defaults);
1177
 
1178
  // Custom Field support
1179
  if ( $this->get_postmeta_by_posttype($post_type) ) {
1180
- $custom_columns['column-meta-1'] = wp_parse_args( array(
1181
  'label' => __('Custom Field', $this->textdomain),
1182
  'field' => '',
1183
  'field_type' => '',
 
 
1184
  'options' => array(
1185
  'type_label' => __('Field', $this->textdomain),
1186
- 'class' => 'cpac-box-metafield'
 
1187
  )
1188
- ), $defaults);
1189
  }
1190
 
1191
- return apply_filters('cpac-custom-columns', $custom_columns);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1192
  }
1193
 
1194
  /**
@@ -1196,14 +1328,14 @@ class Codepress_Admin_Columns
1196
  *
1197
  * @since 1.0
1198
  */
1199
- private function get_db_columns($post_type)
1200
  {
1201
  // get plugin options
1202
  $options = $this->options;
1203
 
1204
  // get saved columns
1205
- if ( isset($options['columns'][$post_type]) )
1206
- return $options['columns'][$post_type];
1207
 
1208
  return false;
1209
  }
@@ -1213,7 +1345,7 @@ class Codepress_Admin_Columns
1213
  *
1214
  * @since 1.0
1215
  */
1216
- private function get_post_type_menu()
1217
  {
1218
  // set
1219
  $menu = '';
@@ -1225,16 +1357,16 @@ class Codepress_Admin_Columns
1225
  $referer = $_REQUEST['cpac_type'];
1226
 
1227
  // loop
1228
- foreach ( $this->post_types as $post_type ) {
1229
- $label = $this->get_singular_name($post_type);
1230
- $clean_label = $this->sanitize_string($post_type);
1231
 
1232
  // divider
1233
  $divider = $count++ == 1 ? '' : ' | ';
1234
 
1235
  // current
1236
  $current = '';
1237
- if ( $this->is_menu_type_current($post_type) )
1238
  $current = ' class="current"';
1239
 
1240
  // menu list
@@ -1258,9 +1390,7 @@ class Codepress_Admin_Columns
1258
  * @since 1.0
1259
  */
1260
  private function is_menu_type_current( $post_type )
1261
- {
1262
- //print_r($post_type);
1263
-
1264
  // referer
1265
  $referer = '';
1266
  if ( ! empty($_REQUEST['cpac_type']) )
@@ -1292,10 +1422,18 @@ class Codepress_Admin_Columns
1292
  *
1293
  * @since 1.0
1294
  */
1295
- private function get_singular_name( $post_type )
1296
  {
1297
- $posttype_obj = get_post_type_object($post_type);
1298
- $label = $posttype_obj->labels->singular_name;
 
 
 
 
 
 
 
 
1299
  return $label;
1300
  }
1301
 
@@ -1306,25 +1444,59 @@ class Codepress_Admin_Columns
1306
  */
1307
  public function handle_requests_orderby_column( $vars )
1308
  {
1309
- if ( isset( $vars['orderby'] ) ) {
1310
- // get saved columns
1311
- $db_columns = $this->get_db_columns($vars['post_type']);
1312
 
1313
- // Column Page Order
1314
- if ( isset($db_columns['column-order']) ) {
1315
-
1316
- // sanitizing label
1317
- $label = $this->sanitize_string($db_columns['column-order']['label']);
1318
 
1319
- // Check for Page Order
1320
- if ( $vars['orderby'] == $label ) {
1321
  $vars['orderby'] = 'menu_order';
1322
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1323
  }
1324
  }
1325
  return $vars;
1326
  }
1327
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1328
  /**
1329
  * Sanitize label
1330
  *
@@ -1339,7 +1511,7 @@ class Codepress_Admin_Columns
1339
  }
1340
 
1341
  /**
1342
- * Get a url to a file in this plugin.
1343
  *
1344
  * @since 1.0
1345
  */
@@ -1348,6 +1520,19 @@ class Codepress_Admin_Columns
1348
  return plugins_url($file, __FILE__);
1349
  }
1350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1351
  /**
1352
  * Get a thumbnail
1353
  *
@@ -1365,6 +1550,140 @@ class Codepress_Admin_Columns
1365
  $image = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $new);
1366
 
1367
  return "<img src='{$image}' alt='' width='120' height='80' />";
1368
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1369
  }
1370
  ?>
1
  <?php
2
  /*
3
  Plugin Name: Codepress Admin Columns
4
+ Version: 1.1.3
5
+ Description: This plugin makes it easy to Manage Custom Columns for your Posts, Pages and Custom Post Type Screens.
6
+ Author: Codepress
7
  Author URI: http://www.codepress.nl
8
  Plugin URI: http://www.codepress.nl/plugins/codepress-admin-columns/
9
  Text Domain: codepress-admin-columns
26
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
  */
28
 
29
+ define( 'CPAC_VERSION', '1.1.3' );
30
 
31
  /**
32
  * Init Class
33
  *
34
  * @since 1.0
35
  */
36
+ new Codepress_Admin_Columns();
37
 
38
  /**
39
  * Advanced Admin Columns Class
73
  $this->handle_requests();
74
  $this->options = get_option('cpac_options');
75
  $this->options_default = get_option('cpac_options_default');
76
+
77
  // slug
78
  $this->slug = 'codepress-admin-columns';
79
  $this->textdomain = 'codepress-admin-columns';
81
  // translations
82
  load_plugin_textdomain( $this->textdomain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
83
 
84
+ // actions and hooks
85
  add_action( 'admin_menu', array( &$this, 'settings_menu') );
86
  add_action( 'admin_init', array( &$this, 'register_settings') );
87
  add_action( 'admin_init', array( &$this, 'register_columns' ) );
88
  add_action( 'admin_enqueue_scripts', array( &$this, 'admin_enqueue_scripts') );
89
+ add_action( 'manage_pages_custom_column', array( &$this, 'manage_posts_column_value'), 10, 2 );
90
+ add_action( 'manage_posts_custom_column', array( &$this, 'manage_posts_column_value'), 10, 2 );
91
+ add_action( 'manage_users_custom_column', array( &$this, 'manage_users_column_value'), 10, 3 );
92
+ add_action( 'admin_print_styles' , array( &$this, 'column_styles') );
93
  add_filter( 'request', array( &$this, 'handle_requests_orderby_column') );
94
  add_filter( 'plugin_action_links', array( &$this, 'add_settings_link'), 10, 2);
95
  }
141
  */
142
  public function register_columns()
143
  {
144
+ /** Posts */
145
  foreach ( $this->post_types as $post_type ) {
146
 
147
  // register column per post type
148
+ add_filter("manage_edit-{$post_type}_columns", array(&$this, 'callback_add_posts_column'));
149
 
150
  // register column as sortable
151
+ add_filter( "manage_edit-{$post_type}_sortable_columns", array(&$this, 'callback_add_sortable_posts_column'));
152
  }
153
+
154
+ /** Users */
155
+ add_filter( "manage_users_columns", array(&$this, 'callback_add_users_column'));
156
+ add_filter( "manage_users_sortable_columns", array(&$this, 'callback_add_sortable_users_column') );
157
  }
158
 
159
  /**
160
+ * Callback add Posts Column
161
  *
162
  * @since 1.0
163
  */
164
+ public function callback_add_posts_column($columns)
165
  {
166
  global $post_type;
 
167
 
168
+ return $this->add_managed_columns($post_type, $columns);
169
+ }
170
+
171
+ /**
172
+ * Callback add Users column
173
+ *
174
+ * @since 1.1
175
+ */
176
+ public function callback_add_users_column($columns)
177
+ {
178
+ return $this->add_managed_columns('wp-users', $columns);
179
  }
180
 
181
  /**
182
+ * Add managed columns by Type
183
  *
184
+ * @since 1.1
185
  */
186
+ private function add_managed_columns( $type = 'post', $columns )
187
  {
188
+ $db_columns = $this->get_stored_columns($type);
189
+
190
+ if ( !$db_columns )
191
+ return $columns;
192
+
193
+ // set already loaded columns by plugins
194
+ $set_columns = $this->filter_preset_columns($columns, $type);
195
+
196
+ // loop through columns
197
+ foreach ( $db_columns as $id => $values ) {
198
+
199
+ // is active
200
+ if ( isset($values['state']) && $values['state'] == 'on' ){
201
+
202
+ // register format
203
+ $set_columns[$id] = $values['label'];
204
+ }
205
+ }
206
+
207
+ return $set_columns;
208
  }
209
 
210
  /**
211
+ * Callback add Posts sortable column
212
  *
213
+ * @since 1.0
214
+ */
215
+ public function callback_add_sortable_posts_column($columns)
216
+ {
217
+ global $post_type;
218
+
219
+ return $this->add_managed_sortable_columns($post_type, $columns);
220
+ }
221
+
222
+ /**
223
+ * Callback add Users sortable column
224
  *
225
+ * @since 1.1
226
  */
227
+ public function callback_add_sortable_users_column($columns)
228
  {
229
+ return $this->add_managed_sortable_columns('wp-users', $columns);
230
+ }
231
+
232
+ /**
233
+ * Add managed sortable columns by Type
234
+ *
235
+ * @since 1.1
236
+ */
237
+ private function add_managed_sortable_columns( $type = 'post', $columns )
238
+ {
239
+ $display_columns = $this->get_merged_columns($type);
 
 
 
 
240
 
241
+ if ( ! $display_columns )
242
+ return $columns;
 
 
 
 
 
 
 
 
 
 
 
 
 
243
 
244
+ foreach ( $display_columns as $id => $vars ) {
245
+ if ( isset($vars['options']['sortorder']) && $vars['options']['sortorder'] == 'on' ){
246
+
247
+ // register format
248
+ $columns[$id] = $this->sanitize_string($vars['label']);
249
+ }
250
+ }
251
+ return $columns;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  }
253
+
254
  /**
255
  * Get a list of Column options per post type
256
  *
257
  * @since 1.0
258
  */
259
+ private function get_column_boxes($type)
260
  {
261
  // merge all columns
262
+ $display_columns = $this->get_merged_columns($type);
263
 
264
  // define
265
  $list = '';
266
 
267
  // loop throught the active columns
268
  if ( $display_columns ) {
269
+ foreach ( $display_columns as $id => $values ) {
270
 
271
  // add items to the list
272
+ $list .= $this->get_box($type, $id, $values);
273
 
274
  }
275
  }
276
 
277
  // custom field button
278
  $button_add_column = '';
279
+ if ( $this->get_postmeta_by_posttype($type) )
280
  $button_add_column = "<a href='javacript:;' class='cpac-add-customfield-column button'>+ " . __('Add Custom Field Column') . "</a>";
281
 
282
  return "
295
  *
296
  * @since 1.0
297
  */
298
+ private function get_merged_columns( $type )
299
  {
300
  //get saved database columns
301
+ $db_columns = $this->get_stored_columns($type);
 
 
 
302
 
303
+ /** Users */
304
+ if ( $type == 'wp-users' ) {
305
+ $wp_default_columns = $this->get_wp_default_users_columns();
306
+ $wp_custom_columns = $this->get_custom_users_columns();
307
+ }
308
 
309
+ /** Posts */
310
+ else {
311
+ $wp_default_columns = $this->get_wp_default_posts_columns($type);
312
+ $wp_custom_columns = $this->get_custom_posts_columns($type);
313
+ }
314
+
315
+ // merge columns
316
+ $posts_columns = wp_parse_args($wp_custom_columns, $wp_default_columns);
317
+
318
  // loop throught the active columns
319
  if ( $db_columns ) {
320
+ foreach ( $db_columns as $id => $values ) {
321
 
322
  // get column meta options from custom columns
323
+ if ( $this->is_column_meta($id) )
324
+ $db_columns[$id]['options'] = $wp_custom_columns['column-meta-1']['options'];
325
 
326
  // add static options
327
  else
328
+ $db_columns[$id]['options'] = $posts_columns[$id]['options'];
329
 
330
+ unset($posts_columns[$id]);
331
  }
332
  }
333
 
334
  // merge all
335
+ $display_columns = wp_parse_args($db_columns, $posts_columns);
336
+
337
  return $display_columns;
338
  }
339
+
 
340
  /**
341
  * Get checkbox
342
  *
343
  * @since 1.0
344
  */
345
+ private function get_box($post_type, $id, $values)
346
  {
347
  $classes = array();
348
 
349
  // set state
350
  $state = isset($values['state']) ? $values['state'] : '';
351
 
 
 
 
352
  // class
353
+ $classes[] = "cpac-box-{$id}";
354
  if ( $state )
355
  $classes[] = 'active';
356
  if ( ! empty($values['options']['class']) )
358
  $class = implode(' ', $classes);
359
 
360
  // more box options
361
+ $more_options = $this->get_additional_box_options($post_type, $id, $values);
362
  $action = "<a class='cpac-action' href='#open'>open</a>";
363
 
364
  // hide box options
372
  <div class='cpac-type-options'>
373
 
374
  <div class='cpac-checkbox'></div>
375
+ <input type='hidden' class='cpac-state' name='cpac_options[columns][{$post_type}][{$id}][state]' value='{$state}'/>
 
376
  <label class='main-label'>{$values['label']}</label>
377
  </div>
378
  <div class='cpac-meta-title'>
380
  <span>{$values['options']['type_label']}</span>
381
  </div>
382
  <div class='cpac-type-inside'>
383
+ <label for='cpac_options[columns][{$post_type}][{$id}][label]'>Label: </label>
384
+ <input type='text' name='cpac_options[columns][{$post_type}][{$id}][label]' value='{$values['label']}' class='text'/>
385
  <br/>
386
  {$more_options}
387
  </div>
396
  *
397
  * @since 1.0
398
  */
399
+ private function get_additional_box_options($post_type, $id, $values)
400
  {
401
  $fields = '';
402
 
403
  // Custom Fields
404
+ if ( $this->is_column_meta($id) )
405
+ $fields .= $this->get_box_options_customfields($post_type, $id, $values);
406
 
407
  return $fields;
408
  }
412
  *
413
  * @since 1.0
414
  */
415
+ private function get_box_options_customfields($post_type, $id, $values)
416
  {
417
  // get post meta fields
418
  $fields = $this->get_postmeta_by_posttype($post_type);
442
  'library_id' => __('Media Library Icon', $this->textdomain),
443
  'excerpt' => __('Excerpt'),
444
  'array' => __('Multiple Values', $this->textdomain),
445
+ 'numeric' => __('Numeric', $this->textdomain),
446
  );
447
 
448
+ // add filter
449
+ $fieldtypes = apply_filters('cpac-field-types', $fieldtypes );
450
+
451
+ // set select options
452
  foreach ( $fieldtypes as $fkey => $fieldtype ) {
453
  $fieldtype_options .= sprintf
454
  (
459
  );
460
  }
461
 
462
+ // before and after string
463
+ $before = ! empty($values['before']) ? $values['before'] : '' ;
464
+ $after = ! empty($values['after']) ? $values['after'] : '' ;
465
+
466
  if ( empty($field_options) )
467
  return false;
468
 
469
  // add remove button
470
  $remove = '<p class="remove-description description">'.__('This field can not be removed', $this->textdomain).'</p>';
471
+ if ( $id != 'column-meta-1') {
472
  $remove = "
473
  <p>
474
  <a href='javascript:;' class='cpac-delete-custom-field-box'>".__('Remove')."</a>
477
  }
478
 
479
  $inside = "
480
+ <label for='cpac_options[columns][{$post_type}][{$id}][field]'>Custom Field: </label>
481
+ <select name='cpac_options[columns][{$post_type}][{$id}][field]'>{$field_options}</select>
482
  <br/>
483
+ <label for='cpac_options[columns][{$post_type}][{$id}][field_type]'>Field Type: </label>
484
+ <select name='cpac_options[columns][{$post_type}][{$id}][field_type]'>{$fieldtype_options}</select>
485
  <br/>
486
+ <label for='cpac_options[columns][{$post_type}][{$id}][before]'>Before: </label>
487
+ <input type='text' class='cpac-before' name='cpac_options[columns][{$post_type}][{$id}][before]' value='{$before}'/>
488
+ <br/>
489
+ <label for='cpac_options[columns][{$post_type}][{$id}][before]'>After: </label>
490
+ <input type='text' class='cpac-after' name='cpac_options[columns][{$post_type}][{$id}][after]' value='{$after}'/>
491
+ <br/>
492
  {$remove}
493
  ";
494
 
534
  wp_enqueue_script( 'jquery-ui-sortable' );
535
  wp_enqueue_script( 'cpac-admin', $this->plugin_url('/assets/js/admin-column.js'), array('jquery', 'jquery-ui-sortable'), CPAC_VERSION );
536
  }
537
+
538
+ /**
539
+ * Get column types
540
+ *
541
+ * @since 1.1
542
+ */
543
+ private function get_types()
544
+ {
545
+ $types = $this->post_types;
546
+ $types['wp-users'] = 'wp-users';
547
+
548
+ return $types;
549
+ }
550
+
551
  /**
552
  * Get post types
553
  *
613
  }
614
 
615
  /**
616
+ * Optional callback.
617
  *
618
  * @since 1.0
619
  */
634
 
635
  // stores the default columns that are set by WP or set in the theme.
636
  $wp_default_columns = array();
637
+
638
+ // Posts
639
  foreach ( $this->post_types as $post_type ) {
640
+ $wp_default_columns[$post_type] = $this->get_wp_default_posts_columns($post_type);
641
  }
642
+
643
+ // Users
644
+ $wp_default_columns['wp-users'] = $this->get_wp_default_users_columns();
645
+
646
  update_option( 'cpac_options_default', $wp_default_columns );
647
  }
648
 
709
  *
710
  * @since 1.0
711
  */
712
+ public function manage_posts_column_value($column_name, $post_id)
713
  {
714
+ $type = $column_name;
715
 
716
  // Check for taxonomies, such as column-taxonomy-[taxname]
717
  if ( strpos($type, 'column-taxonomy-') !== false )
718
  $type = 'column-taxonomy';
719
 
720
  // Check for custom fields, such as column-meta-[customfieldname]
721
+ if ( $this->is_column_meta($type) )
722
  $type = 'column-meta';
723
 
724
  // Hook
725
+ do_action('cpac-manage-column', $type, $column_name, $post_id);
726
 
727
  // Switch Types
728
  $result = '';
776
  $result = get_post($post_id)->post_name;
777
  break;
778
 
779
+ // Slug
780
+ case "column-word-count" :
781
+ $result = str_word_count( strip_tags( get_post($post_id)->post_content ) );
782
+ break;
783
+
784
  // Taxonomy
785
  case "column-taxonomy" :
786
+ $tax = str_replace('column-taxonomy-', '', $column_name);
787
  $tags = get_the_terms($post_id, $tax);
788
  $tarr = array();
789
  if ( $tax == 'post_format' && empty($tags) ) {
799
 
800
  // Custom Field
801
  case "column-meta" :
802
+ $result = $this->get_column_value_custom_field($post_id, $column_name);
803
  break;
804
 
805
  // Attachment
808
  break;
809
 
810
  default :
811
+ $result = get_post_meta( $post_id, $column_name, true );
812
 
813
  endswitch;
814
 
817
 
818
  echo $result;
819
  }
820
+
821
+ /**
822
+ * Manage custom column for Users.
823
+ *
824
+ * @since 1.1
825
+ */
826
+ public function manage_users_column_value( $val, $column_name, $user_id )
827
+ {
828
+ $type = $column_name;
829
+
830
+ $userdata = get_userdata( $user_id );
831
+
832
+ if ( ! $userdata )
833
+ return false;
834
+
835
+ $result = '';
836
+ switch ($type) :
837
+
838
+ // user id
839
+ case "column-user_id" :
840
+ $result = $user_id;
841
+ break;
842
+
843
+ // first name
844
+ case "column-first_name" :
845
+ $result = $userdata->first_name;
846
+ break;
847
+
848
+ // last name
849
+ case "column-last_name" :
850
+ $result = $userdata->last_name;
851
+ break;
852
+
853
+ // user url
854
+ case "column-user_url" :
855
+ $result = $userdata->user_url;
856
+ break;
857
+
858
+ // user url
859
+ case "column-user_registered" :
860
+ $result = $userdata->user_registered;
861
+ break;
862
+
863
+ default :
864
+ $result = get_user_meta( $user_id, $column_name, true );
865
+
866
+ endswitch;
867
+
868
+ if ( empty($result) )
869
+ $result = '&nbsp;';
870
+
871
+ return $result;
872
+ }
873
 
874
  /**
875
  * Get column value of post attachments
876
  *
877
  * @since 1.0
878
  */
879
+ private function get_column_value_attachments( $post_id )
880
  {
881
  $result = '';
882
  $attachments = get_posts(array(
898
  *
899
  * @since 1.0
900
  */
901
+ private function get_column_value_custom_field($post_id, $id)
902
  {
903
+ $columns = $this->get_stored_columns( get_post_type($post_id) );
904
+
905
+ // inputs
906
+ $field = isset($columns[$id]['field']) ? $columns[$id]['field'] : '';
907
+ $fieldtype = isset($columns[$id]['field_type']) ? $columns[$id]['field_type'] : '';
908
+ $before = isset($columns[$id]['before']) ? $columns[$id]['before'] : '';
909
+ $after = isset($columns[$id]['after']) ? $columns[$id]['after'] : '';
910
 
911
  // Get meta field value
912
  $meta = get_post_meta($post_id, $field, true);
942
 
943
  endswitch;
944
 
945
+ // add before and after string
946
+ $meta = "{$before}{$meta}{$after}";
947
+
948
  return $meta;
949
  }
950
 
963
  $retVal[] = $r_pieces;
964
  }
965
  }
966
+ if ( isset($retVal) && is_array($retVal) )
967
+ return implode( $glue, $retVal );
 
 
 
 
 
 
 
 
 
968
 
969
+ return false;
970
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
971
 
972
  /**
973
  * Set columns. These columns apply either for every post or set by a plugin.
974
  *
975
  * @since 1.0
976
  */
977
+ private function filter_preset_columns($columns, $type = 'post')
978
  {
979
  $options = $this->options_default;
980
 
982
  return $columns;
983
 
984
  // we use the wp default columns for filtering...
985
+ $db_columns = $options[$type];
986
 
987
  // ... the ones that are set by plugins, theme functions and such.
988
  $dif_columns = array_diff(array_keys($columns), array_keys($db_columns));
996
  }
997
 
998
  return $pre_columns;
999
+ }
1000
 
1001
  /**
1002
+ * Get WP default supported admin columns per post type.
1003
  *
1004
  * @since 1.0
1005
  */
1006
+ private function get_wp_default_posts_columns($post_type = 'post')
1007
  {
1008
+ // load some dependencies
1009
+ if ( file_exists(ABSPATH . 'wp-admin/includes/template.php') )
1010
+ require_once(ABSPATH . 'wp-admin/includes/template.php');
1011
+ if ( file_exists(ABSPATH . 'wp-admin/includes/screen.php') )
1012
+ require_once(ABSPATH . 'wp-admin/includes/screen.php');
1013
+ if ( file_exists(ABSPATH . 'wp-admin/includes/class-wp-list-table.php') )
1014
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
1015
+ if ( file_exists(ABSPATH . 'wp-admin/includes/class-wp-posts-list-table.php') )
1016
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-posts-list-table.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1017
 
1018
  // we need to change the current screen
1019
  global $current_screen;
1025
  // ...so we can get its columns
1026
  $columns = WP_Posts_List_Table::get_columns();
1027
 
1028
+ if ( empty ( $columns ) )
1029
+ return false;
1030
+
1031
+ // change to uniform format
1032
+ $posts_columns = $this->get_uniform_format($columns);
1033
+
1034
+ // reset current screen
1035
+ $current_screen = $org_current_screen;
1036
+
1037
+ return $posts_columns;
1038
+ }
1039
+
1040
+ /**
1041
+ * Get WP default users columns per post type.
1042
+ *
1043
+ * @since 1.0
1044
+ */
1045
+ private function get_wp_default_users_columns()
1046
+ {
1047
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
1048
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-users-list-table.php');
1049
+
1050
+ // turn off site users
1051
+ $this->is_site_users = false;
1052
+
1053
+ // get users columns
1054
+ $columns = WP_Users_List_Table::get_columns();
1055
+
1056
+ // change to uniform format
1057
+ $users_columns = $this->get_uniform_format($columns);
1058
+
1059
+ return $users_columns;
1060
+ }
1061
+
1062
+ /**
1063
+ * Build uniform format for all columns
1064
+ *
1065
+ * @since 1.0
1066
+ */
1067
+ private function get_uniform_format($columns)
1068
+ {
1069
  // we remove the checkbox column as an option...
1070
  unset($columns['cb']);
1071
 
1072
  // change to uniform format
1073
  $uniform_columns = array();
1074
+ foreach ( (array) $columns as $id => $label ) {
1075
  $hide_options = false;
1076
  $type_label = $label;
1077
 
1080
  $type_label = __('Comments', $this->textdomain);
1081
  $hide_options = true;
1082
  }
1083
+
1084
+ $uniform_colums[$id] = array(
1085
  'label' => $label,
1086
  'state' => 'on',
1087
  'options' => array(
1091
  )
1092
  );
1093
  }
 
 
 
 
1094
  return $uniform_colums;
1095
  }
1096
+
1097
  /**
1098
+ * Custom posts columns
1099
  *
1100
  * @since 1.0
1101
  */
1102
+ private function get_custom_posts_columns($post_type)
1103
  {
1104
  $custom_columns = array();
1105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1106
  // Thumbnail support
1107
  if ( post_type_supports($post_type, 'thumbnail') ) {
1108
+ $custom_columns['column-featured_image'] = array(
1109
  'label' => __('Featured Image', $this->textdomain),
1110
  'options' => array(
1111
  'type_label' => __('Image', $this->textdomain)
1112
  )
1113
+ );
1114
  }
1115
 
1116
  // Excerpt support
1117
  if ( post_type_supports($post_type, 'editor') ) {
1118
+ $custom_columns['column-excerpt'] = array(
1119
  'label' => __('Excerpt', $this->textdomain),
1120
  'options' => array(
1121
  'type_label' => __('Excerpt', $this->textdomain)
1122
  )
1123
+ );
1124
  }
1125
 
1126
  // Sticky support
1127
  if ( $post_type == 'post' ) {
1128
+ $custom_columns['column-sticky'] = array(
1129
  'label' => __('Sticky', $this->textdomain),
1130
  'options' => array(
1131
  'type_label' => __('Sticky', $this->textdomain)
1132
  )
1133
+ );
1134
  }
1135
 
1136
  // Order support
1137
  if ( post_type_supports($post_type, 'page-attributes') ) {
1138
+ $custom_columns['column-order'] = array(
1139
+ 'label' => __('Page Order', $this->textdomain),
 
1140
  'options' => array(
1141
+ 'type_label' => __('Order', $this->textdomain),
1142
+ 'sortorder' => 'on',
1143
  )
1144
+ );
1145
  }
1146
 
1147
  // Page Template
1148
  if ( $post_type == 'page' ) {
1149
+ $custom_columns['column-page-template'] = array(
1150
  'label' => __('Page Template', $this->textdomain),
 
1151
  'options' => array(
1152
+ 'type_label' => __('Page Template', $this->textdomain),
1153
+ 'sortorder' => 'on',
1154
  )
1155
+ );
1156
  }
1157
 
1158
  // Post Formats
1159
  if ( post_type_supports($post_type, 'post-formats') ) {
1160
+ $custom_columns['column-post_formats'] = array(
1161
  'label' => __('Post Format', $this->textdomain),
1162
  'options' => array(
1163
  'type_label' => __('Post Format', $this->textdomain)
1164
  )
1165
+ );
1166
  }
1167
 
1168
  // Taxonomy support
1170
  if ( $taxonomies ) {
1171
  foreach ( $taxonomies as $tax_slug => $tax ) {
1172
  if ( $tax_slug != 'post_tag' && $tax_slug != 'category' && $tax_slug != 'post_format' ) {
1173
+ $custom_columns['column-taxonomy-'.$tax->name] = array(
1174
  'label' => $tax->label,
1175
  'options' => array(
1176
  'type_label' => __('Taxonomy', $this->textdomain)
1177
  )
1178
+ );
1179
  }
1180
  }
1181
  }
1182
 
1183
  // Post ID support
1184
+ $custom_columns['column-postid'] = array(
1185
+ 'label' => 'ID',
 
1186
  'options' => array(
1187
  'type_label' => 'ID',
1188
+ 'sortorder' => 'on',
1189
  )
1190
+ );
1191
 
1192
  // Slug support
1193
+ $custom_columns['column-page-slug'] = array(
1194
  'label' => __('Slug', $this->textdomain),
 
1195
  'options' => array(
1196
  'type_label' => __('Slug', $this->textdomain),
1197
+ 'sortorder' => 'on',
1198
+ )
1199
+ );
1200
+
1201
+ // Word count support
1202
+ $custom_columns['column-word-count'] = array(
1203
+ 'label' => __('Word count', $this->textdomain),
1204
+ 'options' => array(
1205
+ 'type_label' => __('Word count', $this->textdomain),
1206
  )
1207
+ );
1208
 
1209
  // Attachment support
1210
+ $custom_columns['column-attachment'] = array(
1211
  'label' => __('Attachment', $this->textdomain),
 
1212
  'options' => array(
1213
+ 'type_label' => __('Attachment', $this->textdomain),
1214
+ 'sortorder' => 'on',
1215
  )
1216
+ );
1217
 
1218
  // Custom Field support
1219
  if ( $this->get_postmeta_by_posttype($post_type) ) {
1220
+ $custom_columns['column-meta-1'] = array(
1221
  'label' => __('Custom Field', $this->textdomain),
1222
  'field' => '',
1223
  'field_type' => '',
1224
+ 'before' => '',
1225
+ 'after' => '',
1226
  'options' => array(
1227
  'type_label' => __('Field', $this->textdomain),
1228
+ 'class' => 'cpac-box-metafield',
1229
+ 'sortorder' => 'on',
1230
  )
1231
+ );
1232
  }
1233
 
1234
+ // merge with defaults
1235
+ $custom_columns = $this->parse_defaults($custom_columns);
1236
+
1237
+ return apply_filters('cpac-custom-posts-columns', $custom_columns);
1238
+ }
1239
+
1240
+ /**
1241
+ * Custom users columns
1242
+ *
1243
+ * @since 1.1
1244
+ */
1245
+ private function get_custom_users_columns()
1246
+ {
1247
+ $custom_columns = array();
1248
+
1249
+ // User ID
1250
+ $custom_columns['column-user_id'] = array(
1251
+ 'label' => __('User ID', $this->textdomain),
1252
+ 'options' => array(
1253
+ 'type_label' => __('User ID', $this->textdomain),
1254
+ 'sortorder' => 'on'
1255
+ )
1256
+ );
1257
+
1258
+ // First name
1259
+ $custom_columns['column-first_name'] = array(
1260
+ 'label' => __('First name', $this->textdomain),
1261
+ 'options' => array(
1262
+ 'type_label' => __('First name', $this->textdomain),
1263
+ )
1264
+ );
1265
+
1266
+ // Last name
1267
+ $custom_columns['column-last_name'] = array(
1268
+ 'label' => __('Last name', $this->textdomain),
1269
+ 'options' => array(
1270
+ 'type_label' => __('Last name', $this->textdomain),
1271
+ )
1272
+ );
1273
+
1274
+ // User url
1275
+ $custom_columns['column-user_url'] = array(
1276
+ 'label' => __('Url', $this->textdomain),
1277
+ 'options' => array(
1278
+ 'type_label' => __('Url', $this->textdomain),
1279
+ )
1280
+ );
1281
+
1282
+ // User url
1283
+ $custom_columns['column-user_registered'] = array(
1284
+ 'label' => __('Registered', $this->textdomain),
1285
+ 'options' => array(
1286
+ 'type_label' => __('Registered', $this->textdomain),
1287
+ )
1288
+ );
1289
+
1290
+ // merge with defaults
1291
+ $custom_columns = $this->parse_defaults($custom_columns);
1292
+
1293
+ return apply_filters('cpac-custom-users-columns', $custom_columns);
1294
+ }
1295
+
1296
+ /**
1297
+ * Parse defaults
1298
+ *
1299
+ * @since 1.1
1300
+ */
1301
+ private function parse_defaults($columns)
1302
+ {
1303
+ // default arguments
1304
+ $defaults = array(
1305
+
1306
+ // stored values
1307
+ 'label' => '',
1308
+ 'state' => '',
1309
+
1310
+ // static values
1311
+ 'options' => array(
1312
+ 'type_label' => __('Custom', $this->textdomain),
1313
+ 'hide_options' => false,
1314
+ 'class' => 'cpac-box-custom',
1315
+ 'sortorder' => '',
1316
+ )
1317
+ );
1318
+
1319
+ foreach ( $columns as $k => $column ) {
1320
+ $c[$k] = wp_parse_args( $column, $defaults);
1321
+ }
1322
+
1323
+ return $c;
1324
  }
1325
 
1326
  /**
1328
  *
1329
  * @since 1.0
1330
  */
1331
+ private function get_stored_columns($type)
1332
  {
1333
  // get plugin options
1334
  $options = $this->options;
1335
 
1336
  // get saved columns
1337
+ if ( isset($options['columns'][$type]) )
1338
+ return $options['columns'][$type];
1339
 
1340
  return false;
1341
  }
1345
  *
1346
  * @since 1.0
1347
  */
1348
+ private function get_menu()
1349
  {
1350
  // set
1351
  $menu = '';
1357
  $referer = $_REQUEST['cpac_type'];
1358
 
1359
  // loop
1360
+ foreach ( $this->get_types() as $type ) {
1361
+ $label = $this->get_singular_name($type);
1362
+ $clean_label = $this->sanitize_string($type);
1363
 
1364
  // divider
1365
  $divider = $count++ == 1 ? '' : ' | ';
1366
 
1367
  // current
1368
  $current = '';
1369
+ if ( $this->is_menu_type_current($type) )
1370
  $current = ' class="current"';
1371
 
1372
  // menu list
1390
  * @since 1.0
1391
  */
1392
  private function is_menu_type_current( $post_type )
1393
+ {
 
 
1394
  // referer
1395
  $referer = '';
1396
  if ( ! empty($_REQUEST['cpac_type']) )
1422
  *
1423
  * @since 1.0
1424
  */
1425
+ private function get_singular_name( $type )
1426
  {
1427
+ // Users
1428
+ if ( $type == 'wp-users' )
1429
+ $label = 'Users';
1430
+
1431
+ // Posts
1432
+ else {
1433
+ $posttype_obj = get_post_type_object($type);
1434
+ $label = $posttype_obj->labels->singular_name;
1435
+ }
1436
+
1437
  return $label;
1438
  }
1439
 
1444
  */
1445
  public function handle_requests_orderby_column( $vars )
1446
  {
1447
+ if ( isset( $vars['orderby'] ) ) {
1448
+ $column = $this->get_orderby_type( $vars['orderby'], $vars['post_type'] );
 
1449
 
1450
+ if ( $column ) {
1451
+ $id = key($column);
 
 
 
1452
 
1453
+ // Page Order
1454
+ if ( $id == 'column-order' ) {
1455
  $vars['orderby'] = 'menu_order';
1456
  }
1457
+
1458
+ // Custom Fields
1459
+ if ( $this->is_column_meta($id) ) {
1460
+ $field = $column[$id]['field'];
1461
+
1462
+ // orderby type
1463
+ $field_type = 'meta_value';
1464
+ if ( $column[$id]['field_type'] == 'numeric' || $column[$id]['field_type'] == 'library_id' )
1465
+ $field_type = 'meta_value_num';
1466
+
1467
+ // set vars
1468
+ $vars = array_merge( $vars, array(
1469
+ 'meta_key' => $field,
1470
+ 'orderby' => $field_type
1471
+ ) );
1472
+ }
1473
  }
1474
  }
1475
  return $vars;
1476
  }
1477
 
1478
+ /**
1479
+ * Get orderby type
1480
+ *
1481
+ * @since 1.1
1482
+ */
1483
+ private function get_orderby_type($orderby, $post_type)
1484
+ {
1485
+ $db_columns = $this->get_stored_columns($post_type);
1486
+
1487
+ if ( $db_columns ) {
1488
+ foreach ( $db_columns as $id => $vars ) {
1489
+
1490
+ // check which custom column was clicked
1491
+ if ( isset( $vars['label'] ) && $orderby == $this->sanitize_string( $vars['label'] ) ) {
1492
+ $column[$id] = $vars;
1493
+ return $column;
1494
+ }
1495
+ }
1496
+ }
1497
+ return false;
1498
+ }
1499
+
1500
  /**
1501
  * Sanitize label
1502
  *
1511
  }
1512
 
1513
  /**
1514
+ * Get plugin url.
1515
  *
1516
  * @since 1.0
1517
  */
1520
  return plugins_url($file, __FILE__);
1521
  }
1522
 
1523
+ /**
1524
+ * Checks if column-meta key exists
1525
+ *
1526
+ * @since 1.0
1527
+ */
1528
+ private function is_column_meta( $id = '' )
1529
+ {
1530
+ if ( strpos($id, 'column-meta-') !== false )
1531
+ return true;
1532
+
1533
+ return false;
1534
+ }
1535
+
1536
  /**
1537
  * Get a thumbnail
1538
  *
1550
  $image = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $new);
1551
 
1552
  return "<img src='{$image}' alt='' width='120' height='80' />";
1553
+ }
1554
+
1555
+ /**
1556
+ * Settings Page Template.
1557
+ *
1558
+ * This function in conjunction with others usei the WordPress
1559
+ * Settings API to create a settings page where users can adjust
1560
+ * the behaviour of this plugin.
1561
+ *
1562
+ * @since 1.0
1563
+ */
1564
+ public function plugin_settings_page()
1565
+ {
1566
+ // loop through post types
1567
+ $rows = '';
1568
+ foreach ( $this->get_types() as $type ) {
1569
+
1570
+ // post type label
1571
+ $label = $this->get_singular_name($type);
1572
+
1573
+ // id
1574
+ $id = $this->sanitize_string($type);
1575
+
1576
+ // build draggable boxes
1577
+ $boxes = $this->get_column_boxes($type);
1578
+
1579
+ // class
1580
+ $class = $this->is_menu_type_current($type) ? ' current' : ' hidden';
1581
+
1582
+ $rows .= "
1583
+ <tr id='cpac-box-{$id}' valign='top' class='cpac-box-row{$class}'>
1584
+ <th class='cpac_post_type' scope='row'>
1585
+ {$label}
1586
+ </th>
1587
+ <td>
1588
+ <h3 class='cpac_post_type hidden'>{$label}</h3>
1589
+ {$boxes}
1590
+ </td>
1591
+ </tr>
1592
+ ";
1593
+ }
1594
+
1595
+ // Post Type Menu
1596
+ $menu = $this->get_menu();
1597
+
1598
+ ?>
1599
+ <div id="cpac" class="wrap">
1600
+ <?php screen_icon($this->slug) ?>
1601
+ <h2><?php _e('Codepress Admin Columns', $this->textdomain); ?></h2>
1602
+ <?php echo $menu ?>
1603
+ <div class="postbox-container" style="width:70%;">
1604
+ <div class="metabox-holder">
1605
+ <div class="meta-box-sortables">
1606
+
1607
+ <div id="general-cpac-settings" class="postbox">
1608
+ <div title="Click to toggle" class="handlediv"><br></div>
1609
+ <h3 class="hndle">
1610
+ <span><?php _e('Admin Columns', $this->textdomain ); ?></span>
1611
+ </h3>
1612
+ <div class="inside">
1613
+ <form method="post" action="options.php">
1614
+
1615
+ <?php settings_fields( 'cpac-settings-group' ); ?>
1616
+
1617
+ <table class="form-table">
1618
+
1619
+ <?php echo $rows ?>
1620
+
1621
+ <tr class="bottom" valign="top">
1622
+ <th scope="row"></th>
1623
+ <td>
1624
+ <p class="submit">
1625
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
1626
+ </p>
1627
+ </td>
1628
+ </tr>
1629
+ </table>
1630
+ </form>
1631
+ </div>
1632
+ </div><!-- general-settings -->
1633
+
1634
+ <div id="restore-cpac-settings" class="postbox">
1635
+ <div title="Click to toggle" class="handlediv"><br></div>
1636
+ <h3 class="hndle">
1637
+ <span><?php _e('Restore defaults', $this->textdomain) ?></span>
1638
+ </h3>
1639
+ <div class="inside">
1640
+ <form method="post" action="">
1641
+ <input type="submit" class="button" name="cpac-restore-defaults" value="<?php _e('Restore default settings', $this->textdomain ) ?>" onclick="return confirm('<?php _e("Warning! ALL saved admin columns data will be deleted. This cannot be undone. \'OK\' to delete, \'Cancel\' to stop", $this->textdomain); ?>');" />
1642
+ </form>
1643
+ <p class="description"><?php _e('This will delete all column settings and restore the default settings.', $this->textdomain); ?></p>
1644
+ </div>
1645
+ </div><!-- restore-cpac-settings -->
1646
+
1647
+ </div>
1648
+ </div>
1649
+ </div><!-- .postbox-container -->
1650
+
1651
+ <div class="postbox-container" style="width:20%;">
1652
+ <div class="metabox-holder">
1653
+ <div class="meta-box-sortables">
1654
+
1655
+ <div id="likethisplugin-cpac-settings" class="postbox">
1656
+ <div title="Click to toggle" class="handlediv"><br></div>
1657
+ <h3 class="hndle">
1658
+ <span><?php _e('Like this plugin?', $this->textdomain) ?></span>
1659
+ </h3>
1660
+ <div class="inside">
1661
+ <p><?php _e('Why not do any or all of the following', $this->textdomain) ?>:</p>
1662
+ <ul>
1663
+ <li><a href="http://www.codepress.nl/plugins/codepress-admin-columns/"><?php _e('Link to it so other folks can find out about it.', $this->textdomain) ?></a></li>
1664
+ <li><a href="http://wordpress.org/extend/plugins/codepress-admin-columns/"><?php _e('Give it a 5 star rating on WordPress.org.', $this->textdomain) ?></a></li>
1665
+ <li class="donate_link"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J"><?php _e('Donate a token of your appreciation.', $this->textdomain) ?></a></li>
1666
+ </ul>
1667
+ </div>
1668
+ </div><!-- likethisplugin-cpac-settings -->
1669
+
1670
+ <div id="side-cpac-settings" class="postbox">
1671
+ <div title="Click to toggle" class="handlediv"><br></div>
1672
+ <h3 class="hndle">
1673
+ <span><?php _e('Need support?', $this->textdomain) ?></span>
1674
+ </h3>
1675
+ <div class="inside">
1676
+ <p><?php printf(__('If you are having problems with this plugin, please talk about them in the <a href="%s">Support forums</a> or send me an email %s.', $this->textdomain), 'http://wordpress.org/tags/codepress-admin-columns', '<a href="mailto:info@codepress.nl">info@codepress.nl</a>' );?></p>
1677
+ <p><?php printf(__("If you're sure you've found a bug, or have a feature request, please <a href='%s'>submit your feedback</a>.", $this->textdomain), 'http://www.codepress.nl/plugins/codepress-admin-columns#feedback');?></p>
1678
+ </div>
1679
+ </div><!-- side-cpac-settings -->
1680
+
1681
+ </div>
1682
+ </div>
1683
+ </div><!-- .postbox-container -->
1684
+
1685
+ </div>
1686
+ <?php
1687
+ }
1688
  }
1689
  ?>
languages/codepress-admin-columns-nl_NL.mo CHANGED
Binary file
languages/codepress-admin-columns-nl_NL.po CHANGED
@@ -2,9 +2,9 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Codepress Admin Columns\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-11-26 23:47+0100\n"
6
- "PO-Revision-Date: 2011-11-26 23:47+0100\n"
7
- "Last-Translator: Tobias <tschutter@gmail.com>\n"
8
  "Language-Team: Codepress <info@codepress.nl>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -17,292 +17,225 @@ msgstr ""
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPath-1: ..\n"
19
 
20
- #: ../codepress-admin-columns.php:132
 
21
  msgid "Settings"
22
  msgstr "Instellingen"
23
 
24
- #: ../codepress-admin-columns.php:225
25
- msgid "Codepress Admin Columns"
26
- msgstr ""
27
-
28
- #: ../codepress-admin-columns.php:234
29
- msgid "Admin Columns"
30
- msgstr ""
31
-
32
- #: ../codepress-admin-columns.php:249
33
- msgid "Save Changes"
34
- msgstr "Wijzigingen opslaan"
35
-
36
- #: ../codepress-admin-columns.php:261
37
- msgid "Restore defaults"
38
- msgstr "Herstel instellingen"
39
-
40
- #: ../codepress-admin-columns.php:265
41
- msgid "Restore default settings"
42
- msgstr "Herstel standaard instellingen"
43
-
44
- #: ../codepress-admin-columns.php:265
45
- msgid "Warning! ALL saved admin columns data will be deleted. This cannot be undone. \\'OK\\' to delete, \\'Cancel\\' to stop"
46
- msgstr "Waarschuwing! ALLE bewaarde instellingen worden verwijderd. Dit kan niet worden ongedaan. \\'OK\\' om te verwijderen, \\'Annuleren\\' om te stoppen"
47
-
48
- #: ../codepress-admin-columns.php:267
49
- msgid "This will delete all column settings and restore the default settings."
50
- msgstr "Hiermee worden alle kolommen instellingen verwijderd en de standaardinstellingen hersteld."
51
-
52
- #: ../codepress-admin-columns.php:282
53
- msgid "Need support?"
54
- msgstr "Hulp nodig?"
55
-
56
- #: ../codepress-admin-columns.php:285
57
- #, php-format
58
- msgid "If you are having problems with this plugin, please talk about them in the <a href=\"%s\">Support forums</a>."
59
- msgstr "Als je problem hebt met deze plugin, stel je vragen dan in de <a href=\"%s\">Support forums</a>."
60
-
61
- #: ../codepress-admin-columns.php:286
62
- #, php-format
63
- msgid "If you're sure you've found a bug, or have a feature request, please <a href='%s'>submit your feedback</a>."
64
- msgstr "Als een bug bent tegen gekomen, of een feature wil aanvragen, stuur ons dan <a href='%s'>je feedback</a>."
65
-
66
- #: ../codepress-admin-columns.php:324
67
  msgid "Add Custom Field Column"
68
  msgstr "Voeg custom field kolom toe"
69
 
70
- #: ../codepress-admin-columns.php:483
 
71
  msgid "Default"
72
  msgstr ""
73
 
74
- #: ../codepress-admin-columns.php:484
75
- #: ../codepress-admin-columns.php:1079
 
 
76
  msgid "Image"
77
  msgstr "Afbeelding"
78
 
79
- #: ../codepress-admin-columns.php:485
 
80
  msgid "Media Library Icon"
81
  msgstr "Media bibliotheek Icoon"
82
 
83
- #: ../codepress-admin-columns.php:486
84
- #: ../codepress-admin-columns.php:1087
85
- #: ../codepress-admin-columns.php:1089
 
 
 
86
  msgid "Excerpt"
87
  msgstr "Samenvatting"
88
 
89
- #: ../codepress-admin-columns.php:487
 
90
  msgid "Multiple Values"
91
  msgstr "Meerdere waarden"
92
 
93
- #: ../codepress-admin-columns.php:506
 
 
 
 
 
 
94
  msgid "This field can not be removed"
95
  msgstr "Dit veld kan niet worden verwijderd"
96
 
97
- #: ../codepress-admin-columns.php:510
 
98
  msgid "Remove"
99
  msgstr "Verwijder"
100
 
101
- #: ../codepress-admin-columns.php:796
 
102
  msgid "Standard"
103
  msgstr "Standaard"
104
 
105
- #: ../codepress-admin-columns.php:1030
 
106
  msgid "Comments"
107
  msgstr "Reacties"
108
 
109
- #: ../codepress-admin-columns.php:1068
110
- msgid "Custom"
111
- msgstr ""
112
-
113
- #: ../codepress-admin-columns.php:1077
114
  msgid "Featured Image"
115
  msgstr "Uitgelichte afbeelding"
116
 
117
- #: ../codepress-admin-columns.php:1097
118
- #: ../codepress-admin-columns.php:1099
 
 
119
  msgid "Sticky"
120
  msgstr "Sticky"
121
 
122
- #: ../codepress-admin-columns.php:1107
 
123
  msgid "Page Order"
124
  msgstr "Pagina Volgorde"
125
 
126
- #: ../codepress-admin-columns.php:1110
 
127
  msgid "Order"
128
  msgstr "Volgorde"
129
 
130
- #: ../codepress-admin-columns.php:1118
131
- #: ../codepress-admin-columns.php:1121
 
 
132
  msgid "Page Template"
133
  msgstr "Pagina Template"
134
 
135
- #: ../codepress-admin-columns.php:1129
136
- #: ../codepress-admin-columns.php:1131
 
 
137
  msgid "Post Format"
138
  msgstr ""
139
 
140
- #: ../codepress-admin-columns.php:1144
 
141
  msgid "Taxonomy"
142
  msgstr ""
143
 
144
- #: ../codepress-admin-columns.php:1162
145
- #: ../codepress-admin-columns.php:1165
 
 
146
  msgid "Slug"
147
  msgstr ""
148
 
149
- #: ../codepress-admin-columns.php:1171
150
- #: ../codepress-admin-columns.php:1174
 
 
 
 
 
 
 
151
  msgid "Attachment"
152
  msgstr ""
153
 
154
- #: ../codepress-admin-columns.php:1181
 
155
  msgid "Custom Field"
156
  msgstr ""
157
 
158
- #: ../codepress-admin-columns.php:1185
 
159
  msgid "Field"
160
  msgstr "Veld"
161
 
162
- #~ msgid "Title"
163
- #~ msgstr "Titel"
164
-
165
- #~ msgid "Description"
166
- #~ msgstr "Beschrijving"
167
-
168
- #~ msgid "Latitude"
169
- #~ msgstr "Breedtegraad"
170
-
171
- #~ msgid "Longitude"
172
- #~ msgstr "Lengtegraad"
173
-
174
- #~ msgid "Width"
175
- #~ msgstr "Breedte"
176
-
177
- #~ msgid "Height"
178
- #~ msgstr "Hoogte"
179
-
180
- #~ msgid "Dynamic"
181
- #~ msgstr "Dynamisch"
182
-
183
- #~ msgid "Geocoder - Pronamic Google Maps"
184
- #~ msgstr "Geocoder - Pronamic Google Maps"
185
-
186
- #~ msgid "Number posts to geocode: %s"
187
- #~ msgstr "Aantel berichten te geocoderen: %s"
188
-
189
- #~ msgid "ID"
190
- #~ msgstr "ID"
191
-
192
- #~ msgid "Address"
193
- #~ msgstr "Adres"
194
-
195
- #~ msgid "Status"
196
- #~ msgstr "Status"
197
-
198
- #~ msgid "Location"
199
- #~ msgstr "Locatie"
200
-
201
- #~ msgid "Geocode"
202
- #~ msgstr "Geocodeer"
203
-
204
- #~ msgid "Zero results"
205
- #~ msgstr "Geen resultaten"
206
-
207
- #~ msgid ""
208
- #~ "We found no geocoding results for the following %s posts, adjust them "
209
- #~ "manually if needed."
210
- #~ msgstr ""
211
- #~ "We konden geen gecode resultaten vinden voor de volgende%s berichten, pas "
212
- #~ "deze handmatig aan wanneer nodig."
213
-
214
- #~ msgid "Configuration - Pronamic Google Maps"
215
- #~ msgstr "Configuratie - Pronamic Google Maps"
216
-
217
- #~ msgid "Active"
218
- #~ msgstr "Actief"
219
-
220
- #~ msgid "Activate Google Maps"
221
- #~ msgstr "Activeer Google Maps"
222
-
223
- #~ msgid "Show Google Maps"
224
- #~ msgstr "Google Maps weergeven"
225
-
226
- #~ msgid "Geocoder"
227
- #~ msgstr "Geocoder"
228
-
229
- #~ msgid "Geocode &darr;"
230
- #~ msgstr "Geocoderen &darr;"
231
-
232
- #~ msgid "Reverse Geocode &uarr;"
233
- #~ msgstr "Omgekeerd geocoderen &uarr;"
234
-
235
- #~ msgid "Tip: Change the zoom level and map type to your own wishes."
236
- #~ msgstr "Tip: wijzig het zoomniveau en map type naar je eigen wens."
237
-
238
- #~ msgid "Delete plugin"
239
- #~ msgstr "Verwijder plugin"
240
-
241
- #~ msgid "Warning! This will delete all Pronamic Google Maps data and options."
242
- #~ msgstr ""
243
- #~ "Waarschuwing! Dit zal alle Pronamic Google Maps data en opties "
244
- #~ "verwijderen."
245
-
246
- #~ msgid "Uninstall"
247
- #~ msgstr "Verwijderen"
248
-
249
- #~ msgid "Google Maps"
250
- #~ msgstr "Google Maps"
251
-
252
- #~ msgid "General"
253
- #~ msgstr "Algemeen"
254
 
255
- #~ msgid "Use this widget to add an Google Maps as a widget."
256
- #~ msgstr "Gebruik deze widget om Google Maps toe te voegen."
 
 
257
 
258
- #~ msgid "pixels"
259
- #~ msgstr "pixels"
 
 
260
 
261
- #~ msgid "percent"
262
- #~ msgstr "procent"
 
 
263
 
264
- #~ msgid "Search"
265
- #~ msgstr "Zoeken"
 
 
266
 
267
- #~ msgid "Click to toggle"
268
- #~ msgstr "Klik om te wisselen"
 
 
269
 
270
- #~ msgid "Donate $10, $20 or $50!"
271
- #~ msgstr "Doneer $10, $20 of $50!"
 
 
272
 
273
- #~ msgid ""
274
- #~ "This plugin has cost us countless hours of work, if you use it, please "
275
- #~ "donate a token of your appreciation!"
276
- #~ msgstr ""
277
- #~ "Het ons veel uren werken gekost om deze plugin te ontwikkelen, als je het "
278
- #~ "gebruikt, doneer a.u.b. voor je waardering!"
279
 
280
- #~ msgid "Latest news from Pronamic"
281
- #~ msgstr "Laatste nieuws van Pronamic"
 
 
282
 
283
- #~ msgid "no news items, feed might be broken..."
284
- #~ msgstr "geen nieuws items, feed is waarschijnlijk niet bereikbaar..."
 
 
285
 
286
- #~ msgid "Subscribe with RSS"
287
- #~ msgstr "Aanmelden voor RSS"
 
 
288
 
289
- #~ msgid "Subscribe by e-mail"
290
- #~ msgstr "Aanmelden via e-mail"
 
 
291
 
292
- #~ msgid "Why not do any or all of the following:"
293
- #~ msgstr "Waarom doe je niet één van de volgende dingen:"
 
 
294
 
295
- #~ msgid "Link to it so other folks can find out about it."
296
- #~ msgstr "Link naar ons zodat anderen deze plugin ook ontdekken."
 
 
297
 
298
- #~ msgid "Give it a good rating on WordPress.org."
299
- #~ msgstr "Geef het een goede score op WordPress.org."
 
 
300
 
301
- #~ msgid "Let other people know that it works with your WordPress setup."
302
- #~ msgstr "Laat anderen weten dat het werk op je WordPress installatie."
 
 
 
303
 
304
- #~ msgid "Found a bug?"
305
- #~ msgstr "Bug gevonden?"
 
 
306
 
307
- #~ msgid "Configuration"
308
- #~ msgstr "Configuratie"
2
  msgstr ""
3
  "Project-Id-Version: Codepress Admin Columns\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-11-29 15:16+0100\n"
6
+ "PO-Revision-Date: 2012-04-20 21:11+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"
17
  "X-Poedit-SearchPath-0: .\n"
18
  "X-Poedit-SearchPath-1: ..\n"
19
 
20
+ #: ../codepress-admin-columns.php:133
21
+ #: ../_codepress-admin-columns.php:132
22
  msgid "Settings"
23
  msgstr "Instellingen"
24
 
25
+ #: ../codepress-admin-columns.php:280
26
+ #: ../_codepress-admin-columns.php:325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  msgid "Add Custom Field Column"
28
  msgstr "Voeg custom field kolom toe"
29
 
30
+ #: ../codepress-admin-columns.php:440
31
+ #: ../_codepress-admin-columns.php:480
32
  msgid "Default"
33
  msgstr ""
34
 
35
+ #: ../codepress-admin-columns.php:441
36
+ #: ../codepress-admin-columns.php:1106
37
+ #: ../_codepress-admin-columns.php:481
38
+ #: ../_codepress-admin-columns.php:1131
39
  msgid "Image"
40
  msgstr "Afbeelding"
41
 
42
+ #: ../codepress-admin-columns.php:442
43
+ #: ../_codepress-admin-columns.php:482
44
  msgid "Media Library Icon"
45
  msgstr "Media bibliotheek Icoon"
46
 
47
+ #: ../codepress-admin-columns.php:443
48
+ #: ../codepress-admin-columns.php:1114
49
+ #: ../codepress-admin-columns.php:1116
50
+ #: ../_codepress-admin-columns.php:483
51
+ #: ../_codepress-admin-columns.php:1139
52
+ #: ../_codepress-admin-columns.php:1141
53
  msgid "Excerpt"
54
  msgstr "Samenvatting"
55
 
56
+ #: ../codepress-admin-columns.php:444
57
+ #: ../_codepress-admin-columns.php:484
58
  msgid "Multiple Values"
59
  msgstr "Meerdere waarden"
60
 
61
+ #: ../codepress-admin-columns.php:445
62
+ #: ../_codepress-admin-columns.php:485
63
+ msgid "Numeric"
64
+ msgstr "Numerieke"
65
+
66
+ #: ../codepress-admin-columns.php:470
67
+ #: ../_codepress-admin-columns.php:510
68
  msgid "This field can not be removed"
69
  msgstr "Dit veld kan niet worden verwijderd"
70
 
71
+ #: ../codepress-admin-columns.php:474
72
+ #: ../_codepress-admin-columns.php:514
73
  msgid "Remove"
74
  msgstr "Verwijder"
75
 
76
+ #: ../codepress-admin-columns.php:790
77
+ #: ../_codepress-admin-columns.php:806
78
  msgid "Standard"
79
  msgstr "Standaard"
80
 
81
+ #: ../codepress-admin-columns.php:1075
82
+ #: ../_codepress-admin-columns.php:1086
83
  msgid "Comments"
84
  msgstr "Reacties"
85
 
86
+ #: ../codepress-admin-columns.php:1104
87
+ #: ../_codepress-admin-columns.php:1129
 
 
 
88
  msgid "Featured Image"
89
  msgstr "Uitgelichte afbeelding"
90
 
91
+ #: ../codepress-admin-columns.php:1124
92
+ #: ../codepress-admin-columns.php:1126
93
+ #: ../_codepress-admin-columns.php:1149
94
+ #: ../_codepress-admin-columns.php:1151
95
  msgid "Sticky"
96
  msgstr "Sticky"
97
 
98
+ #: ../codepress-admin-columns.php:1134
99
+ #: ../_codepress-admin-columns.php:1159
100
  msgid "Page Order"
101
  msgstr "Pagina Volgorde"
102
 
103
+ #: ../codepress-admin-columns.php:1136
104
+ #: ../_codepress-admin-columns.php:1161
105
  msgid "Order"
106
  msgstr "Volgorde"
107
 
108
+ #: ../codepress-admin-columns.php:1145
109
+ #: ../codepress-admin-columns.php:1147
110
+ #: ../_codepress-admin-columns.php:1170
111
+ #: ../_codepress-admin-columns.php:1172
112
  msgid "Page Template"
113
  msgstr "Pagina Template"
114
 
115
+ #: ../codepress-admin-columns.php:1156
116
+ #: ../codepress-admin-columns.php:1158
117
+ #: ../_codepress-admin-columns.php:1181
118
+ #: ../_codepress-admin-columns.php:1183
119
  msgid "Post Format"
120
  msgstr ""
121
 
122
+ #: ../codepress-admin-columns.php:1171
123
+ #: ../_codepress-admin-columns.php:1196
124
  msgid "Taxonomy"
125
  msgstr ""
126
 
127
+ #: ../codepress-admin-columns.php:1189
128
+ #: ../codepress-admin-columns.php:1191
129
+ #: ../_codepress-admin-columns.php:1214
130
+ #: ../_codepress-admin-columns.php:1216
131
  msgid "Slug"
132
  msgstr ""
133
 
134
+ #: ../codepress-admin-columns.php:1198
135
+ #: ../codepress-admin-columns.php:1200
136
+ msgid "Word count"
137
+ msgstr "Aantal woorden"
138
+
139
+ #: ../codepress-admin-columns.php:1206
140
+ #: ../codepress-admin-columns.php:1208
141
+ #: ../_codepress-admin-columns.php:1223
142
+ #: ../_codepress-admin-columns.php:1225
143
  msgid "Attachment"
144
  msgstr ""
145
 
146
+ #: ../codepress-admin-columns.php:1216
147
+ #: ../_codepress-admin-columns.php:1233
148
  msgid "Custom Field"
149
  msgstr ""
150
 
151
+ #: ../codepress-admin-columns.php:1222
152
+ #: ../_codepress-admin-columns.php:1239
153
  msgid "Field"
154
  msgstr "Veld"
155
 
156
+ #: ../codepress-admin-columns.php:1246
157
+ #: ../codepress-admin-columns.php:1248
158
+ msgid "User ID"
159
+ msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
+ #: ../codepress-admin-columns.php:1255
162
+ #: ../codepress-admin-columns.php:1257
163
+ msgid "First name"
164
+ msgstr "Voornaam"
165
 
166
+ #: ../codepress-admin-columns.php:1263
167
+ #: ../codepress-admin-columns.php:1265
168
+ msgid "Last name"
169
+ msgstr "Achternaam"
170
 
171
+ #: ../codepress-admin-columns.php:1271
172
+ #: ../codepress-admin-columns.php:1273
173
+ msgid "Url"
174
+ msgstr ""
175
 
176
+ #: ../codepress-admin-columns.php:1279
177
+ #: ../codepress-admin-columns.php:1281
178
+ msgid "Registered"
179
+ msgstr "Registratie"
180
 
181
+ #: ../codepress-admin-columns.php:1307
182
+ #: ../_codepress-admin-columns.php:1119
183
+ msgid "Custom"
184
+ msgstr ""
185
 
186
+ #: ../codepress-admin-columns.php:1596
187
+ #: ../_codepress-admin-columns.php:226
188
+ msgid "Codepress Admin Columns"
189
+ msgstr ""
190
 
191
+ #: ../codepress-admin-columns.php:1605
192
+ #: ../_codepress-admin-columns.php:235
193
+ msgid "Admin Columns"
194
+ msgstr ""
 
 
195
 
196
+ #: ../codepress-admin-columns.php:1620
197
+ #: ../_codepress-admin-columns.php:250
198
+ msgid "Save Changes"
199
+ msgstr "Wijzigingen opslaan"
200
 
201
+ #: ../codepress-admin-columns.php:1632
202
+ #: ../_codepress-admin-columns.php:262
203
+ msgid "Restore defaults"
204
+ msgstr "Herstel instellingen"
205
 
206
+ #: ../codepress-admin-columns.php:1636
207
+ #: ../_codepress-admin-columns.php:266
208
+ msgid "Restore default settings"
209
+ msgstr "Herstel standaard instellingen"
210
 
211
+ #: ../codepress-admin-columns.php:1636
212
+ #: ../_codepress-admin-columns.php:266
213
+ msgid "Warning! ALL saved admin columns data will be deleted. This cannot be undone. \\'OK\\' to delete, \\'Cancel\\' to stop"
214
+ msgstr "Waarschuwing! ALLE bewaarde instellingen worden verwijderd. Dit kan niet worden ongedaan. \\'OK\\' om te verwijderen, \\'Annuleren\\' om te stoppen"
215
 
216
+ #: ../codepress-admin-columns.php:1638
217
+ #: ../_codepress-admin-columns.php:268
218
+ msgid "This will delete all column settings and restore the default settings."
219
+ msgstr "Hiermee worden alle kolommen instellingen verwijderd en de standaardinstellingen hersteld."
220
 
221
+ #: ../codepress-admin-columns.php:1653
222
+ #: ../_codepress-admin-columns.php:283
223
+ msgid "Need support?"
224
+ msgstr "Hulp nodig?"
225
 
226
+ #: ../codepress-admin-columns.php:1656
227
+ #, php-format
228
+ msgid "If you are having problems with this plugin, please talk about them in the <a href=\"%s\">Support forums</a> or send me an email %s."
229
+ msgstr "Als je problem hebt met deze plugin, stel je vragen dan in de <a href=\"%s\">Support forums</a> of stuur me een email %s."
230
 
231
+ #: ../codepress-admin-columns.php:1657
232
+ #: ../_codepress-admin-columns.php:287
233
+ #, php-format
234
+ msgid "If you're sure you've found a bug, or have a feature request, please <a href='%s'>submit your feedback</a>."
235
+ msgstr "Als een bug bent tegen gekomen, of een feature wil aanvragen, stuur ons dan <a href='%s'>je feedback</a>."
236
 
237
+ #: ../_codepress-admin-columns.php:286
238
+ #, php-format
239
+ msgid "If you are having problems with this plugin, please talk about them in the <a href=\"%s\">Support forums</a>."
240
+ msgstr "Als je problem hebt met deze plugin, stel je vragen dan in de <a href=\"%s\">Support forums</a>."
241
 
 
 
readme.txt CHANGED
@@ -1,21 +1,19 @@
1
  === Codepress Admin Columns ===
2
  Contributors: codepress, tschutter
3
- Tags: plugins, wordpress, admin, column, columns, dashboard, sortable, filters, wp-admin
4
  Requires at least: 3.1
5
- Tested up to: 3.2.1
6
- Stable tag: 1.0.1
7
 
8
  == Description ==
9
 
10
- This plugin makes it easy to customize Admin Columns for your Posts, Pages and Custom Post Type Screens.
11
 
12
- = Intro =
13
 
14
- This plugin let's you visually customize the Admin Columns. You can add or remove columns, change their label and reorder them.
15
 
16
- = Custom Columns =
17
-
18
- The following custom columns are supported:
19
 
20
  * Featured Image
21
  * Excerpt
@@ -31,14 +29,15 @@ The following custom columns are supported:
31
 
32
  = Custom Fields =
33
 
34
- With the custom field column you can display custom field values. It will show the value as a default. You can also set your own type:
35
 
36
- * Icons for Media Library items
37
  * Image thumbnails
 
38
  * Excerpt
39
  * Multiple Values
 
40
 
41
- = Sortable Admin Columns =
42
 
43
  A nice feature is that it will make some of the new columns support sorting. By default WordPress let's you sort by Title, Date, Comments and Author. This will make you be able to sort by:
44
 
@@ -46,8 +45,19 @@ A nice feature is that it will make some of the new columns support sorting. By
46
  * page order
47
  * slug
48
  * page template
 
 
 
 
 
 
 
 
 
 
 
49
 
50
- I will be adding more in coming releases. You can leave any <a href='http://www.codepress.nl/plugins/codepress-admin-columns/#feedback'>requests or feedback</a>.
51
 
52
  **Related Links:**
53
 
@@ -69,15 +79,33 @@ Leave your feedback at http://www.codepress.nl/plugins/codepress-admin-columns#f
69
 
70
  == Screenshots ==
71
 
72
- 1. Settings page of the Codepress Admin columns plugin.
73
- 2. Options for the Custom Field Column.
74
- 3. Posts Screen with custom columns.
75
 
76
  == Changelog ==
77
 
78
- = 1.0.1 =
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
- Settings link corrected
 
 
 
 
 
81
 
82
  = 1.0 =
83
 
1
  === Codepress Admin Columns ===
2
  Contributors: codepress, tschutter
3
+ Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, wp-admin
4
  Requires at least: 3.1
5
+ Tested up to: 3.3-RC1
6
+ Stable tag: 1.1.3
7
 
8
  == Description ==
9
 
10
+ Completely Customise your Custom Columns with a nice drag and drop interface.
11
 
12
+ By default, WordPress only shows a few built-in columns. This plugin will give you many additional columns and you will have full control over all custom columns for pages, posts, posttypes and users. You can add or remove columns, change their label and reorder them.
13
 
14
+ = Custom Columns =
15
 
16
+ The following custom columns are added:
 
 
17
 
18
  * Featured Image
19
  * Excerpt
29
 
30
  = Custom Fields =
31
 
32
+ With the custom field column you can display any custom field values. It can show its default value but also handle it as an image or icon. Thsese types are added:
33
 
 
34
  * Image thumbnails
35
+ * Icons for Media Library items
36
  * Excerpt
37
  * Multiple Values
38
+ * Numeric value ( this also works for sorting by meta_value_num )
39
 
40
+ = Sortable Custom Columns =
41
 
42
  A nice feature is that it will make some of the new columns support sorting. By default WordPress let's you sort by Title, Date, Comments and Author. This will make you be able to sort by:
43
 
45
  * page order
46
  * slug
47
  * page template
48
+ * custom fields ( both meta_value and meta_value_num are supported )
49
+
50
+ = User Columns =
51
+
52
+ You can also change the User Columns. We have added a few additional custom columns:
53
+
54
+ * User ID
55
+ * First name
56
+ * Last name
57
+ * Url
58
+ * Register date
59
 
60
+ We will be adding more in coming releases. You can leave any <a href='http://www.codepress.nl/plugins/codepress-admin-columns#feedback'>requests or feedback</a>.
61
 
62
  **Related Links:**
63
 
79
 
80
  == Screenshots ==
81
 
82
+ 1. Posts Screen with custom columns.
83
+ 2. Settings page of the Codepress Admin columns plugin.
84
+ 3. Options for the Custom Field Column.
85
 
86
  == Changelog ==
87
 
88
+ = 1.1.3 =
89
+
90
+ * added bug fix for WP3.3beta ( thanks to raonip and ronbme for pointing this out )
91
+
92
+ = 1.1.2 =
93
+
94
+ * added dutch translation
95
+
96
+ = 1.1.1 =
97
+
98
+ * Bug fix: path separator for require_once
99
+ * Added word count
100
+
101
+ = 1.1 =
102
 
103
+ * Added User Columns.
104
+ * Added before / after text for custom fields
105
+ * Added custom field type 'Numeric'.
106
+ * Added custom field sortables.
107
+ * Fixed domain path
108
+ * Fixed settings link
109
 
110
  = 1.0 =
111
 
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file