Capability Manager Enhanced - Version 2.3.6

Version Description

  • 14 Apr 2022 =
    • Fixed : Non-administrators cannot access profile screen
    • Compat : WooCommerce - Shop Managers could not access Users
    • Compat : WooCommerce - Editor Feature restrictions did not hide Product Categories, Tags in Classic Editor
Download this release

Release Info

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

Code changes from version 2.3.5 to 2.3.6

capsman-enhanced.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: PublishPress Capabilities
4
  * Plugin URI: https://publishpress.com/capability-manager/
5
  * Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
- * Version: 2.3.5
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com/
9
  * Text Domain: capsman-enhanced
@@ -25,13 +25,13 @@
25
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2022 PublishPress
26
  * @license GNU General Public License version 3
27
  * @link https://publishpress.com/
28
- * @version 2.3.5
29
  */
30
 
31
  if (!defined('CAPSMAN_VERSION')) {
32
- define('CAPSMAN_VERSION', '2.3.5');
33
- define('CAPSMAN_ENH_VERSION', '2.3.5');
34
- define('PUBLISHPRESS_CAPS_VERSION', '2.3.5');
35
  }
36
 
37
  foreach (get_option('active_plugins') as $plugin_file) {
3
  * Plugin Name: PublishPress Capabilities
4
  * Plugin URI: https://publishpress.com/capability-manager/
5
  * Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
+ * Version: 2.3.6
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com/
9
  * Text Domain: capsman-enhanced
25
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2022 PublishPress
26
  * @license GNU General Public License version 3
27
  * @link https://publishpress.com/
28
+ * @version 2.3.6
29
  */
30
 
31
  if (!defined('CAPSMAN_VERSION')) {
32
+ define('CAPSMAN_VERSION', '2.3.6');
33
+ define('CAPSMAN_ENH_VERSION', '2.3.6');
34
+ define('PUBLISHPRESS_CAPS_VERSION', '2.3.6');
35
  }
36
 
37
  foreach (get_option('active_plugins') as $plugin_file) {
includes/features/restrict-editor-features.php CHANGED
@@ -76,7 +76,7 @@ class PP_Capabilities_Post_Features {
76
 
77
  foreach (get_taxonomies(['show_ui' => true], 'object') as $taxonomy => $tx_obj) {
78
  if (!in_array($taxonomy, ['category', 'post_tag', 'link_category'])) {
79
- $elements[$k]["#{$tx_obj->name}div"] = ['label' => $tx_obj->label];
80
  }
81
  }
82
 
76
 
77
  foreach (get_taxonomies(['show_ui' => true], 'object') as $taxonomy => $tx_obj) {
78
  if (!in_array($taxonomy, ['category', 'post_tag', 'link_category'])) {
79
+ $elements[$k]["#{$tx_obj->name}div"] = ['label' => $tx_obj->label,'elements'=>"#{$tx_obj->name}, #{$tx_obj->name}div,#{$tx_obj->name}divsb,#tagsdiv-{$tx_obj->name}, th.column-{$tx_obj->name}, td.{$tx_obj->name}"];
80
  }
81
  }
82
 
includes/manager.php CHANGED
@@ -910,16 +910,15 @@ class CapabilityManager
910
  */
911
  function processExport()
912
  {
913
- global $wpdb;
914
-
915
- if ((!is_multisite() || !is_super_admin()) && !current_user_can('administrator') && !current_user_can('restore_roles')) {
916
- // TODO: Implement exceptions.
917
- wp_die('<strong>' . esc_html__('You do not have permission to perform this action.', 'capsman-enhanced') . '</strong>');
918
- }
919
 
920
  if ( isset($_POST['export_backup']) && isset($_POST['pp_capabilities_export_section']) && !empty($_POST['pp_capabilities_export_section'])) {
921
  check_admin_referer('pp-capabilities-backup');
922
 
 
 
 
 
923
 
924
  $export_option = array_map('sanitize_text_field', $_POST['pp_capabilities_export_section']);
925
  $backup_sections = pp_capabilities_backup_sections();
910
  */
911
  function processExport()
912
  {
913
+ global $wpdb;
 
 
 
 
 
914
 
915
  if ( isset($_POST['export_backup']) && isset($_POST['pp_capabilities_export_section']) && !empty($_POST['pp_capabilities_export_section'])) {
916
  check_admin_referer('pp-capabilities-backup');
917
 
918
+ if ((!is_multisite() || !is_super_admin()) && !current_user_can('administrator') && !current_user_can('restore_roles')) {
919
+ // TODO: Implement exceptions.
920
+ wp_die('<strong>' . esc_html__('You do not have permission to perform this action.', 'capsman-enhanced') . '</strong>');
921
+ }
922
 
923
  $export_option = array_map('sanitize_text_field', $_POST['pp_capabilities_export_section']);
924
  $backup_sections = pp_capabilities_backup_sections();
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: user roles, capabilities, permissions, admin menus, post editing, post typ
7
  Requires at least: 4.9.7
8
  Tested up to: 5.9
9
  Requires PHP: 5.6.20
10
- Stable tag: 2.3.5
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -409,10 +409,15 @@ Fixed : Security issue. Please update.
409
 
410
  == Changelog ==
411
 
 
 
 
 
 
412
  = 2.3.5 - 13 Apr 2022 =
413
  * Feature : Export / Import for new features
414
  * Change : Clarify captions on Roles, Backup screens
415
- * Fixed : Multisite: Don't apply Feature Restrictions to Super Administrators unless constant PP_CAPABILITIES_RESTRICT_SUPER_ADMIN is defined
416
  * Fixed : Capabilities could not be updated if third party code executes too early. Now support constant PP_CAPABILITIES_COMPAT_MODE to work around conflicts.
417
  * Fixed : Coding standards - WordPress VIP scan compliance improvements
418
  * Compat : LoginWP - custom redirect failed
7
  Requires at least: 4.9.7
8
  Tested up to: 5.9
9
  Requires PHP: 5.6.20
10
+ Stable tag: 2.3.6
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
409
 
410
  == Changelog ==
411
 
412
+ = 2.3.6 - 14 Apr 2022 =
413
+ * Fixed : Non-administrators cannot access profile screen
414
+ * Compat : WooCommerce - Shop Managers could not access Users
415
+ * Compat : WooCommerce - Editor Feature restrictions did not hide Product Categories, Tags in Classic Editor
416
+
417
  = 2.3.5 - 13 Apr 2022 =
418
  * Feature : Export / Import for new features
419
  * Change : Clarify captions on Roles, Backup screens
420
+ * Fixed : Multisite: Don't apply Feature, Menu Restrictions to Super Administrators unless constant PP_CAPABILITIES_RESTRICT_SUPER_ADMIN is defined
421
  * Fixed : Capabilities could not be updated if third party code executes too early. Now support constant PP_CAPABILITIES_COMPAT_MODE to work around conflicts.
422
  * Fixed : Coding standards - WordPress VIP scan compliance improvements
423
  * Compat : LoginWP - custom redirect failed