Capability Manager Enhanced - Version 1.5.7

Version Description

  • Change : Revert menu captions to previous behavior ("Permissions > Role Capabilities" if Press Permit Core is active, otherwise "Users > Capabilities")
Download this release

Release Info

Developer kevinB
Plugin Icon 128x128 Capability Manager Enhanced
Version 1.5.7
Comparing to
See all releases

Code changes from version 1.5.5 to 1.5.7

Files changed (4) hide show
  1. capsman-enhanced.php +8 -12
  2. images/Thumbs.db +0 -0
  3. includes/manager.php +4 -4
  4. readme.txt +13 -3
capsman-enhanced.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Capability Manager Enhanced
4
  Plugin URI: http://presspermit.com/capability-manager
5
  Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
- Version: 1.5.5
7
  Author: Jordi Canals, Kevin Behrens
8
  Author URI: http://agapetry.net
9
  Text Domain: capsman-enhanced
@@ -34,8 +34,8 @@ Domain Path: /lang/
34
  */
35
 
36
  if ( ! defined( 'CAPSMAN_VERSION' ) ) {
37
- define( 'CAPSMAN_VERSION', '1.5.5' );
38
- define( 'CAPSMAN_ENH_VERSION', '1.5.5' );
39
  }
40
 
41
  if ( cme_is_plugin_active( 'capsman.php' ) ) {
@@ -91,7 +91,7 @@ if ( cme_is_plugin_active( 'capsman.php' ) ) {
91
  }
92
  } else {
93
  load_plugin_textdomain('capsman-enhanced', false, basename(dirname(__FILE__)) .'/lang');
94
- add_action( 'admin_menu', 'cme_submenus' );
95
  }
96
  }
97
  }
@@ -111,19 +111,15 @@ function _cme_pp_scripts() {
111
 
112
  // perf enchancement: display submenu links without loading framework and plugin code
113
  function cme_submenus() {
114
- add_action( 'admin_menu', '_cme_menu_item', 20 );
115
-
116
  $cap_name = ( is_super_admin() ) ? 'manage_capabilities' : 'restore_roles';
117
  add_management_page(__('Capability Manager', 'capsman-enhanced'), __('Capability Manager', 'capsman-enhanced'), $cap_name, 'capsman' . '-tool', 'cme_fakefunc');
118
- }
119
-
120
- function _cme_menu_item() {
121
  if ( did_action( 'pp_admin_menu' ) ) { // Put Capabilities link on Permissions menu if Press Permit is active and user has access to it
122
  global $pp_admin;
123
- add_submenu_page( $pp_admin->get_menu('options'), __('Capability Manager', 'capsman-enhanced'), __('Role Capabilities', 'capsman-enhanced'), 'manage_capabilities', 'capsman', 'cme_fakefunc' );
 
124
  } else {
125
- $menu_caption = ( defined('WPLANG') && WPLANG ) ? __('Capabilities', 'capsman-enhanced') : 'Role Capabilities';
126
- add_users_page( __('Capability Manager', 'capsman-enhanced'), $menu_caption, 'manage_capabilities', 'capsman', 'cme_fakefunc');
127
  }
128
  }
129
 
3
  Plugin Name: Capability Manager Enhanced
4
  Plugin URI: http://presspermit.com/capability-manager
5
  Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
+ Version: 1.5.7
7
  Author: Jordi Canals, Kevin Behrens
8
  Author URI: http://agapetry.net
9
  Text Domain: capsman-enhanced
34
  */
35
 
36
  if ( ! defined( 'CAPSMAN_VERSION' ) ) {
37
+ define( 'CAPSMAN_VERSION', '1.5.7' );
38
+ define( 'CAPSMAN_ENH_VERSION', '1.5.7' );
39
  }
40
 
41
  if ( cme_is_plugin_active( 'capsman.php' ) ) {
91
  }
92
  } else {
93
  load_plugin_textdomain('capsman-enhanced', false, basename(dirname(__FILE__)) .'/lang');
94
+ add_action( 'admin_menu', 'cme_submenus', 20 );
95
  }
96
  }
97
  }
111
 
112
  // perf enchancement: display submenu links without loading framework and plugin code
113
  function cme_submenus() {
 
 
114
  $cap_name = ( is_super_admin() ) ? 'manage_capabilities' : 'restore_roles';
115
  add_management_page(__('Capability Manager', 'capsman-enhanced'), __('Capability Manager', 'capsman-enhanced'), $cap_name, 'capsman' . '-tool', 'cme_fakefunc');
116
+
 
 
117
  if ( did_action( 'pp_admin_menu' ) ) { // Put Capabilities link on Permissions menu if Press Permit is active and user has access to it
118
  global $pp_admin;
119
+ $menu_caption = ( defined('WPLANG') && WPLANG && ( 'en_EN' != WPLANG ) ) ? __('Capabilities', 'capsman-enhanced') : 'Role Capabilities';
120
+ add_submenu_page( $pp_admin->get_menu('options'), __('Capability Manager', 'capsman-enhanced'), $menu_caption, 'manage_capabilities', 'capsman', 'cme_fakefunc' );
121
  } else {
122
+ add_users_page( __('Capability Manager', 'capsman-enhanced'), __('Capabilities', 'capsman-enhanced'), 'manage_capabilities', 'capsman', 'cme_fakefunc');
 
123
  }
124
  }
125
 
images/Thumbs.db ADDED
Binary file
includes/manager.php CHANGED
@@ -172,15 +172,15 @@ class CapabilityManager extends akPluginAbstract
172
  }
