Admin Columns - Version 2.1.5

Version Description

Download this release

Release Info

Developer tschutter
Plugin Icon 128x128 Admin Columns
Version 2.1.5
Comparing to
See all releases

Code changes from version 2.1.4 to 2.1.5

classes/settings.php CHANGED
@@ -244,14 +244,14 @@ class CPAC_Settings {
244
  */
245
  function get_url( $type ) {
246
 
247
- $site_url = 'http://www.codepresshq.com';
248
 
249
  $urls = array(
250
  'codepress' => $site_url,
251
- 'admincolumns' => $site_url . '/wordpress-plugins/admin-columns/',
252
- 'pro_addon' => $site_url . '/wordpress-plugins/admin-columns/pro-add-on/',
253
- 'documentation' => $site_url . '/wordpress-plugins/admin-columns/',
254
- 'feedback' => $site_url . '/contact',
255
  'plugins' => 'http://wordpress.org/extend/plugins/codepress-admin-columns/',
256
  'support' => 'http://wordpress.org/tags/codepress-admin-columns/',
257
  );
@@ -703,20 +703,20 @@ class CPAC_Settings {
703
 
704
  </div><!--form-actions-->
705
 
706
- <?php if ( ! class_exists( 'CAC_Addon_Pro' ) ) : ?>
707
  <div class="sidebox" id="pro-version">
708
  <div class="padding-box cta">
709
  <h3>
710
- <a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Get the Pro Add-on', 'cpac' ) ?></a>
711
  </h3>
712
  <div class="inside">
713
  <ul>
 
714
  <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Sorting', 'cpac' ); ?></a></li>
715
  <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Filtering', 'cpac' ); ?></a></li>
716
  <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Import/Export', 'cpac' ); ?></a></li>
717
  </ul>
718
  <p>
719
- <?php printf( __( 'Check the <a href="%s">Pro Add-on</a> for more details!', 'cpac' ), $this->get_url('pro_addon') ); ?>
720
  </p>
721
  </div>
722
  </div>
@@ -744,7 +744,6 @@ class CPAC_Settings {
744
  </div>
745
  <?php */ ?>
746
  </div><!--pro-version-->
747
- <?php endif; ?>
748
 
749
  <div class="sidebox" id="plugin-support">
750
  <h3><?php _e( 'Support', 'cpac' ); ?></h3>
244
  */
245
  function get_url( $type ) {
246
 
247
+ $site_url = 'http://admincolumns.com';
248
 
249
  $urls = array(
250
  'codepress' => $site_url,
251
+ 'admincolumns' => $site_url,
252
+ 'pro_addon' => $site_url,
253
+ 'documentation' => $site_url . '/documentation/',
254
+ 'feedback' => $site_url . '/contact/',
255
  'plugins' => 'http://wordpress.org/extend/plugins/codepress-admin-columns/',
256
  'support' => 'http://wordpress.org/tags/codepress-admin-columns/',
257
  );
703
 
704
  </div><!--form-actions-->
705
 
 
706
  <div class="sidebox" id="pro-version">
707
  <div class="padding-box cta">
708
  <h3>
709
+ <a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Get Admin Columns Pro', 'cpac' ) ?></a>
710
  </h3>
711
  <div class="inside">
712
  <ul>
713
+ <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Direct Inline Editing', 'cpac' ); ?></a></li>
714
  <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Sorting', 'cpac' ); ?></a></li>
715
  <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Filtering', 'cpac' ); ?></a></li>
716
  <li><a href="<?php echo $this->get_url('pro_addon'); ?>"><?php _e( 'Add Import/Export', 'cpac' ); ?></a></li>
717
  </ul>
718
  <p>
719
+ <?php printf( __( 'Check out <a href="%s">Admin Columns Pro</a> for more details!', 'cpac' ), $this->get_url('pro_addon') ); ?>
720
  </p>
721
  </div>
722
  </div>
744
  </div>
745
  <?php */ ?>
746
  </div><!--pro-version-->
 
747
 
748
  <div class="sidebox" id="plugin-support">
749
  <h3><?php _e( 'Support', 'cpac' ); ?></h3>
classes/upgrade.php CHANGED
@@ -15,6 +15,7 @@ class CPAC_Upgrade {
15
  * CPAC class
16
  */
17
  private $cpac;
 
18
 
19
  /**
20
  * Constructor
@@ -29,6 +30,72 @@ class CPAC_Upgrade {
29
  add_action( 'admin_init', array( $this, 'init' ) );
30
  add_action( 'admin_menu', array( $this, 'admin_menu' ), 11 );
31
  add_action( 'wp_ajax_cpac_upgrade', array( $this, 'ajax_upgrade' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /**
15
  * CPAC class
16
  */
17
  private $cpac;
18
+ private $discourage_upgrade;
19
 
20
  /**
21
  * Constructor
30
  add_action( 'admin_init', array( $this, 'init' ) );
31
  add_action( 'admin_menu', array( $this, 'admin_menu' ), 11 );
32
  add_action( 'wp_ajax_cpac_upgrade', array( $this, 'ajax_upgrade' ) );
33
+
34
+ if ( ! $this->allow_upgrade() ) {
35
+ add_filter( 'site_transient_update_plugins', array( $this, 'transient_update_plugins_disable_update' ) );
36
+ add_action( 'admin_notices', array( $this, 'maybe_display_proaddon_notice' ) );
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Overwrite the update_plugins transient to disable updating Admin Columns
42
+ *
43
+ * @since 2.1.5
44
+ */
45
+ public function transient_update_plugins_disable_update( $value ) {
46
+
47
+ if ( isset( $value->response['codepress-admin-columns/codepress-admin-columns.php'] ) ) {
48
+ $this->discourage_upgrade = true;
49
+ }
50
+
51
+ return $value;
52
+ }
53
+
54
+ /**
55
+ * Display a notice about the deprecated pro add-on
56
+ *
57
+ * @since 2.1.5
58
+ */
59
+ public function maybe_display_proaddon_notice() {
60
+
61
+ $screen = get_current_screen();
62
+
63
+ if ( $screen->base != 'plugins' ) {
64
+ return;
65
+ }
66
+
67
+ if ( $this->discourage_upgrade ) {
68
+ ?>
69
+ <div class="message error">
70
+ <p>
71
+ <?php printf( __( 'An update to <strong>Codepress Admin Columns</strong> is available. As the <strong>Pro add-on</strong> is no longer officially supported after Admin Columns 2.1.5, we discourage upgrading Admin Columns now. A free upgrade to <strong>Admin Columns Pro</strong>, with loads of awesome new features, is available (%s).', 'cpac' ), '<a href="http://admincolumns.com/pro-addon-information/" target="_blank">' . __( 'learn more', 'cpac' ) . '</a>' ); ?>
72
+ </p>
73
+ </div>
74
+ <?php
75
+ }
76
+ else {
77
+ ?>
78
+ <div class="message error">
79
+ <p>
80
+ <?php printf( __( 'Updates for <strong>Codepress Admin Columns</strong> might cause compatibility issues as you&#39;re using the <strong>Pro Add-on</strong>, which is no longer actively maintained and incompatible with new versions of Admin Columns. A free upgrade to <strong>Admin Columns Pro</strong> (with a bunch of cool new features) is available (%s).', 'cpac' ), '<a href="http://admincolumns.com/pro-addon-information/" target="_blank">' . __( 'learn more', 'cpac' ) . '</a>' ); ?>
81
+ </p>
82
+ </div>
83
+ <?php
84
+ }
85
+ }
86
+
87
+ /**
88
+ * Whether upgrading is allowed
89
+ *
90
+ * @since 2.1.5
91
+ *
92
+ * @return bool Whether plugin upgrading is allowed
93
+ */
94
+ public function allow_upgrade() {
95
+
96
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
97
+
98
+ return ! is_plugin_active( 'cac-addon-pro/cac-addon-pro.php' );
99
  }
100
 
101
  /**
codepress-admin-columns.php CHANGED
@@ -2,11 +2,11 @@
2
  /*
3
 
4
  Plugin Name: Codepress Admin Columns
5
- Version: 2.1.4
6
  Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
7
  Author: Codepress
8
- Author URI: http://www.codepresshq.com
9
- Plugin URI: http://www.codepresshq.com/wordpress-plugins/admin-columns/
10
  Text Domain: cpac
11
  Domain Path: /languages
12
  License: GPLv2
@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
 
30
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
31
 
32
- define( 'CPAC_VERSION', '2.1.4' ); // current plugin version
33
  define( 'CPAC_UPGRADE_VERSION', '2.0.0' ); // this is the latest version which requires an upgrade
34
  define( 'CPAC_URL', plugin_dir_url( __FILE__ ) );
35
  define( 'CPAC_DIR', plugin_dir_path( __FILE__ ) );
2
  /*
3
 
4
  Plugin Name: Codepress Admin Columns
5
+ Version: 2.1.5
6
  Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
7
  Author: Codepress
8
+ Author URI: http://admincolumns.com
9
+ Plugin URI: http://admincolumns.com
10
  Text Domain: cpac
11
  Domain Path: /languages
12
  License: GPLv2
29
 
30
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
31
 
32
+ define( 'CPAC_VERSION', '2.1.5' ); // current plugin version
33
  define( 'CPAC_UPGRADE_VERSION', '2.0.0' ); // this is the latest version which requires an upgrade
34
  define( 'CPAC_URL', plugin_dir_url( __FILE__ ) );
35
  define( 'CPAC_DIR', plugin_dir_path( __FILE__ ) );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: codepress, tschutter, davidmosterd, engelen
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
4
  Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin
5
  Requires at least: 3.5
6
- Tested up to: 3.8.1
7
- Stable tag: 2.1.4
8
 
9
  Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
10
 
@@ -16,6 +16,8 @@ By default, WordPress only shows a few built-in columns. This plugin will give y
16
 
17
  Add or remove columns, change their label, change their width and reorder them.
18
 
 
 
19
  = Post Types Columns =
20
 
21
  The following custom columns are added:
@@ -103,9 +105,9 @@ With the custom field column you can display any custom field values. It can sho
103
  * Usernames
104
  * Checkmark Image ( for true or false values )
105
 
106
- = Sortable Custom Columns for all Screens =
107
 
108
- All of the new columns will have support for sorting with the <a href="http://www.codepresshq.com/wordpress-plugins/admin-columns/pro-add-on/">Pro add-on</a>.
109
 
110
  By default WordPress let's you only sort by Title, Date, Comments and Author. This will make you be able to <strong>sort by ALL columns of ANY type</strong>. (columns that are added by other plugins are not supported)
111
 
@@ -130,11 +132,11 @@ If you like to contrinute a language, please use <a href="https://www.transifex.
130
 
131
  **Feedback**
132
 
133
- You can leave any <a href='http://www.codepresshq.com/support/'>requests or feedback</a>.
134
 
135
  **Related Links:**
136
 
137
- * http://www.codepresshq.com/wordpress-plugins/admin-columns/
138
 
139
  == Installation ==
140
 
@@ -146,12 +148,12 @@ You can leave any <a href='http://www.codepresshq.com/support/'>requests or feed
146
 
147
  = Is there documentation for Admin Columns? =
148
 
149
- Yes, you will find all the documentation you need on <a href="http://www.codepresshq.com/documentation/codepress-admin-columns/">http://www.codepresshq.com/documentation/codepress-admin-columns/</a>.
150
 
151
  = I have an idea for a great way to improve this plugin =
152
 
153
  Great! I'd love to hear from you.
154
- Leave your feedback at http://www.codepresshq.com/support.
155
 
156
  = How can I change the thumbnail size of images? =
157
 
@@ -205,7 +207,7 @@ add_filter( 'cac/column/meta/value', 'my_custom_field_value', 10, 3 );
205
 
206
  = What filters and hooks can I use? =
207
 
208
- Here you will find an overview of filters and examples: http://www.codepresshq.com/documentation/codepress-admin-columns/
209
 
210
  == Screenshots ==
211
 
@@ -220,28 +222,11 @@ Here you will find an overview of filters and examples: http://www.codepresshq.c
220
 
221
  == Changelog ==
222
 
223
- = 2.1.4 =
224
- * [Added] CSS now is compiled with LESS
225
  * [Updated] Menu is split between posttypes and media, comments and users.
226
- * [Fixed] WordPress SEO 1.5.2 columns support
227
- * [Updated] Refactored JS and cleanup
228
- * [Updated] Registered Date column now uses GMT date
229
- * [Updated] Display author as column has fallback to display_name
230
- * [Updated] Added conditional checks for featured-image-, ping-status and comment-status-columns
231
- * [Fixed] Fixed warning for available-sizes column
232
- * [Updated] Column labels can no longer contain ":" characters
233
-
234
- = 2.1.3 =
235
- * [Updated] Undo changes from 2.1.2, will be in the next major release
236
- * [Fixed] Moved assignment of capabilities to plugin activation hook
237
- * [Fixed] Hook into manage_columns filters later to prevent overwriting from other plugins
238
- * [Fixed] Filters for column_path
239
-
240
- = 2.1.2 =
241
- [Updated] Added ajax check and improved loading.
242
- [Updated] Menu is split between posttypes and media, comments and users.
243
- [Added] WooCommerce 2.1 columns support
244
- [Fixed] Filters for column_path
245
 
246
  = 2.1.1 =
247
  * [Updated] Added page check to posttype edit screens
@@ -260,7 +245,7 @@ Here you will find an overview of filters and examples: http://www.codepresshq.c
260
  * [Added] Fieldtype "Counter" to Custom Fields
261
  * [Added] Column type ID when you hover over the column type label
262
  * [Added] Support for raw values
263
- * [Updated] Changed filter for cac/column/value. See: http://www.codepresshq.com/documentation.
264
 
265
  = 2.0.2 =
266
  * [Fixed] Performance issue
@@ -306,7 +291,7 @@ Here you will find an overview of filters and examples: http://www.codepresshq.c
306
  * fixed bug: thirdparty columns that were previous loaded through load-edit.php will now use do_action( 'cpac-get-default-columns-{$type}' )
307
 
308
  = 1.4.8 =
309
- * [Fixed] Issue: removed acf posttype placed by Advaced Custom Fields from settings menu
310
  * [Fixed] Issue: removed bbPress posttypes topic, forum and reply from admin columns settings menu
311
  * [Fixed] Issue: license key could not activate properly
312
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
4
  Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin
5
  Requires at least: 3.5
6
+ Tested up to: 3.9
7
+ Stable tag: 2.1.5
8
 
9
  Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
10
 
16
 
17
  Add or remove columns, change their label, change their width and reorder them.
18
 
19
+ <a href="http://www.admincolumns.com">Admin Columns Pro</a> offers additional features such as direct inline editing (edit post data directly from your columns), sorting, filtering and Advanced Custom Fields integration.
20
+
21
  = Post Types Columns =
22
 
23
  The following custom columns are added:
105
  * Usernames
106
  * Checkmark Image ( for true or false values )
107
 
108
+ = Sortable & Filterable Columns for all Screens =
109
 
110
+ All of the new columns will have support for sorting and filtering with <a href="http://www.admincolumns.com">Admin Columns Pro</a>.
111
 
112
  By default WordPress let's you only sort by Title, Date, Comments and Author. This will make you be able to <strong>sort by ALL columns of ANY type</strong>. (columns that are added by other plugins are not supported)
113
 
132
 
133
  **Feedback**
134
 
135
+ You can leave any <a href='http://www.admincolumns.com'>requests or feedback</a>.
136
 
137
  **Related Links:**
138
 
139
+ * http://www.admincolumns.com
140
 
141
  == Installation ==
142
 
148
 
149
  = Is there documentation for Admin Columns? =
150
 
151
+ Yes, you will find all the documentation you need on <a href="http://www.admincolumns.com/documentation">http://www.admincolumns.com/documentation</a>.
152
 
153
  = I have an idea for a great way to improve this plugin =
154
 
155
  Great! I'd love to hear from you.
156
+ Leave your feedback at http://www.admincolumns.com/support.
157
 
158
  = How can I change the thumbnail size of images? =
159
 
207
 
208
  = What filters and hooks can I use? =
209
 
210
+ Here you will find an overview of filters and examples: http://www.admincolumns.com/documentation
211
 
212
  == Screenshots ==
213
 
222
 
223
  == Changelog ==
224
 
225
+ = 2.2 =
226
+ * [Updated] Added ajax check and improved loading.
227
  * [Updated] Menu is split between posttypes and media, comments and users.
228
+ * [Updated] Additional documentation was added to filters and actions
229
+ * [Updated] Updated languages (from transifex)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  = 2.1.1 =
232
  * [Updated] Added page check to posttype edit screens
245
  * [Added] Fieldtype "Counter" to Custom Fields
246
  * [Added] Column type ID when you hover over the column type label
247
  * [Added] Support for raw values
248
+ * [Updated] Changed filter for cac/column/value. See: http://www.admincolumns.com/documentation.
249
 
250
  = 2.0.2 =
251
  * [Fixed] Performance issue
291
  * fixed bug: thirdparty columns that were previous loaded through load-edit.php will now use do_action( 'cpac-get-default-columns-{$type}' )
292
 
293
  = 1.4.8 =
294
+ * [Fixed] Issue: removed acf posttype placed by Advanced Custom Fields from settings menu
295
  * [Fixed] Issue: removed bbPress posttypes topic, forum and reply from admin columns settings menu
296
  * [Fixed] Issue: license key could not activate properly
297