173
 
174
  add_action( 'admin_menu', array( &$this, 'cme_menu' ), 20 );
175
-
176
- $cap_name = ( is_super_admin() ) ? 'manage_capabilities' : 'restore_roles';
177
- add_management_page(__('Capability Manager', 'capsman-enhanced'), __('Capability Manager', 'capsman-enhanced'), $cap_name, $this->ID . '-tool', array($this, 'backupTool'));
178
  }
179
 
180
  public function cme_menu() {
 
 
 
181
  if ( did_action( 'pp_admin_menu' ) ) { // Put Capabilities link on Permissions menu if Press Permit is active and user has access to it
182
  global $pp_admin;
183
- $menu_caption = ( defined('WPLANG') && WPLANG ) ? __('Capabilities', 'capsman-enhanced') : 'Role Capabilities';
184
  add_submenu_page( $pp_admin->get_menu('options'), __('Capability Manager', 'capsman-enhanced'), $menu_caption, 'manage_capabilities', $this->ID, array($this, 'generalManager') );
185
  } else {
186
  add_users_page( __('Capability Manager', 'capsman-enhanced'), __('Capabilities', 'capsman-enhanced'), 'manage_capabilities', $this->ID, array($this, 'generalManager'));
172
  }
173
 
174
  add_action( 'admin_menu', array( &$this, 'cme_menu' ), 20 );
 
 
 
175
  }
176
 
177
  public function cme_menu() {
178
+ $cap_name = ( is_super_admin() ) ? 'manage_capabilities' : 'restore_roles';
179
+ add_management_page(__('Capability Manager', 'capsman-enhanced'), __('Capability Manager', 'capsman-enhanced'), $cap_name, $this->ID . '-tool', array($this, 'backupTool'));
180
+
181
  if ( did_action( 'pp_admin_menu' ) ) { // Put Capabilities link on Permissions menu if Press Permit is active and user has access to it
182
  global $pp_admin;
183
+ $menu_caption = ( defined('WPLANG') && WPLANG && ( 'en_EN' != WPLANG ) ) ? __('Capabilities', 'capsman-enhanced') : 'Role Capabilities';
184
  add_submenu_page( $pp_admin->get_menu('options'), __('Capability Manager', 'capsman-enhanced'), $menu_caption, 'manage_capabilities', $this->ID, array($this, 'generalManager') );
185
  } else {
186
  add_users_page( __('Capability Manager', 'capsman-enhanced'), __('Capabilities', 'capsman-enhanced'), 'manage_capabilities', $this->ID, array($this, 'generalManager'));
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: txanny, kevinB
3
  Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=JWZVFUDLLYQBA
4
  Tags: roles, capabilities, manager, editor, rights, role, capability, types, taxonomies, network, multisite, default
5
  Requires at least: 3.1
6
- Tested up to: 4.3.1
7
- Stable tag: 1.5.5
8
 
9
  A simple way to manage WordPress roles and capabilities.
10
 
@@ -88,9 +88,13 @@ The custom post type must be defined to impose type-specific capability requirem
88
 
89
  Probably because your custom post type definition not having map_meta_cap set true. If you are calling register_post_type manually, just add this property to the options array. Unfortunately, none of the free CPT plugins deal with this important detail.
90
 
 
 
 
 
91
  = Where can I find more information about this plugin, usage and support ? =
92
 
93
- * If you need help, <a href="http://wordpress.org/tags/capsman-enhanced">ask in the Support forum</a>.
94
 
95
  == License ==
96
 
@@ -105,6 +109,12 @@ You should have received a copy of the GNU General Public License along with thi
105
 
106
  == Changelog ==
107
 
 
 
 
 
 
 
108
  = 1.5.5 =
109
  * Fixed : User editing was improperly blocked in some cases
110
 
3
  Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=JWZVFUDLLYQBA
4
  Tags: roles, capabilities, manager, editor, rights, role, capability, types, taxonomies, network, multisite, default
5
  Requires at least: 3.1
6
+ Tested up to: 4.7
7
+ Stable tag: 1.5.7
8
 
9
  A simple way to manage WordPress roles and capabilities.
10
 
88
 
89
  Probably because your custom post type definition not having map_meta_cap set true. If you are calling register_post_type manually, just add this property to the options array. Unfortunately, none of the free CPT plugins deal with this important detail.
90
 
91
+ = Even after I added capabilities, WordPress is not working the way I want =
92
+
93
+ Keep in mind that this plugin's purpose is to conveniently view and modify the capabilities array stored for each WordPress role. It is not responsible for the implementation of those capabilities by the WordPress core or other plugins.
94
+
95
  = Where can I find more information about this plugin, usage and support ? =
96
 
97
+ * If you need help, <a href="http://wordpress.org/tags/capsman-enhanced">ask in the Support forum</a>. If your issue pertains to the enforcement of assigned capabilities, I am not the primary support avenue. In many cases, I will offer a suggestion, but please don't give me negative feedback for not providing free consulting.
98
 
99
  == License ==
100
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.5.7 =
113
+ * Change : Revert menu captions to previous behavior ("Permissions > Role Capabilities" if Press Permit Core is active, otherwise "Users > Capabilities")
114
+
115
+ = 1.5.6 =
116
+ * Fixed : Correct some irregularities in CME admin menu item display
117
+
118
  = 1.5.5 =
119
  * Fixed : User editing was improperly blocked in some cases
120