Capability Manager Enhanced - Version 2.0.2

Version Description

  • 6 May 2021 =
    • Feature : Multisite - "sync options to all sites" checkbox. Copies "use create_posts capability", Type-Specific Capabilities, Taxonomy-Specific Capabilities, Detailed Taxonomy Capabilities settings
    • Fixed : Multisite - "sync role to all sites" did not work if main site ID is not 1
    • Fixed : Fatal error on Capabilities screen if another plugin calls get_editable_roles() too early
    • Fixed : Add New User - couldn't display password entry
    • Compat : PublishPress - Authors without publish capability could directly publish on the Calendar screen
    • Change : Permissions - Hide / Unhide Role setting moved to Roles screen row actions
Download this release

Release Info

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

Code changes from version 2.0 to 2.0.2

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.0
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com/
9
  * Text Domain: capsman-enhanced
@@ -12,7 +12,7 @@
12
  * Requires PHP: 5.6.20
13
  * License: GPLv3
14
  *
15
- * Copyright (c) 2020 PublishPress
16
  *
17
  * ------------------------------------------------------------------------------
18
  * Based on Capability Manager
@@ -25,13 +25,13 @@
25
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2020 PublishPress
26
  * @license GNU General Public License version 3
27
  * @link https://publishpress.com/
28
- * @version 2.0
29
  */
30
 
31
  if (!defined('CAPSMAN_VERSION')) {
32
- define('CAPSMAN_VERSION', '2.0');
33
- define('CAPSMAN_ENH_VERSION', '2.0');
34
- define('PUBLISHPRESS_CAPS_VERSION', '2.0');
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.0.2
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com/
9
  * Text Domain: capsman-enhanced
12
  * Requires PHP: 5.6.20
13
  * License: GPLv3
14
  *
15
+ * Copyright (c) 2021 PublishPress
16
  *
17
  * ------------------------------------------------------------------------------
18
  * Based on Capability Manager
25
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2020 PublishPress
26
  * @license GNU General Public License version 3
27
  * @link https://publishpress.com/
28
+ * @version 2.0.2
29
  */
30
 
31
  if (!defined('CAPSMAN_VERSION')) {
32
+ define('CAPSMAN_VERSION', '2.0.2');
33
+ define('CAPSMAN_ENH_VERSION', '2.0.2');
34
+ define('PUBLISHPRESS_CAPS_VERSION', '2.0.2');
35
  }
36
 
37
  foreach (get_option('active_plugins') as $plugin_file) {
includes/admin.php CHANGED
@@ -104,7 +104,7 @@ if( defined('PRESSPERMIT_ACTIVE') ) {
104
  <dl>
105
  <dd>
106
  <div style="float:right">
107
- <input type="submit" name="SaveRole" value="<?php _e('Save Changes', 'capsman-enhanced') ?>" class="button-primary" /> &nbsp;
108
  </div>
109
 
110
  <?php
@@ -222,7 +222,8 @@ if( defined('PRESSPERMIT_ACTIVE') ) {
222
  global $wpdb;
223
 
224
  if ( ! empty($_REQUEST['cme_net_sync_role'] ) ) {
225
- switch_to_blog(1);
 
226
  wp_cache_delete( $wpdb->prefix . 'user_roles', 'options' );
227
  }
228
 
@@ -1078,14 +1079,14 @@ if( defined('PRESSPERMIT_ACTIVE') ) {
1078
  </dl>
1079
 
1080
  <?php
1081
- $support_pp_only_roles = ( defined('PRESSPERMIT_ACTIVE') ) ? $pp_ui->pp_only_roles_ui( $default ) : false;
1082
  cme_network_role_ui( $default );
1083
  ?>
1084
 
1085
  <p class="submit">
1086
  <input type="hidden" name="action" value="update" />
1087
  <input type="hidden" name="current" value="<?php echo $default; ?>" />
1088
- <input type="submit" name="SaveRole" value="<?php _e('Save Changes', 'capsman-enhanced') ?>" class="button-primary" /> &nbsp;
1089
 
1090
  <?php if ( current_user_can('administrator') && 'administrator' != $default ) : ?>
1091
  <a class="ak-delete" title="<?php echo esc_attr(__('Delete this role', 'capsman-enhanced')) ?>" href="<?php echo wp_nonce_url("admin.php?page={$this->ID}&amp;action=delete&amp;role={$default}", 'delete-role_' . $default); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete the %s role.\n\n 'Cancel' to stop, 'OK' to delete.", 'capsman-enhanced'), $roles[$default])); ?>') ) { return true;}return false;"><?php _e('Delete Role', 'capsman-enhanced')?></a>
@@ -1169,6 +1170,9 @@ function cme_network_role_ui( $default ) {
1169
  <div>
1170
  <label for="cme_net_sync_role" title="<?php echo esc_attr(__('Copy / update this role definition to all sites now', 'capsman-enhanced'));?>"><input type="checkbox" name="cme_net_sync_role" id="cme_net_sync_role" autocomplete="off" value="1"> <?php _e('sync role to all sites now', 'capsman-enhanced'); ?> </label>
1171
  </div>
 
 
 
1172
  </div>
1173
  <?php
1174
  return true;
104
  <dl>
105
  <dd>
106
  <div style="float:right">
107
+ <input type="submit" name="SaveRole" value="<?php echo (in_array(get_locale(), ['en_EN', 'en_US'])) ? 'Save Capabilities' : _e('Save Changes', 'capsman-enhanced'); ?>" class="button-primary" /> &nbsp;
108
  </div>
109
 
110
  <?php
222
  global $wpdb;
223
 
224
  if ( ! empty($_REQUEST['cme_net_sync_role'] ) ) {
225
+ $main_site_id = (function_exists('get_main_site_id')) ? get_main_site_id() : 1;
226
+ switch_to_blog($main_site_id);
227
  wp_cache_delete( $wpdb->prefix . 'user_roles', 'options' );
228
  }
229
 
1079
  </dl>
1080
 
1081
  <?php
1082
+ $support_pp_only_roles = defined('PRESSPERMIT_ACTIVE');
1083
  cme_network_role_ui( $default );
1084
  ?>
1085
 
1086
  <p class="submit">
1087
  <input type="hidden" name="action" value="update" />
1088
  <input type="hidden" name="current" value="<?php echo $default; ?>" />
1089
+ <input type="submit" name="SaveRole" value="<?php echo (in_array(get_locale(), ['en_EN', 'en_US'])) ? 'Save Capabilities' : _e('Save Changes', 'capsman-enhanced');?>" class="button-primary" /> &nbsp;
1090
 
1091
  <?php if ( current_user_can('administrator') && 'administrator' != $default ) : ?>
1092
  <a class="ak-delete" title="<?php echo esc_attr(__('Delete this role', 'capsman-enhanced')) ?>" href="<?php echo wp_nonce_url("admin.php?page={$this->ID}&amp;action=delete&amp;role={$default}", 'delete-role_' . $default); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete the %s role.\n\n 'Cancel' to stop, 'OK' to delete.", 'capsman-enhanced'), $roles[$default])); ?>') ) { return true;}return false;"><?php _e('Delete Role', 'capsman-enhanced')?></a>
1170
  <div>
1171
  <label for="cme_net_sync_role" title="<?php echo esc_attr(__('Copy / update this role definition to all sites now', 'capsman-enhanced'));?>"><input type="checkbox" name="cme_net_sync_role" id="cme_net_sync_role" autocomplete="off" value="1"> <?php _e('sync role to all sites now', 'capsman-enhanced'); ?> </label>
1172
  </div>
1173
+ <div>
1174
+ <label for="cme_net_sync_options" title="<?php echo esc_attr(__('Copy option settings to all sites now', 'capsman-enhanced'));?>"><input type="checkbox" name="cme_net_sync_options" id="cme_net_sync_options" autocomplete="off" value="1"> <?php _e('sync options to all sites now', 'capsman-enhanced'); ?> </label>
1175
+ </div>
1176
  </div>
1177
  <?php
1178
  return true;
includes/filters-wp_rest_workarounds.php CHANGED
@@ -47,7 +47,9 @@ class WP_REST_Workarounds
47
  */
48
  public function fltPublishCapReplacement($wp_sitecaps, $reqd_caps, $args)
49
  {
50
- if ($this->skip_filtering) {
 
 
51
  return $wp_sitecaps;
52
  }
53
 
47
  */
48
  public function fltPublishCapReplacement($wp_sitecaps, $reqd_caps, $args)
49
  {
50
+ global $pagenow;
51
+
52
+ if ($this->skip_filtering || (!in_array($pagenow, ['post.php', 'post-new.php']) && (!defined('REST_REQUEST') || !constant('REST_REQUEST')))) {
53
  return $wp_sitecaps;
54
  }
55
 
includes/functions-admin.php CHANGED
@@ -21,7 +21,7 @@ class PP_Capabilities_Admin_UI {
21
  }
22
 
23
  if (is_admin() && (isset($_REQUEST['page']) && (in_array($_REQUEST['page'], ['pp-capabilities', 'pp-capabilities-backup', 'pp-capabilities-roles', 'pp-capabilities-admin-menus', 'pp-capabilities-nav-menus', 'pp-capabilities-settings']))
24
- || (!empty($_REQUEST['action']) && in_array($_REQUEST['action'], ['pp-roles-add-role', 'pp-roles-delete-role']))
25
  || ( ! empty($_SERVER['SCRIPT_NAME']) && strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/plugins.php' ) && ! empty($_REQUEST['action'] ) )
26
  || ( isset($_GET['action']) && 'reset-defaults' == $_GET['action'] )
27
  || in_array( $pagenow, array( 'users.php', 'user-edit.php', 'profile.php', 'user-new.php' ) )
@@ -53,6 +53,7 @@ class PP_Capabilities_Admin_UI {
53
  ['jquery'],
54
  CAPSMAN_VERSION
55
  );
 
56
  wp_enqueue_script(
57
  'pp-capabilities-roles-profile-js',
58
  plugin_dir_url(CME_FILE) . 'common/js/profile.js',
@@ -79,7 +80,7 @@ class PP_Capabilities_Admin_UI {
79
  'pp-capabilities-roles-profile-js',
80
  'ppCapabilitiesProfileData',
81
  [
82
- 'selected_roles' => $this->getUsersRoles($userId),
83
  ]
84
  );
85
  }
@@ -88,7 +89,7 @@ class PP_Capabilities_Admin_UI {
88
 
89
  function adminPrintScripts() {
90
  // Counteract overzealous menu icon styling in PublishPress <= 3.2.0 :)
91
- if (defined('PUBLISHPRESS_VERSION') && version_compare(constant('PUBLISHPRESS_VERSION'), '3.2.0', '<=')):?>
92
  <style type="text/css">
93
  #toplevel_page_pp-capabilities .dashicons-before::before, #toplevel_page_pp-capabilities .wp-has-current-submenu .dashicons-before::before {
94
  background-image: inherit !important;
@@ -190,7 +191,10 @@ class PP_Capabilities_Admin_UI {
190
  add_submenu_page('pp-capabilities', __('Admin Menus', 'capsman-enhanced'), __('Admin Menus', 'capsman-enhanced'), $cap_name, 'pp-capabilities-admin-menus', 'cme_fakefunc');
191
  add_submenu_page('pp-capabilities', __('Nav Menus', 'capsman-enhanced'), __('Nav Menus', 'capsman-enhanced'), $cap_name, 'pp-capabilities-nav-menus', 'cme_fakefunc');
192
  add_submenu_page('pp-capabilities', __('Backup', 'capsman-enhanced'), __('Backup', 'capsman-enhanced'), $cap_name, 'pp-capabilities-backup', 'cme_fakefunc');
193
- add_submenu_page('pp-capabilities', __('Settings', 'capsman-enhanced'), __('Settings', 'capsman-enhanced'), $cap_name, 'pp-capabilities-settings', 'cme_fakefunc');
 
 
 
194
 
195
  if (!defined('PUBLISHPRESS_CAPS_PRO_VERSION')) {
196
  add_submenu_page(
21
  }
22
 
23
  if (is_admin() && (isset($_REQUEST['page']) && (in_array($_REQUEST['page'], ['pp-capabilities', 'pp-capabilities-backup', 'pp-capabilities-roles', 'pp-capabilities-admin-menus', 'pp-capabilities-nav-menus', 'pp-capabilities-settings']))
24
+ || (!empty($_REQUEST['action']) && in_array($_REQUEST['action'], ['pp-roles-add-role', 'pp-roles-delete-role', 'pp-roles-hide-role', 'pp-roles-unhide-role']))
25
  || ( ! empty($_SERVER['SCRIPT_NAME']) && strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/plugins.php' ) && ! empty($_REQUEST['action'] ) )
26
  || ( isset($_GET['action']) && 'reset-defaults' == $_GET['action'] )
27
  || in_array( $pagenow, array( 'users.php', 'user-edit.php', 'profile.php', 'user-new.php' ) )
53
  ['jquery'],
54
  CAPSMAN_VERSION
55
  );
56
+
57
  wp_enqueue_script(
58
  'pp-capabilities-roles-profile-js',
59
  plugin_dir_url(CME_FILE) . 'common/js/profile.js',
80
  'pp-capabilities-roles-profile-js',
81
  'ppCapabilitiesProfileData',
82
  [
83
+ 'selected_roles' => ($userId) ? $this->getUsersRoles($userId) : (array) get_option('default_role'),
84
  ]
85
  );
86
  }
89
 
90
  function adminPrintScripts() {
91
  // Counteract overzealous menu icon styling in PublishPress <= 3.2.0 :)
92
+ if (defined('PUBLISHPRESS_VERSION') && version_compare(constant('PUBLISHPRESS_VERSION'), '3.2.0', '<=') && defined('PP_CAPABILITIES_FIX_ADMIN_ICON')):?>
93
  <style type="text/css">
94
  #toplevel_page_pp-capabilities .dashicons-before::before, #toplevel_page_pp-capabilities .wp-has-current-submenu .dashicons-before::before {
95
  background-image: inherit !important;
191
  add_submenu_page('pp-capabilities', __('Admin Menus', 'capsman-enhanced'), __('Admin Menus', 'capsman-enhanced'), $cap_name, 'pp-capabilities-admin-menus', 'cme_fakefunc');
192
  add_submenu_page('pp-capabilities', __('Nav Menus', 'capsman-enhanced'), __('Nav Menus', 'capsman-enhanced'), $cap_name, 'pp-capabilities-nav-menus', 'cme_fakefunc');
193
  add_submenu_page('pp-capabilities', __('Backup', 'capsman-enhanced'), __('Backup', 'capsman-enhanced'), $cap_name, 'pp-capabilities-backup', 'cme_fakefunc');
194
+
195
+ if (defined('PUBLISHPRESS_CAPS_PRO_VERSION')) {
196
+ add_submenu_page('pp-capabilities', __('Settings', 'capsman-enhanced'), __('Settings', 'capsman-enhanced'), $cap_name, 'pp-capabilities-settings', 'cme_fakefunc');
197
+ }
198
 
199
  if (!defined('PUBLISHPRESS_CAPS_PRO_VERSION')) {
200
  add_submenu_page(
includes/handler.php CHANGED
@@ -295,49 +295,76 @@ class CapsmanHandler
295
  update_site_option( 'cme_autocreate_roles', $autocreate_roles );
296
  }
297
 
298
- if ( ! empty($_REQUEST['cme_net_sync_role']) ) {
 
 
 
299
  // loop through all sites on network, creating or updating role def
300
 
301
  global $wpdb, $wp_roles, $blog_id;
302
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id" );
303
  $orig_blog_id = $blog_id;
304
 
305
- $role_caption = $wp_roles->role_names[$role_name];
306
-
307
- $new_caps = ( is_array($caps) ) ? array_map('boolval', $caps) : array();
308
- $new_caps = array_merge($new_caps, ak_level2caps($level) );
309
-
310
- $admin_role = $wp_roles->get_role('administrator');
311
- $main_admin_caps = array_merge( $admin_role->capabilities, ak_level2caps(10) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
313
  foreach ( $blog_ids as $id ) {
314
- if ( 1 == $id )
315
  continue;
316
 
317
  switch_to_blog( $id );
318
- ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
319
-
320
- if ( $blog_role = $wp_roles->get_role( $role_name ) ) {
321
- $stored_role_caps = ( ! empty($blog_role->capabilities) && is_array($blog_role->capabilities) ) ? array_intersect( $blog_role->capabilities, array(true, 1) ) : array();
322
-
323
- $old_caps = array_intersect_key( $stored_role_caps, $this->cm->capabilities);
324
 
325
- // Find caps to add and remove
326
- $add_caps = array_diff_key($new_caps, $old_caps);
327
- $del_caps = array_intersect_key( array_diff_key($old_caps, $new_caps), $main_admin_caps ); // don't mess with caps that are totally unused on main site
328
 
329
- // Add new capabilities to role
330
- foreach ( $add_caps as $cap => $grant ) {
331
- $blog_role->add_cap( $cap, $grant );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  }
 
333
 
334
- // Remove capabilities from role
335
- foreach ( $del_caps as $cap => $grant) {
336
- $blog_role->remove_cap($cap);
337
- }
338
-
339
- } else {
340
- $wp_roles->add_role( $role_name, $role_caption, $new_caps );
341
  }
342
 
343
  restore_current_blog();
295
  update_site_option( 'cme_autocreate_roles', $autocreate_roles );
296
  }
297
 
298
+ $do_role_sync = !empty($_REQUEST['cme_net_sync_role']);
299
+ $do_option_sync = !empty($_REQUEST['cme_net_sync_options']);
300
+
301
+ if ($do_role_sync || $do_option_sync) {
302
  // loop through all sites on network, creating or updating role def
303
 
304
  global $wpdb, $wp_roles, $blog_id;
305
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs ORDER BY blog_id" );
306
  $orig_blog_id = $blog_id;
307
 
308
+ if ($do_role_sync) {
309
+ $role_caption = $wp_roles->role_names[$role_name];
310
+
311
+ $new_caps = ( is_array($caps) ) ? array_map('boolval', $caps) : array();
312
+ $new_caps = array_merge($new_caps, ak_level2caps($level) );
313
+
314
+ $admin_role = $wp_roles->get_role('administrator');
315
+ $main_admin_caps = array_merge( $admin_role->capabilities, ak_level2caps(10) );
316
+ }
317
+
318
+ $sync_options = [];
319
+
320
+ if ($do_option_sync) {
321
+ // capability-related options
322
+ $pp_prefix = (defined('PPC_VERSION') && !defined('PRESSPERMIT_VERSION')) ? 'pp' : 'presspermit';
323
+
324
+ foreach(['define_create_posts_cap', 'enabled_post_types', 'enabled_taxonomies'] as $option_name) {
325
+ $sync_options["{$pp_prefix}_$option_name"] = get_option("{$pp_prefix}_$option_name");
326
+ }
327
+
328
+ $sync_options['cme_detailed_taxonomies'] = get_option('cme_detailed_taxonomies');
329
+ $sync_options['cme_enabled_post_types'] = get_option('cme_enabled_post_types');
330
+ $sync_options['presspermit_supplemental_role_defs'] = get_option('presspermit_supplemental_role_defs');
331
+ }
332
 
333
  foreach ( $blog_ids as $id ) {
334
+ if ( is_main_site($id) )
335
  continue;
336
 
337
  switch_to_blog( $id );
 
 
 
 
 
 
338
 
339
+ if ($do_role_sync) {
340
+ ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
 
341
 
342
+ if ( $blog_role = $wp_roles->get_role( $role_name ) ) {
343
+ $stored_role_caps = ( ! empty($blog_role->capabilities) && is_array($blog_role->capabilities) ) ? array_intersect( $blog_role->capabilities, array(true, 1) ) : array();
344
+
345
+ $old_caps = array_intersect_key( $stored_role_caps, $this->cm->capabilities);
346
+
347
+ // Find caps to add and remove
348
+ $add_caps = array_diff_key($new_caps, $old_caps);
349
+ $del_caps = array_intersect_key( array_diff_key($old_caps, $new_caps), $main_admin_caps ); // don't mess with caps that are totally unused on main site
350
+
351
+ // Add new capabilities to role
352
+ foreach ( $add_caps as $cap => $grant ) {
353
+ $blog_role->add_cap( $cap, $grant );
354
+ }
355
+
356
+ // Remove capabilities from role
357
+ foreach ( $del_caps as $cap => $grant) {
358
+ $blog_role->remove_cap($cap);
359
+ }
360
+
361
+ } else {
362
+ $wp_roles->add_role( $role_name, $role_caption, $new_caps );
363
  }
364
+ }
365
 
366
+ foreach($sync_options as $option_name => $option_val) {
367
+ update_option($option_name, $option_val);
 
 
 
 
 
368
  }
369
 
370
  restore_current_blog();
includes/manager.php CHANGED
@@ -151,7 +151,12 @@ class CapabilityManager
151
  add_action('init', [$this, 'initRolesAdmin']);
152
 
153
  add_action('wp_ajax_pp-roles-add-role', [$this, 'handleRolesAjax']);
154
- add_action('wp_ajax_pp-roles-delete-role', [$this, 'handleRolesAjax']);
 
 
 
 
 
155
  }
156
 
157
  /**
@@ -423,14 +428,18 @@ class CapabilityManager
423
  */
424
  function filterEditRoles ( $roles )
425
  {
426
- $this->generateNames();
427
- $valid = array_keys($this->roles);
428
 
429
- foreach ( $roles as $role => $caps ) {
430
- if ( ! in_array($role, $valid) ) {
431
- unset($roles[$role]);
432
- }
433
- }
 
 
 
 
 
434
 
435
  return $roles;
436
  }
151
  add_action('init', [$this, 'initRolesAdmin']);
152
 
153
  add_action('wp_ajax_pp-roles-add-role', [$this, 'handleRolesAjax']);
154
+ add_action('wp_ajax_pp-roles-delete-role', [$this, 'handleRolesAjax']);
155
+
156
+ if (defined('PRESSPERMIT_VERSION')) {
157
+ add_action('wp_ajax_pp-roles-hide-role', [$this, 'handleRolesAjax']);
158
+ add_action('wp_ajax_pp-roles-unhide-role', [$this, 'handleRolesAjax']);
159
+ }
160
  }
161
 
162
  /**
428
  */
429
  function filterEditRoles ( $roles )
430
  {
431
+ global $current_user;
 
432
 
433
+ if (function_exists('wp_get_current_user')) { // Avoid downstream fatal error from premature current_user_can() call if get_editable_roles() is called too early
434
+ $this->generateNames();
435
+ $valid = array_keys($this->roles);
436
+
437
+ foreach ( $roles as $role => $caps ) {
438
+ if ( ! in_array($role, $valid) ) {
439
+ unset($roles[$role]);
440
+ }
441
+ }
442
+ }
443
 
444
  return $roles;
445
  }
includes/network.php CHANGED
@@ -6,7 +6,9 @@ function _cme_new_blog( $new_blog_id ) {
6
 
7
  $restore_blog_id = $blog_id;
8
 
9
- switch_to_blog( 1 );
 
 
10
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
11
 
12
  $main_site_caps = array();
6
 
7
  $restore_blog_id = $blog_id;
8
 
9
+ $main_site_id = (function_exists('get_main_site_id')) ? get_main_site_id() : 1;
10
+
11
+ switch_to_blog($main_site_id);
12
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
13
 
14
  $main_site_caps = array();
includes/roles/class/class-pp-roles-actions.php CHANGED
@@ -19,6 +19,8 @@ class Pp_Roles_Actions
19
  protected $actions = [
20
  'pp-roles-add-role',
21
  'pp-roles-delete-role',
 
 
22
  ];
23
 
24
  /**
@@ -117,6 +119,7 @@ class Pp_Roles_Actions
117
  if ($redirect) {
118
  $redirect_url = wp_get_referer();
119
  $redirect_url = wp_get_raw_referer();
 
120
  if (empty($redirect_url)) {
121
  $params = [
122
  'page' => 'pp-capabilities-roles',
@@ -297,6 +300,7 @@ class Pp_Roles_Actions
297
  }
298
 
299
  $default = get_option('default_role');
 
300
  if ( $default == $role ) {
301
  //ak_admin_error(sprintf(__('Cannot delete default role. You <a href="%s">have to change it first</a>.', 'capsman-enhanced'), 'options-general.php'));
302
  $this->notify(__('Cannot delete default role. You <a href="%s">have to change it first</a>.', 'capsman-enhanced'), 'options-general.php');
@@ -308,6 +312,7 @@ class Pp_Roles_Actions
308
  */
309
  if (!$allow_system_role_deletion) {
310
  foreach ($roles as $key => $role) {
 
311
  if ($this->manager->is_system_role($role)) {
312
  unset($roles[$key]);
313
  }
@@ -364,4 +369,126 @@ class Pp_Roles_Actions
364
  $this->notify(_('The role could not be deleted.', 'capsman-enhanced'));
365
  }
366
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  }
19
  protected $actions = [
20
  'pp-roles-add-role',
21
  'pp-roles-delete-role',
22
+ 'pp-roles-hide-role',
23
+ 'pp-roles-unhide-role',
24
  ];
25
 
26
  /**
119
  if ($redirect) {
120
  $redirect_url = wp_get_referer();
121
  $redirect_url = wp_get_raw_referer();
122
+
123
  if (empty($redirect_url)) {
124
  $params = [
125
  'page' => 'pp-capabilities-roles',
300
  }
301
 
302
  $default = get_option('default_role');
303
+
304
  if ( $default == $role ) {
305
  //ak_admin_error(sprintf(__('Cannot delete default role. You <a href="%s">have to change it first</a>.', 'capsman-enhanced'), 'options-general.php'));
306
  $this->notify(__('Cannot delete default role. You <a href="%s">have to change it first</a>.', 'capsman-enhanced'), 'options-general.php');
312
  */
313
  if (!$allow_system_role_deletion) {
314
  foreach ($roles as $key => $role) {
315
+
316
  if ($this->manager->is_system_role($role)) {
317
  unset($roles[$key]);
318
  }
369
  $this->notify(_('The role could not be deleted.', 'capsman-enhanced'));
370
  }
371
  }
372
+
373
+ /**
374
+ * Hide role action
375
+ */
376
+ public function hide_role($role = '', $args = [])
377
+ {
378
+ if (!defined('PRESSPERMIT_ACTIVE')) {
379
+ return;
380
+ }
381
+
382
+ if (empty($role)) {
383
+ $role = (isset($_REQUEST['role'])) ? $_REQUEST['role'] : '';
384
+ }
385
+
386
+ /**
387
+ * Check capabilities
388
+ */
389
+ $this->check_permissions();
390
+
391
+ /**
392
+ * Validate input data
393
+ */
394
+ $roles = [];
395
+ if ($role) {
396
+ if (is_string($role)) {
397
+ $input = sanitize_text_field($role);
398
+ $roles[] = $input;
399
+ } else if (is_array($role)) {
400
+ foreach ($role as $key => $id) {
401
+ $roles[] = sanitize_text_field($id);
402
+ }
403
+ }
404
+ } else {
405
+ return;
406
+ }
407
+
408
+ /**
409
+ * If no roles provided return
410
+ */
411
+ if (empty($roles)) {
412
+ $out = __('Missing parameters, refresh the page and try again.', 'capsman-enhanced');
413
+ $this->notify($out);
414
+ }
415
+
416
+ $pp_only = (array) pp_capabilities_get_permissions_option( 'supplemental_role_defs' );
417
+ $pp_only = array_merge($pp_only, (array) $roles);
418
+ pp_capabilities_update_permissions_option('supplemental_role_defs', $pp_only);
419
+
420
+ $role_name = (wp_roles()->is_role($roles[0])) ? wp_roles()->role_names[$roles[0]] : $roles[0];
421
+
422
+ $out = sprintf(
423
+ __('The role %1$s was successfully hidden.', 'capsman-enhanced'),
424
+ '<strong>' . $roles[0] . '</strong>'
425
+ );
426
+
427
+ if ($this->is_ajax()) {
428
+ wp_send_json_success($out);
429
+ } else {
430
+ $this->notify($out, 'success');
431
+ }
432
+ }
433
+
434
+ /**
435
+ * Unhide role action
436
+ */
437
+ public function unhide_role($role = '', $args = [])
438
+ {
439
+ if (!defined('PRESSPERMIT_ACTIVE')) {
440
+ return;
441
+ }
442
+
443
+ if (empty($role)) {
444
+ $role = (isset($_REQUEST['role'])) ? $_REQUEST['role'] : '';
445
+ }
446
+
447
+ /**
448
+ * Check capabilities
449
+ */
450
+ $this->check_permissions();
451
+
452
+ /**
453
+ * Validate input data
454
+ */
455
+ $roles = [];
456
+ if ($role) {
457
+ if (is_string($role)) {
458
+ $input = sanitize_text_field($role);
459
+ $roles[] = $input;
460
+ } else if (is_array($role)) {
461
+ foreach ($role as $key => $id) {
462
+ $roles[] = sanitize_text_field($id);
463
+ }
464
+ }
465
+ } else {
466
+ return;
467
+ }
468
+
469
+ /**
470
+ * If no roles provided return
471
+ */
472
+ if (empty($roles)) {
473
+ $out = __('Missing parameters, refresh the page and try again.', 'capsman-enhanced');
474
+ $this->notify($out);
475
+ }
476
+
477
+ $pp_only = (array) pp_capabilities_get_permissions_option( 'supplemental_role_defs' );
478
+ $pp_only = array_diff($pp_only, (array) $roles);
479
+ pp_capabilities_update_permissions_option('supplemental_role_defs', $pp_only);
480
+
481
+ $role_name = (wp_roles()->is_role($roles[0])) ? wp_roles()->role_names[$roles[0]] : $roles[0];
482
+
483
+ $out = sprintf(
484
+ __('The role %1$s was successfully unhidden.', 'capsman-enhanced'),
485
+ '<strong>' . $roles[0] . '</strong>'
486
+ );
487
+
488
+ if ($this->is_ajax()) {
489
+ wp_send_json_success($out);
490
+ } else {
491
+ $this->notify($out, 'success');
492
+ }
493
+ }
494
  }
includes/roles/class/class-pp-roles-list-table.php CHANGED
@@ -68,12 +68,6 @@ class PP_Capabilities_Roles_List_Table extends WP_List_Table
68
  echo '</tr>';
69
  }
70
 
71
- /*
72
- function get_primary_column_name() {
73
- return 'name';
74
- }
75
- */
76
-
77
  /**
78
  * Get list table columns
79
  *
@@ -135,6 +129,28 @@ class PP_Capabilities_Roles_List_Table extends WP_List_Table
135
  $actions = [
136
  'edit' => '<span class="pp-caps-action-note">' . __('(non-editable role)', 'capsman-enhanced') . '</span>',
137
  ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
 
140
  if (!$this->manager->is_system_role($item['role']) && ($this->default_role != $item['role']) && pp_capabilities_is_editable_role($item['role'])) {
@@ -152,6 +168,28 @@ class PP_Capabilities_Roles_List_Table extends WP_List_Table
152
  __('Delete', 'capsman-enhanced')
153
  ),
154
  ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  }
156
 
157
  return $column_name === $primary ? $this->row_actions($actions, false) : '';
68
  echo '</tr>';
69
  }
70
 
 
 
 
 
 
 
71
  /**
72
  * Get list table columns
73
  *
129
  $actions = [
130
  'edit' => '<span class="pp-caps-action-note">' . __('(non-editable role)', 'capsman-enhanced') . '</span>',
131
  ];
132
+
133
+ if (defined("PRESSPERMIT_ACTIVE")) {
134
+ static $pp_only;
135
+
136
+ if (!isset($pp_only)) {
137
+ $pp_only = (array) pp_capabilities_get_permissions_option('supplemental_role_defs');
138
+ }
139
+
140
+ if (in_array($item['role'], $pp_only)) {
141
+ $actions['unhide'] = sprintf(
142
+ '<a href="%s" class="hide-role">%s</a>',
143
+ add_query_arg([
144
+ 'page' => 'pp-capabilities-roles',
145
+ 'action' => 'pp-roles-unhide-role',
146
+ 'role' => esc_attr($item['role']),
147
+ '_wpnonce' => wp_create_nonce('bulk-roles')
148
+ ],
149
+ admin_url('admin.php')),
150
+ __('Unhide', 'capsman-enhanced')
151
+ );
152
+ }
153
+ }
154
  }
155
 
156
  if (!$this->manager->is_system_role($item['role']) && ($this->default_role != $item['role']) && pp_capabilities_is_editable_role($item['role'])) {
168
  __('Delete', 'capsman-enhanced')
169
  ),
170
  ]);
171
+
172
+ if (defined("PRESSPERMIT_ACTIVE")) {
173
+ static $pp_only;
174
+
175
+ if (!isset($pp_only)) {
176
+ $pp_only = (array) pp_capabilities_get_permissions_option('supplemental_role_defs');
177
+ }
178
+
179
+ if (!in_array($item['role'], $pp_only)) {
180
+ $actions['hide'] = sprintf(
181
+ '<a href="%s" class="hide-role">%s</a>',
182
+ add_query_arg([
183
+ 'page' => 'pp-capabilities-roles',
184
+ 'action' => 'pp-roles-hide-role',
185
+ 'role' => esc_attr($item['role']),
186
+ '_wpnonce' => wp_create_nonce('bulk-roles')
187
+ ],
188
+ admin_url('admin.php')),
189
+ __('Hide', 'capsman-enhanced')
190
+ );
191
+ }
192
+ }
193
  }
194
 
195
  return $column_name === $primary ? $this->row_actions($actions, false) : '';
languages/capsman-enhanced-en_US.mo CHANGED
Binary file
languages/capsman-enhanced-en_US.po CHANGED
@@ -2,9 +2,9 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: PublishPress Capabilities\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2021-02-03 12:15-0500\n"
6
- "PO-Revision-Date: 2021-02-03 12:15-0500\n"
7
- "Last-Translator: PublishPress <help@publishpress.com>\n"
8
  "Language-Team: PublishPress <help@publishpress.com>\n"
9
  "Language: en_US\n"
10
  "MIME-Version: 1.0\n"
@@ -57,25 +57,37 @@ msgstr ""
57
  msgid "Nav Menus"
58
  msgstr ""
59
 
60
- #: includes-core/admin-menus-promo.php:35
61
  msgid "Admin Menu Restrictions"
62
  msgstr ""
63
 
64
- #: includes-core/admin-menus-promo.php:47
 
 
 
 
 
65
  msgid ""
66
- "Note: You are only restricting access to admin menu screens. Some plugins "
67
- "may also add features to other areas of WordPress."
68
  msgstr ""
69
 
70
- #: includes-core/admin-menus-promo.php:64 includes-core/nav-menus-promo.php:58
71
- #: includes/admin.php:99 includes/admin.php:1078 includes/settings.php:54
72
- msgid "Save Changes"
 
73
  msgstr ""
74
 
75
- #: includes-core/nav-menus-promo.php:35
76
  msgid "Navigation Menu Restrictions"
77
  msgstr ""
78
 
 
 
 
 
 
 
79
  #: includes/admin.php:38
80
  #, php-format
81
  msgid ""
@@ -311,15 +323,15 @@ msgid ""
311
  "capabilities."
312
  msgstr ""
313
 
314
- #: includes/admin.php:1058
315
- msgid "Role Level:"
316
  msgstr ""
317
 
318
- #: includes/admin.php:1081
319
  msgid "Delete this role"
320
  msgstr ""
321
 
322
- #: includes/admin.php:1081
323
  #, php-format
324
  msgid ""
325
  "You are about to delete the %s role.\n"
@@ -327,68 +339,68 @@ msgid ""
327
  " 'Cancel' to stop, 'OK' to delete."
328
  msgstr ""
329
 
330
- #: includes/admin.php:1081
331
  msgid "Delete Role"
332
  msgstr ""
333
 
334
- #: includes/admin.php:1090
335
  msgid "Add Capability"
336
  msgstr ""
337
 
338
- #: includes/admin.php:1093
339
  msgid "Add to role"
340
  msgstr ""
341
 
342
- #: includes/admin.php:1105
343
  msgid "Copy this role to"
344
  msgstr ""
345
 
346
- #: includes/admin.php:1108
347
  msgid "Role Name"
348
  msgstr ""
349
 
350
- #: includes/admin.php:1111 includes/pp-ui.php:84
351
  msgid ""
352
  "Make role available for supplemental assignment to Permission Groups only"
353
  msgstr ""
354
 
355
- #: includes/admin.php:1111
356
  msgid "hidden"
357
  msgstr ""
358
 
359
- #: includes/admin.php:1115
360
  msgid "Copy"
361
  msgstr ""
362
 
363
- #: includes/admin.php:1121
364
  msgid "Rename Role"
365
  msgstr ""
366
 
367
- #: includes/admin.php:1123
368
  msgid "New Role Name"
369
  msgstr ""
370
 
371
- #: includes/admin.php:1126
372
  msgid "Rename"
373
  msgstr ""
374
 
375
- #: includes/admin.php:1157
376
  msgid "Create this role definition in new (future) sites"
377
  msgstr ""
378
 
379
- #: includes/admin.php:1157
380
  msgid "include in new sites"
381
  msgstr ""
382
 
383
- #: includes/admin.php:1160
384
  msgid "Copy / update this role definition to all sites now"
385
  msgstr ""
386
 
387
- #: includes/admin.php:1160
388
  msgid "sync role to all sites now"
389
  msgstr ""
390
 
391
- #: includes/backup-handler.php:9 includes/manager.php:708
392
  msgid "You do not have permission to restore roles."
393
  msgstr ""
394
 
@@ -431,7 +443,7 @@ msgid "Restore"
431
  msgstr ""
432
 
433
  #: includes/backup.php:47 includes/functions-admin.php:39
434
- #: includes/manager.php:332
435
  msgid "Backup"
436
  msgstr ""
437
 
@@ -586,25 +598,20 @@ msgstr ""
586
  msgid "Edit Roles"
587
  msgstr ""
588
 
589
- #: includes/functions-admin.php:14 includes/manager.php:296
590
  #: includes/roles/class/class-pp-roles-list-table.php:120
591
  msgid "Capabilities"
592
  msgstr ""
593
 
594
- #: includes/functions-admin.php:36 includes/manager.php:318
595
  #: includes/roles/roles.php:4
596
  msgid "Roles"
597
  msgstr ""
598
 
599
- #: includes/functions-admin.php:40 includes/manager.php:335
600
  msgid "Settings"
601
  msgstr ""
602
 
603
- #: includes/functions-admin.php:45 includes/functions-admin.php:46
604
- #: includes/manager.php:341 includes/manager.php:342
605
- msgid "Upgrade to Pro"
606
- msgstr ""
607
-
608
  #: includes/handler.php:23 includes/handler.php:49
609
  msgid "New role created."
610
  msgstr ""
@@ -645,88 +652,88 @@ msgstr ""
645
  msgid "Role has been deleted. %1$d users moved to default role %2$s."
646
  msgstr ""
647
 
648
- #: includes/manager.php:181
649
  msgid "Explicity negate this capability by storing as disabled"
650
  msgstr ""
651
 
652
- #: includes/manager.php:182
653
  msgid "Explicitly negate these capabilities by storing as disabled"
654
  msgstr ""
655
 
656
- #: includes/manager.php:183
657
  msgid "Post type registration does not define this capability distinctly"
658
  msgstr ""
659
 
660
- #: includes/manager.php:184
661
  msgid "This capability is explicitly negated. Click to add/remove normally."
662
  msgstr ""
663
 
664
- #: includes/manager.php:185
665
  msgid "Add or remove this capability from the WordPress role"
666
  msgstr ""
667
 
668
- #: includes/manager.php:186
669
  msgid "Add or remove capability from the role normally"
670
  msgstr ""
671
 
672
- #: includes/manager.php:359
673
  #: includes/roles/class/class-pp-roles-list-table.php:77
674
  msgid "Role"
675
  msgstr ""
676
 
677
- #: includes/manager.php:360
678
  #: includes/roles/class/class-pp-roles-list-table.php:78
679
  #: includes/roles/roles.php:33
680
  msgid "Name"
681
  msgstr ""
682
 
683
- #: includes/manager.php:361
684
  #: includes/roles/class/class-pp-roles-list-table.php:79
685
  msgid "Users"
686
  msgstr ""
687
 
688
- #: includes/manager.php:388
689
  msgid "You do not have permission to manage roles."
690
  msgstr ""
691
 
692
- #: includes/manager.php:494 includes/manager.php:535
693
  msgid "You do not have permission to manage capabilities."
694
  msgstr ""
695
 
696
- #: includes/manager.php:549
697
  msgid "New capability added to role."
698
  msgstr ""
699
 
700
- #: includes/manager.php:588
701
  msgid "Bad form Received"
702
  msgstr ""
703
 
704
- #: includes/manager.php:738
705
  #, php-format
706
  msgid "If you like %s, please leave us a %s rating. Thank you!"
707
  msgstr ""
708
 
709
- #: includes/manager.php:749
710
  msgid "About PublishPress Capabilities"
711
  msgstr ""
712
 
713
- #: includes/manager.php:749
714
  msgid "About"
715
  msgstr ""
716
 
717
- #: includes/manager.php:751
718
  msgid "Capabilites Documentation"
719
  msgstr ""
720
 
721
- #: includes/manager.php:751
722
  msgid "Documentation"
723
  msgstr ""
724
 
725
- #: includes/manager.php:753
726
  msgid "Contact the PublishPress team"
727
  msgstr ""
728
 
729
- #: includes/manager.php:753
730
  msgid "Contact"
731
  msgstr ""
732
 
@@ -861,7 +868,7 @@ msgstr ""
861
  msgid "Search Roles"
862
  msgstr ""
863
 
864
- #: includes/roles/roles.php:25 includes/roles/roles.php:40
865
  msgid "Add New Role"
866
  msgstr ""
867
 
@@ -869,6 +876,10 @@ msgstr ""
869
  msgid "The name is how it appears on your site."
870
  msgstr ""
871
 
 
 
 
 
872
  #: includes/roles/roles.php:52
873
  msgid "Description here."
874
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: PublishPress Capabilities\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2021-05-06 13:51-0400\n"
6
+ "PO-Revision-Date: 2021-05-06 13:51-0400\n"
7
+ "Last-Translator: Kevin Behrens <kevin@publishpress.com>\n"
8
  "Language-Team: PublishPress <help@publishpress.com>\n"
9
  "Language: en_US\n"
10
  "MIME-Version: 1.0\n"
57
  msgid "Nav Menus"
58
  msgstr ""
59
 
60
+ #: includes-core/admin-menus-promo.php:29
61
  msgid "Admin Menu Restrictions"
62
  msgstr ""
63
 
64
+ #: includes-core/admin-menus-promo.php:48 includes-core/nav-menus-promo.php:52
65
+ #: includes/admin.php:99 includes/admin.php:1079 includes/settings.php:54
66
+ msgid "Save Changes"
67
+ msgstr ""
68
+
69
+ #: includes-core/admin-menus-promo.php:58
70
  msgid ""
71
+ "You can restrict access to admin menu screens. This feature is available in "
72
+ "PublishPress Capabilities Pro"
73
  msgstr ""
74
 
75
+ #: includes-core/admin-menus-promo.php:62 includes-core/nav-menus-promo.php:67
76
+ #: includes/functions-admin.php:45 includes/functions-admin.php:46
77
+ #: includes/manager.php:334 includes/manager.php:335
78
+ msgid "Upgrade to Pro"
79
  msgstr ""
80
 
81
+ #: includes-core/nav-menus-promo.php:29
82
  msgid "Navigation Menu Restrictions"
83
  msgstr ""
84
 
85
+ #: includes-core/nav-menus-promo.php:63
86
+ msgid ""
87
+ "You can restrict access to navigation menus. This feature is available in "
88
+ "PublishPress Capabilities Pro"
89
+ msgstr ""
90
+
91
  #: includes/admin.php:38
92
  #, php-format
93
  msgid ""
323
  "capabilities."
324
  msgstr ""
325
 
326
+ #: includes/admin.php:1059
327
+ msgid "Level:"
328
  msgstr ""
329
 
330
+ #: includes/admin.php:1082
331
  msgid "Delete this role"
332
  msgstr ""
333
 
334
+ #: includes/admin.php:1082
335
  #, php-format
336
  msgid ""
337
  "You are about to delete the %s role.\n"
339
  " 'Cancel' to stop, 'OK' to delete."
340
  msgstr ""
341
 
342
+ #: includes/admin.php:1082
343
  msgid "Delete Role"
344
  msgstr ""
345
 
346
+ #: includes/admin.php:1091
347
  msgid "Add Capability"
348
  msgstr ""
349
 
350
+ #: includes/admin.php:1094
351
  msgid "Add to role"
352
  msgstr ""
353
 
354
+ #: includes/admin.php:1106
355
  msgid "Copy this role to"
356
  msgstr ""
357
 
358
+ #: includes/admin.php:1109
359
  msgid "Role Name"
360
  msgstr ""
361
 
362
+ #: includes/admin.php:1112 includes/pp-ui.php:84
363
  msgid ""
364
  "Make role available for supplemental assignment to Permission Groups only"
365
  msgstr ""
366
 
367
+ #: includes/admin.php:1112
368
  msgid "hidden"
369
  msgstr ""
370
 
371
+ #: includes/admin.php:1116
372
  msgid "Copy"
373
  msgstr ""
374
 
375
+ #: includes/admin.php:1122
376
  msgid "Rename Role"
377
  msgstr ""
378
 
379
+ #: includes/admin.php:1124
380
  msgid "New Role Name"
381
  msgstr ""
382
 
383
+ #: includes/admin.php:1127
384
  msgid "Rename"
385
  msgstr ""
386
 
387
+ #: includes/admin.php:1158
388
  msgid "Create this role definition in new (future) sites"
389
  msgstr ""
390
 
391
+ #: includes/admin.php:1158
392
  msgid "include in new sites"
393
  msgstr ""
394
 
395
+ #: includes/admin.php:1161
396
  msgid "Copy / update this role definition to all sites now"
397
  msgstr ""
398
 
399
+ #: includes/admin.php:1161
400
  msgid "sync role to all sites now"
401
  msgstr ""
402
 
403
+ #: includes/backup-handler.php:9 includes/manager.php:701
404
  msgid "You do not have permission to restore roles."
405
  msgstr ""
406
 
443
  msgstr ""
444
 
445
  #: includes/backup.php:47 includes/functions-admin.php:39
446
+ #: includes/manager.php:325
447
  msgid "Backup"
448
  msgstr ""
449
 
598
  msgid "Edit Roles"
599
  msgstr ""
600
 
601
+ #: includes/functions-admin.php:14 includes/manager.php:289
602
  #: includes/roles/class/class-pp-roles-list-table.php:120
603
  msgid "Capabilities"
604
  msgstr ""
605
 
606
+ #: includes/functions-admin.php:36 includes/manager.php:311
607
  #: includes/roles/roles.php:4
608
  msgid "Roles"
609
  msgstr ""
610
 
611
+ #: includes/functions-admin.php:40 includes/manager.php:328
612
  msgid "Settings"
613
  msgstr ""
614
 
 
 
 
 
 
615
  #: includes/handler.php:23 includes/handler.php:49
616
  msgid "New role created."
617
  msgstr ""
652
  msgid "Role has been deleted. %1$d users moved to default role %2$s."
653
  msgstr ""
654
 
655
+ #: includes/manager.php:174
656
  msgid "Explicity negate this capability by storing as disabled"
657
  msgstr ""
658
 
659
+ #: includes/manager.php:175
660
  msgid "Explicitly negate these capabilities by storing as disabled"
661
  msgstr ""
662
 
663
+ #: includes/manager.php:176
664
  msgid "Post type registration does not define this capability distinctly"
665
  msgstr ""
666
 
667
+ #: includes/manager.php:177
668
  msgid "This capability is explicitly negated. Click to add/remove normally."
669
  msgstr ""
670
 
671
+ #: includes/manager.php:178
672
  msgid "Add or remove this capability from the WordPress role"
673
  msgstr ""
674
 
675
+ #: includes/manager.php:179
676
  msgid "Add or remove capability from the role normally"
677
  msgstr ""
678
 
679
+ #: includes/manager.php:352
680
  #: includes/roles/class/class-pp-roles-list-table.php:77
681
  msgid "Role"
682
  msgstr ""
683
 
684
+ #: includes/manager.php:353
685
  #: includes/roles/class/class-pp-roles-list-table.php:78
686
  #: includes/roles/roles.php:33
687
  msgid "Name"
688
  msgstr ""
689
 
690
+ #: includes/manager.php:354
691
  #: includes/roles/class/class-pp-roles-list-table.php:79
692
  msgid "Users"
693
  msgstr ""
694
 
695
+ #: includes/manager.php:381
696
  msgid "You do not have permission to manage roles."
697
  msgstr ""
698
 
699
+ #: includes/manager.php:487 includes/manager.php:528
700
  msgid "You do not have permission to manage capabilities."
701
  msgstr ""
702
 
703
+ #: includes/manager.php:542
704
  msgid "New capability added to role."
705
  msgstr ""
706
 
707
+ #: includes/manager.php:581
708
  msgid "Bad form Received"
709
  msgstr ""
710
 
711
+ #: includes/manager.php:731
712
  #, php-format
713
  msgid "If you like %s, please leave us a %s rating. Thank you!"
714
  msgstr ""
715
 
716
+ #: includes/manager.php:742
717
  msgid "About PublishPress Capabilities"
718
  msgstr ""
719
 
720
+ #: includes/manager.php:742
721
  msgid "About"
722
  msgstr ""
723
 
724
+ #: includes/manager.php:744
725
  msgid "Capabilites Documentation"
726
  msgstr ""
727
 
728
+ #: includes/manager.php:744
729
  msgid "Documentation"
730
  msgstr ""
731
 
732
+ #: includes/manager.php:746
733
  msgid "Contact the PublishPress team"
734
  msgstr ""
735
 
736
+ #: includes/manager.php:746
737
  msgid "Contact"
738
  msgstr ""
739
 
868
  msgid "Search Roles"
869
  msgstr ""
870
 
871
+ #: includes/roles/roles.php:25
872
  msgid "Add New Role"
873
  msgstr ""
874
 
876
  msgid "The name is how it appears on your site."
877
  msgstr ""
878
 
879
+ #: includes/roles/roles.php:40
880
+ msgid "Add"
881
+ msgstr ""
882
+
883
  #: includes/roles/roles.php:52
884
  msgid "Description here."
885
  msgstr ""
languages/capsman-enhanced.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PublishPress Capabilities\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2021-02-03 11:36-0500\n"
7
  "PO-Revision-Date: 2020-10-08 11:17-0500\n"
8
  "Last-Translator: Kevin Behrens <kevin@publishpress.com>\n"
9
  "Language-Team: PublishPress <help@publishpress.com>\n"
@@ -27,16 +27,16 @@ msgstr ""
27
  msgid "<strong>This plugin can be deleted.</strong>"
28
  msgstr ""
29
 
30
- #: capsman-enhanced.php:102
31
  msgid "Warning:"
32
  msgstr ""
33
 
34
- #: capsman-enhanced.php:103
35
  #, php-format
36
  msgid "The active plugin %s is not compatible with your PHP version."
37
  msgstr ""
38
 
39
- #: capsman-enhanced.php:105
40
  #, php-format
41
  msgid "%s is required for this plugin."
42
  msgstr ""
@@ -45,245 +45,252 @@ msgstr ""
45
  msgid "Settings saved."
46
  msgstr ""
47
 
48
- #: includes-core/CoreAdmin.php:55 includes/functions-admin.php:37
49
  msgid "Admin Menus"
50
  msgstr ""
51
 
52
- #: includes-core/CoreAdmin.php:56 includes/functions-admin.php:38
53
  msgid "Nav Menus"
54
  msgstr ""
55
 
56
- #: includes-core/admin-menus-promo.php:35
57
  msgid "Admin Menu Restrictions"
58
  msgstr ""
59
 
60
- #: includes-core/admin-menus-promo.php:47
61
- msgid "Note: You are only restricting access to admin menu screens. Some plugins may also add features to other areas of WordPress."
 
62
  msgstr ""
63
 
64
- #: includes-core/admin-menus-promo.php:64 includes-core/nav-menus-promo.php:58
65
- #: includes/admin.php:99 includes/admin.php:1078 includes/settings.php:54
66
- msgid "Save Changes"
67
  msgstr ""
68
 
69
- #: includes-core/nav-menus-promo.php:35
 
 
 
 
 
 
70
  msgid "Navigation Menu Restrictions"
71
  msgstr ""
72
 
 
 
 
 
73
  #: includes/admin.php:38
74
  #, php-format
75
  msgid "Warning: This role cannot access the dashboard without the read capability. %1$sClick here to fix this now%2$s."
76
  msgstr ""
77
 
78
- #: includes/admin.php:64
79
  msgid "Role Capabilities"
80
  msgstr ""
81
 
82
- #: includes/admin.php:109
83
  msgid "<strong>Note:</strong> Capability changes <strong>remain in the database</strong> after plugin deactivation."
84
  msgstr ""
85
 
86
- #: includes/admin.php:114
87
  #, php-format
88
  msgid "<strong>Note:</strong> Capability changes <strong>remain in the database</strong> after plugin deactivation. You can also configure this role as a %sPermission Group%s."
89
  msgstr ""
90
 
91
- #: includes/admin.php:148 includes/settings.php:38
92
  msgid "PublishPress Permissions"
93
  msgstr ""
94
 
95
- #: includes/admin.php:150
96
  msgid "Automatically define type-specific capabilities for your custom post types and taxonomies"
97
  msgstr ""
98
 
99
- #: includes/admin.php:154
100
  msgid "Assign standard WP roles supplementally for a specific post type"
101
  msgstr ""
102
 
103
- #: includes/admin.php:158
104
  msgid "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>"
105
  msgstr ""
106
 
107
- #: includes/admin.php:162
108
  msgid "Customize reading permissions per-category or per-post"
109
  msgstr ""
110
 
111
- #: includes/admin.php:166
112
  msgid "Customize editing permissions per-category or per-post <em>(Pro)</em>"
113
  msgstr ""
114
 
115
- #: includes/admin.php:170
116
  msgid "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>"
117
  msgstr ""
118
 
119
- #: includes/admin.php:174
120
  msgid "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>"
121
  msgstr ""
122
 
123
- #: includes/admin.php:178
124
  msgid "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>"
125
  msgstr ""
126
 
127
- #: includes/admin.php:182
128
  msgid "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>"
129
  msgstr ""
130
 
131
- #: includes/admin.php:186
132
  msgid "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>"
133
  msgstr ""
134
 
135
- #: includes/admin.php:190
136
  msgid "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>"
137
  msgstr ""
138
 
139
- #: includes/admin.php:194
140
  msgid "WPML integration to mirror permissions to translations <em>(Pro)</em>"
141
  msgstr ""
142
 
143
- #: includes/admin.php:198
144
  msgid "Member support forum"
145
  msgstr ""
146
 
147
- #: includes/admin.php:205
148
  #, php-format
149
  msgid "%1$sgrab%2$s %3$s"
150
  msgstr ""
151
 
152
- #: includes/admin.php:205
153
  #, php-format
154
  msgid "%s (free install)"
155
  msgstr ""
156
 
157
- #: includes/admin.php:207
158
  #, php-format
159
  msgid "%1$sbuy%2$s %3$s"
160
  msgstr ""
161
 
162
- #: includes/admin.php:207
163
  #, php-format
164
  msgid "%s info/purchase"
165
  msgstr ""
166
 
167
- #: includes/admin.php:287
168
  msgid "&nbsp;"
169
  msgstr ""
170
 
171
- #: includes/admin.php:288
172
  msgid "Reading"
173
  msgstr ""
174
 
175
- #: includes/admin.php:289
176
  msgid "Editing Capabilities"
177
  msgstr ""
178
 
179
- #: includes/admin.php:290
180
  msgid "Deletion Capabilities"
181
  msgstr ""
182
 
183
- #: includes/admin.php:294
184
  msgid "can read posts which are currently published with private visibility"
185
  msgstr ""
186
 
187
- #: includes/admin.php:295
188
  msgid "has basic editing capability (but may need other capabilities based on post status and ownership)"
189
  msgstr ""
190
 
191
- #: includes/admin.php:296
192
  msgid "can edit posts which were created by other users"
193
  msgstr ""
194
 
195
- #: includes/admin.php:297
196
  msgid "can edit posts which are currently published"
197
  msgstr ""
198
 
199
- #: includes/admin.php:298
200
  msgid "can edit posts which are currently published with private visibility"
201
  msgstr ""
202
 
203
- #: includes/admin.php:299
204
  msgid "can make a post publicly visible"
205
  msgstr ""
206
 
207
- #: includes/admin.php:300
208
  msgid "has basic deletion capability (but may need other capabilities based on post status and ownership)"
209
  msgstr ""
210
 
211
- #: includes/admin.php:301
212
  msgid "can delete posts which were created by other users"
213
  msgstr ""
214
 
215
- #: includes/admin.php:302
216
  msgid "can delete posts which are currently published"
217
  msgstr ""
218
 
219
- #: includes/admin.php:303
220
  msgid "can delete posts which are currently published with private visibility"
221
  msgstr ""
222
 
223
- #: includes/admin.php:437 includes/admin.php:547 includes/admin.php:809
224
- #: includes/admin.php:904 includes/admin.php:1001
225
  #, php-format
226
  msgid "%s: assigned by Permission Group"
227
  msgstr ""
228
 
229
- #: includes/admin.php:452
230
  #, php-format
231
  msgid "shared capability: %s"
232
  msgstr ""
233
 
234
- #: includes/admin.php:524
235
  msgid "Other WordPress Core Capabilities"
236
  msgstr ""
237
 
238
- #: includes/admin.php:566
239
  msgid "Lockout Prevention: To remove read capability, first remove WordPress admin / editing capabilities, or add \"dashboard_lockout_ok\" capability"
240
  msgstr ""
241
 
242
- #: includes/admin.php:609 includes/admin.php:848 includes/admin.php:957
243
- #: includes/admin.php:1044
244
  msgid "check/uncheck all"
245
  msgstr ""
246
 
247
- #: includes/admin.php:609 includes/admin.php:848 includes/admin.php:957
248
- #: includes/admin.php:1044
249
  msgid "negate all (storing as disabled capabilities)"
250
  msgstr ""
251
 
252
- #: includes/admin.php:609 includes/admin.php:848 includes/admin.php:957
253
- #: includes/admin.php:1044
254
  msgid "negate none (add/remove all capabilities normally)"
255
  msgstr ""
256
 
257
- #: includes/admin.php:783
258
  #, php-format
259
  msgid "%s Capabilities"
260
  msgstr ""
261
 
262
- #: includes/admin.php:856
263
- msgid "Additional Capabilities"
264
  msgstr ""
265
 
266
- #: includes/admin.php:966
267
- msgid "Meta capabilities are used in code as placeholders for other capabilities. Assiging to a role has no effect."
268
  msgstr ""
269
 
270
- #: includes/admin.php:967
271
- msgid "Invalid Capabilities"
272
  msgstr ""
273
 
274
- #: includes/admin.php:1057
275
  msgid "Role level is mostly deprecated. However, it still determines eligibility for Post Author assignment and limits the application of user editing capabilities."
276
  msgstr ""
277
 
278
- #: includes/admin.php:1058
279
- msgid "Role Level:"
280
  msgstr ""
281
 
282
- #: includes/admin.php:1081
283
  msgid "Delete this role"
284
  msgstr ""
285
 
286
- #: includes/admin.php:1081
287
  #, php-format
288
  msgid ""
289
  "You are about to delete the %s role.\n"
@@ -291,67 +298,76 @@ msgid ""
291
  " 'Cancel' to stop, 'OK' to delete."
292
  msgstr ""
293
 
294
- #: includes/admin.php:1081
295
  msgid "Delete Role"
296
  msgstr ""
297
 
298
- #: includes/admin.php:1090
299
  msgid "Add Capability"
300
  msgstr ""
301
 
302
- #: includes/admin.php:1093
303
  msgid "Add to role"
304
  msgstr ""
305
 
306
- #: includes/admin.php:1105
307
  msgid "Copy this role to"
308
  msgstr ""
309
 
310
- #: includes/admin.php:1108
 
311
  msgid "Role Name"
312
  msgstr ""
313
 
314
- #: includes/admin.php:1111 includes/pp-ui.php:84
315
  msgid "Make role available for supplemental assignment to Permission Groups only"
316
  msgstr ""
317
 
318
- #: includes/admin.php:1111
319
  msgid "hidden"
320
  msgstr ""
321
 
322
- #: includes/admin.php:1115
323
  msgid "Copy"
324
  msgstr ""
325
 
326
- #: includes/admin.php:1121
327
  msgid "Rename Role"
328
  msgstr ""
329
 
330
- #: includes/admin.php:1123
331
  msgid "New Role Name"
332
  msgstr ""
333
 
334
- #: includes/admin.php:1126
335
  msgid "Rename"
336
  msgstr ""
337
 
338
- #: includes/admin.php:1157
339
  msgid "Create this role definition in new (future) sites"
340
  msgstr ""
341
 
342
- #: includes/admin.php:1157
343
  msgid "include in new sites"
344
  msgstr ""
345
 
346
- #: includes/admin.php:1160
347
  msgid "Copy / update this role definition to all sites now"
348
  msgstr ""
349
 
350
- #: includes/admin.php:1160
351
  msgid "sync role to all sites now"
352
  msgstr ""
353
 
354
- #: includes/backup-handler.php:9 includes/manager.php:708
 
 
 
 
 
 
 
 
355
  msgid "You do not have permission to restore roles."
356
  msgstr ""
357
 
@@ -389,6 +405,19 @@ msgstr ""
389
  msgid "Backup Tool for %1$sPublishPress Capabilities%2$s"
390
  msgstr ""
391
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  #: includes/backup.php:57
393
  msgid "Backup Roles and Capabilities"
394
  msgstr ""
@@ -476,37 +505,41 @@ msgstr ""
476
  msgid "%s (level %s)"
477
  msgstr ""
478
 
479
- #: includes/backup.php:259
 
 
 
 
480
  msgid "Reset WordPress Defaults"
481
  msgstr ""
482
 
483
- #: includes/backup.php:262
484
  msgid "WARNING:"
485
  msgstr ""
486
 
487
- #: includes/backup.php:262
488
  msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
489
  msgstr ""
490
 
491
- #: includes/backup.php:266
492
  msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
493
  msgstr ""
494
 
495
- #: includes/backup.php:268
496
  msgid "It is recommended to use this only as a last resource!"
497
  msgstr ""
498
 
499
- #: includes/backup.php:271
500
  msgid "Reset Roles and Capabilities to WordPress defaults"
501
  msgstr ""
502
 
503
- #: includes/backup.php:273
504
  msgid ""
505
  "You are about to reset Roles and Capabilities to WordPress defaults.\n"
506
  " 'Cancel' to stop, 'OK' to reset."
507
  msgstr ""
508
 
509
- #: includes/backup.php:273
510
  msgid "Reset to WordPress defaults"
511
  msgstr ""
512
 
@@ -523,150 +556,133 @@ msgstr ""
523
  msgid "Edit Roles"
524
  msgstr ""
525
 
526
- #: includes/functions-admin.php:14 includes/manager.php:296
527
- #: includes/roles/class/class-pp-roles-list-table.php:120
528
  msgid "Capabilities"
529
  msgstr ""
530
 
531
- #: includes/functions-admin.php:36 includes/manager.php:318
532
  #: includes/roles/roles.php:4
533
  msgid "Roles"
534
  msgstr ""
535
 
536
- #: includes/functions-admin.php:39 includes/manager.php:332
537
- msgid "Backup"
538
- msgstr ""
539
-
540
- #: includes/functions-admin.php:40 includes/manager.php:335
541
  msgid "Settings"
542
  msgstr ""
543
 
544
- #: includes/functions-admin.php:45 includes/functions-admin.php:46
545
- #: includes/manager.php:341 includes/manager.php:342
546
- msgid "Upgrade to Pro"
547
- msgstr ""
548
-
549
- #: includes/handler.php:23 includes/handler.php:49
550
  msgid "New role created."
551
  msgstr ""
552
 
553
- #: includes/handler.php:29 includes/handler.php:55
554
  msgid "Error: Failed creating the new role."
555
  msgstr ""
556
 
557
- #: includes/handler.php:42
558
  #, php-format
559
  msgid "Role \"%s\" (id %s) renamed to \"%s\""
560
  msgstr ""
561
 
562
- #: includes/handler.php:111
563
  msgid "Incorrect capability name."
564
  msgstr ""
565
 
566
- #: includes/handler.php:116
567
  msgid "Type / Taxonomy settings saved."
568
  msgstr ""
569
 
570
- #: includes/handler.php:122
571
  msgid "Bad form received."
572
  msgstr ""
573
 
574
- #: includes/handler.php:245
575
  msgid "You cannot remove Manage Capabilities from Administrators"
576
  msgstr ""
577
 
578
- #: includes/handler.php:357
579
- #, php-format
580
- msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
581
- msgstr ""
582
-
583
- #: includes/handler.php:404
584
- #, php-format
585
- msgid "Role has been deleted. %1$d users moved to default role %2$s."
586
- msgstr ""
587
-
588
- #: includes/manager.php:181
589
  msgid "Explicity negate this capability by storing as disabled"
590
  msgstr ""
591
 
592
- #: includes/manager.php:182
593
  msgid "Explicitly negate these capabilities by storing as disabled"
594
  msgstr ""
595
 
596
- #: includes/manager.php:183
597
  msgid "Post type registration does not define this capability distinctly"
598
  msgstr ""
599
 
600
- #: includes/manager.php:184
601
  msgid "This capability is explicitly negated. Click to add/remove normally."
602
  msgstr ""
603
 
604
- #: includes/manager.php:185
605
  msgid "Add or remove this capability from the WordPress role"
606
  msgstr ""
607
 
608
- #: includes/manager.php:186
609
  msgid "Add or remove capability from the role normally"
610
  msgstr ""
611
 
612
- #: includes/manager.php:359
613
- #: includes/roles/class/class-pp-roles-list-table.php:77
614
- msgid "Role"
615
  msgstr ""
616
 
617
- #: includes/manager.php:360
618
- #: includes/roles/class/class-pp-roles-list-table.php:78
619
- #: includes/roles/roles.php:33
620
- msgid "Name"
621
  msgstr ""
622
 
623
- #: includes/manager.php:361
624
- #: includes/roles/class/class-pp-roles-list-table.php:79
625
  msgid "Users"
626
  msgstr ""
627
 
628
- #: includes/manager.php:388
629
  msgid "You do not have permission to manage roles."
630
  msgstr ""
631
 
632
- #: includes/manager.php:494 includes/manager.php:535
633
  msgid "You do not have permission to manage capabilities."
634
  msgstr ""
635
 
636
- #: includes/manager.php:549
637
  msgid "New capability added to role."
638
  msgstr ""
639
 
640
- #: includes/manager.php:588
 
 
 
 
641
  msgid "Bad form Received"
642
  msgstr ""
643
 
644
- #: includes/manager.php:738
645
  #, php-format
646
  msgid "If you like %s, please leave us a %s rating. Thank you!"
647
  msgstr ""
648
 
649
- #: includes/manager.php:749
650
  msgid "About PublishPress Capabilities"
651
  msgstr ""
652
 
653
- #: includes/manager.php:749
654
  msgid "About"
655
  msgstr ""
656
 
657
- #: includes/manager.php:751
658
  msgid "Capabilites Documentation"
659
  msgstr ""
660
 
661
- #: includes/manager.php:751
662
  msgid "Documentation"
663
  msgstr ""
664
 
665
- #: includes/manager.php:753
666
  msgid "Contact the PublishPress team"
667
  msgstr ""
668
 
669
- #: includes/manager.php:753
670
  msgid "Contact"
671
  msgstr ""
672
 
@@ -743,32 +759,80 @@ msgstr ""
743
  msgid "Enforce Edit, Delete and Assign capabilities separately from Management capability."
744
  msgstr ""
745
 
746
- #: includes/roles/class/class-pp-roles-actions.php:126
747
  msgid "You do not have sufficient permissions to perform this action."
748
  msgstr ""
749
 
750
- #: includes/roles/class/class-pp-roles-actions.php:142
751
  msgid "Your link has expired, refresh the page and try again."
752
  msgstr ""
753
 
754
- #: includes/roles/class/class-pp-roles-actions.php:163
755
- #: includes/roles/class/class-pp-roles-actions.php:269
 
 
756
  msgid "Missing parameters, refresh the page and try again."
757
  msgstr ""
758
 
759
- #: includes/roles/class/class-pp-roles-actions.php:197
760
  msgid "Something went wrong, the system wasn't able to create the role, refresh the page and try again."
761
  msgstr ""
762
 
763
- #: includes/roles/class/class-pp-roles-actions.php:284
 
 
 
 
 
764
  msgid "Deleting a system role is not allowed."
765
  msgstr ""
766
 
767
- #: includes/roles/class/class-pp-roles-list-table.php:134
768
- #: includes/roles/class/class-pp-roles-list-table.php:242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
769
  msgid "Delete"
770
  msgstr ""
771
 
 
 
 
 
772
  #: includes/roles/roles-functions.php:32
773
  msgid "Are you sure you want to delete this role?"
774
  msgstr ""
@@ -782,7 +846,7 @@ msgstr ""
782
  msgid "Search Roles"
783
  msgstr ""
784
 
785
- #: includes/roles/roles.php:25 includes/roles/roles.php:40
786
  msgid "Add New Role"
787
  msgstr ""
788
 
@@ -790,6 +854,10 @@ msgstr ""
790
  msgid "The name is how it appears on your site."
791
  msgstr ""
792
 
 
 
 
 
793
  #: includes/roles/roles.php:52
794
  msgid "Description here."
795
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: PublishPress Capabilities\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2021-05-06 13:51-0400\n"
7
  "PO-Revision-Date: 2020-10-08 11:17-0500\n"
8
  "Last-Translator: Kevin Behrens <kevin@publishpress.com>\n"
9
  "Language-Team: PublishPress <help@publishpress.com>\n"
27
  msgid "<strong>This plugin can be deleted.</strong>"
28
  msgstr ""
29
 
30
+ #: capsman-enhanced.php:98
31
  msgid "Warning:"
32
  msgstr ""
33
 
34
+ #: capsman-enhanced.php:99
35
  #, php-format
36
  msgid "The active plugin %s is not compatible with your PHP version."
37
  msgstr ""
38
 
39
+ #: capsman-enhanced.php:101
40
  #, php-format
41
  msgid "%s is required for this plugin."
42
  msgstr ""
45
  msgid "Settings saved."
46
  msgstr ""
47
 
48
+ #: includes-core/CoreAdmin.php:53 includes/functions-admin.php:191
49
  msgid "Admin Menus"
50
  msgstr ""
51
 
52
+ #: includes-core/CoreAdmin.php:54 includes/functions-admin.php:192
53
  msgid "Nav Menus"
54
  msgstr ""
55
 
56
+ #: includes-core/admin-menus-promo.php:29
57
  msgid "Admin Menu Restrictions"
58
  msgstr ""
59
 
60
+ #: includes-core/admin-menus-promo.php:48 includes-core/nav-menus-promo.php:52
61
+ #: includes/admin.php:107 includes/admin.php:1089 includes/settings.php:54
62
+ msgid "Save Changes"
63
  msgstr ""
64
 
65
+ #: includes-core/admin-menus-promo.php:58
66
+ msgid "You can restrict access to admin menu screens. This feature is available in PublishPress Capabilities Pro"
 
67
  msgstr ""
68
 
69
+ #: includes-core/admin-menus-promo.php:62 includes-core/nav-menus-promo.php:67
70
+ #: includes/functions-admin.php:202 includes/functions-admin.php:203
71
+ #: includes/manager.php:346 includes/manager.php:347
72
+ msgid "Upgrade to Pro"
73
+ msgstr ""
74
+
75
+ #: includes-core/nav-menus-promo.php:29
76
  msgid "Navigation Menu Restrictions"
77
  msgstr ""
78
 
79
+ #: includes-core/nav-menus-promo.php:63
80
+ msgid "You can restrict access to navigation menus. This feature is available in PublishPress Capabilities Pro"
81
+ msgstr ""
82
+
83
  #: includes/admin.php:38
84
  #, php-format
85
  msgid "Warning: This role cannot access the dashboard without the read capability. %1$sClick here to fix this now%2$s."
86
  msgstr ""
87
 
88
+ #: includes/admin.php:66
89
  msgid "Role Capabilities"
90
  msgstr ""
91
 
92
+ #: includes/admin.php:117
93
  msgid "<strong>Note:</strong> Capability changes <strong>remain in the database</strong> after plugin deactivation."
94
  msgstr ""
95
 
96
+ #: includes/admin.php:122
97
  #, php-format
98
  msgid "<strong>Note:</strong> Capability changes <strong>remain in the database</strong> after plugin deactivation. You can also configure this role as a %sPermission Group%s."
99
  msgstr ""
100
 
101
+ #: includes/admin.php:156 includes/settings.php:38
102
  msgid "PublishPress Permissions"
103
  msgstr ""
104
 
105
+ #: includes/admin.php:158
106
  msgid "Automatically define type-specific capabilities for your custom post types and taxonomies"
107
  msgstr ""
108
 
109
+ #: includes/admin.php:162
110
  msgid "Assign standard WP roles supplementally for a specific post type"
111
  msgstr ""
112
 
113
+ #: includes/admin.php:166
114
  msgid "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>"
115
  msgstr ""
116
 
117
+ #: includes/admin.php:170
118
  msgid "Customize reading permissions per-category or per-post"
119
  msgstr ""
120
 
121
+ #: includes/admin.php:174
122
  msgid "Customize editing permissions per-category or per-post <em>(Pro)</em>"
123
  msgstr ""
124
 
125
+ #: includes/admin.php:178
126
  msgid "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>"
127
  msgstr ""
128
 
129
+ #: includes/admin.php:182
130
  msgid "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>"
131
  msgstr ""
132
 
133
+ #: includes/admin.php:186
134
  msgid "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>"
135
  msgstr ""
136
 
137
+ #: includes/admin.php:190
138
  msgid "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>"
139
  msgstr ""
140
 
141
+ #: includes/admin.php:194
142
  msgid "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>"
143
  msgstr ""
144
 
145
+ #: includes/admin.php:198
146
  msgid "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>"
147
  msgstr ""
148
 
149
+ #: includes/admin.php:202
150
  msgid "WPML integration to mirror permissions to translations <em>(Pro)</em>"
151
  msgstr ""
152
 
153
+ #: includes/admin.php:206
154
  msgid "Member support forum"
155
  msgstr ""
156
 
157
+ #: includes/admin.php:213
158
  #, php-format
159
  msgid "%1$sgrab%2$s %3$s"
160
  msgstr ""
161
 
162
+ #: includes/admin.php:213
163
  #, php-format
164
  msgid "%s (free install)"
165
  msgstr ""
166
 
167
+ #: includes/admin.php:215
168
  #, php-format
169
  msgid "%1$sbuy%2$s %3$s"
170
  msgstr ""
171
 
172
+ #: includes/admin.php:215
173
  #, php-format
174
  msgid "%s info/purchase"
175
  msgstr ""
176
 
177
+ #: includes/admin.php:296
178
  msgid "&nbsp;"
179
  msgstr ""
180
 
181
+ #: includes/admin.php:297
182
  msgid "Reading"
183
  msgstr ""
184
 
185
+ #: includes/admin.php:298
186
  msgid "Editing Capabilities"
187
  msgstr ""
188
 
189
+ #: includes/admin.php:299
190
  msgid "Deletion Capabilities"
191
  msgstr ""
192
 
193
+ #: includes/admin.php:303
194
  msgid "can read posts which are currently published with private visibility"
195
  msgstr ""
196
 
197
+ #: includes/admin.php:304
198
  msgid "has basic editing capability (but may need other capabilities based on post status and ownership)"
199
  msgstr ""
200
 
201
+ #: includes/admin.php:305
202
  msgid "can edit posts which were created by other users"
203
  msgstr ""
204
 
205
+ #: includes/admin.php:306
206
  msgid "can edit posts which are currently published"
207
  msgstr ""
208
 
209
+ #: includes/admin.php:307
210
  msgid "can edit posts which are currently published with private visibility"
211
  msgstr ""
212
 
213
+ #: includes/admin.php:308
214
  msgid "can make a post publicly visible"
215
  msgstr ""
216
 
217
+ #: includes/admin.php:309
218
  msgid "has basic deletion capability (but may need other capabilities based on post status and ownership)"
219
  msgstr ""
220
 
221
+ #: includes/admin.php:310
222
  msgid "can delete posts which were created by other users"
223
  msgstr ""
224
 
225
+ #: includes/admin.php:311
226
  msgid "can delete posts which are currently published"
227
  msgstr ""
228
 
229
+ #: includes/admin.php:312
230
  msgid "can delete posts which are currently published with private visibility"
231
  msgstr ""
232
 
233
+ #: includes/admin.php:446 includes/admin.php:558 includes/admin.php:818
234
+ #: includes/admin.php:1004
235
  #, php-format
236
  msgid "%s: assigned by Permission Group"
237
  msgstr ""
238
 
239
+ #: includes/admin.php:461
240
  #, php-format
241
  msgid "shared capability: %s"
242
  msgstr ""
243
 
244
+ #: includes/admin.php:535
245
  msgid "Other WordPress Core Capabilities"
246
  msgstr ""
247
 
248
+ #: includes/admin.php:577
249
  msgid "Lockout Prevention: To remove read capability, first remove WordPress admin / editing capabilities, or add \"dashboard_lockout_ok\" capability"
250
  msgstr ""
251
 
252
+ #: includes/admin.php:620 includes/admin.php:857 includes/admin.php:1057
 
253
  msgid "check/uncheck all"
254
  msgstr ""
255
 
256
+ #: includes/admin.php:620 includes/admin.php:857 includes/admin.php:1057
 
257
  msgid "negate all (storing as disabled capabilities)"
258
  msgstr ""
259
 
260
+ #: includes/admin.php:620 includes/admin.php:857 includes/admin.php:1057
 
261
  msgid "negate none (add/remove all capabilities normally)"
262
  msgstr ""
263
 
264
+ #: includes/admin.php:792
265
  #, php-format
266
  msgid "%s Capabilities"
267
  msgstr ""
268
 
269
+ #: includes/admin.php:868
270
+ msgid "Invalid Capabilities"
271
  msgstr ""
272
 
273
+ #: includes/admin.php:873
274
+ msgid "The following entries have no effect. Please assign desired capabilities in the Read / Edit / Delete grid above."
275
  msgstr ""
276
 
277
+ #: includes/admin.php:950
278
+ msgid "Additional Capabilities"
279
  msgstr ""
280
 
281
+ #: includes/admin.php:1067
282
  msgid "Role level is mostly deprecated. However, it still determines eligibility for Post Author assignment and limits the application of user editing capabilities."
283
  msgstr ""
284
 
285
+ #: includes/admin.php:1069
286
+ msgid "Level:"
287
  msgstr ""
288
 
289
+ #: includes/admin.php:1092
290
  msgid "Delete this role"
291
  msgstr ""
292
 
293
+ #: includes/admin.php:1092
294
  #, php-format
295
  msgid ""
296
  "You are about to delete the %s role.\n"
298
  " 'Cancel' to stop, 'OK' to delete."
299
  msgstr ""
300
 
301
+ #: includes/admin.php:1092
302
  msgid "Delete Role"
303
  msgstr ""
304
 
305
+ #: includes/admin.php:1101
306
  msgid "Add Capability"
307
  msgstr ""
308
 
309
+ #: includes/admin.php:1104
310
  msgid "Add to role"
311
  msgstr ""
312
 
313
+ #: includes/admin.php:1116
314
  msgid "Copy this role to"
315
  msgstr ""
316
 
317
+ #: includes/admin.php:1119
318
+ #: includes/roles/class/class-pp-roles-list-table.php:80
319
  msgid "Role Name"
320
  msgstr ""
321
 
322
+ #: includes/admin.php:1122 includes/pp-ui.php:84
323
  msgid "Make role available for supplemental assignment to Permission Groups only"
324
  msgstr ""
325
 
326
+ #: includes/admin.php:1122
327
  msgid "hidden"
328
  msgstr ""
329
 
330
+ #: includes/admin.php:1126
331
  msgid "Copy"
332
  msgstr ""
333
 
334
+ #: includes/admin.php:1132
335
  msgid "Rename Role"
336
  msgstr ""
337
 
338
+ #: includes/admin.php:1134
339
  msgid "New Role Name"
340
  msgstr ""
341
 
342
+ #: includes/admin.php:1137
343
  msgid "Rename"
344
  msgstr ""
345
 
346
+ #: includes/admin.php:1168
347
  msgid "Create this role definition in new (future) sites"
348
  msgstr ""
349
 
350
+ #: includes/admin.php:1168
351
  msgid "include in new sites"
352
  msgstr ""
353
 
354
+ #: includes/admin.php:1171
355
  msgid "Copy / update this role definition to all sites now"
356
  msgstr ""
357
 
358
+ #: includes/admin.php:1171
359
  msgid "sync role to all sites now"
360
  msgstr ""
361
 
362
+ #: includes/admin.php:1174
363
+ msgid "Copy option settings to all sites now"
364
+ msgstr ""
365
+
366
+ #: includes/admin.php:1174
367
+ msgid "sync options to all sites now"
368
+ msgstr ""
369
+
370
+ #: includes/backup-handler.php:9 includes/manager.php:723
371
  msgid "You do not have permission to restore roles."
372
  msgstr ""
373
 
405
  msgid "Backup Tool for %1$sPublishPress Capabilities%2$s"
406
  msgstr ""
407
 
408
+ #: includes/backup.php:46
409
+ msgid "Restore"
410
+ msgstr ""
411
+
412
+ #: includes/backup.php:47 includes/functions-admin.php:193
413
+ #: includes/manager.php:337
414
+ msgid "Backup"
415
+ msgstr ""
416
+
417
+ #: includes/backup.php:48
418
+ msgid "Reset Roles"
419
+ msgstr ""
420
+
421
  #: includes/backup.php:57
422
  msgid "Backup Roles and Capabilities"
423
  msgstr ""
505
  msgid "%s (level %s)"
506
  msgstr ""
507
 
508
+ #: includes/backup.php:264
509
+ msgid "No changes"
510
+ msgstr ""
511
+
512
+ #: includes/backup.php:281
513
  msgid "Reset WordPress Defaults"
514
  msgstr ""
515
 
516
+ #: includes/backup.php:283
517
  msgid "WARNING:"
518
  msgstr ""
519
 
520
+ #: includes/backup.php:283
521
  msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
522
  msgstr ""
523
 
524
+ #: includes/backup.php:287
525
  msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
526
  msgstr ""
527
 
528
+ #: includes/backup.php:289
529
  msgid "It is recommended to use this only as a last resource!"
530
  msgstr ""
531
 
532
+ #: includes/backup.php:292
533
  msgid "Reset Roles and Capabilities to WordPress defaults"
534
  msgstr ""
535
 
536
+ #: includes/backup.php:294
537
  msgid ""
538
  "You are about to reset Roles and Capabilities to WordPress defaults.\n"
539
  " 'Cancel' to stop, 'OK' to reset."
540
  msgstr ""
541
 
542
+ #: includes/backup.php:294
543
  msgid "Reset to WordPress defaults"
544
  msgstr ""
545
 
556
  msgid "Edit Roles"
557
  msgstr ""
558
 
559
+ #: includes/functions-admin.php:168 includes/manager.php:301
560
+ #: includes/roles/class/class-pp-roles-list-table.php:125
561
  msgid "Capabilities"
562
  msgstr ""
563
 
564
+ #: includes/functions-admin.php:190 includes/manager.php:323
565
  #: includes/roles/roles.php:4
566
  msgid "Roles"
567
  msgstr ""
568
 
569
+ #: includes/functions-admin.php:196 includes/manager.php:340
 
 
 
 
570
  msgid "Settings"
571
  msgstr ""
572
 
573
+ #: includes/handler.php:28 includes/handler.php:54
 
 
 
 
 
574
  msgid "New role created."
575
  msgstr ""
576
 
577
+ #: includes/handler.php:34 includes/handler.php:60
578
  msgid "Error: Failed creating the new role."
579
  msgstr ""
580
 
581
+ #: includes/handler.php:47
582
  #, php-format
583
  msgid "Role \"%s\" (id %s) renamed to \"%s\""
584
  msgstr ""
585
 
586
+ #: includes/handler.php:126
587
  msgid "Incorrect capability name."
588
  msgstr ""
589
 
590
+ #: includes/handler.php:131
591
  msgid "Type / Taxonomy settings saved."
592
  msgstr ""
593
 
594
+ #: includes/handler.php:137
595
  msgid "Bad form received."
596
  msgstr ""
597
 
598
+ #: includes/handler.php:260
599
  msgid "You cannot remove Manage Capabilities from Administrators"
600
  msgstr ""
601
 
602
+ #: includes/manager.php:186
 
 
 
 
 
 
 
 
 
 
603
  msgid "Explicity negate this capability by storing as disabled"
604
  msgstr ""
605
 
606
+ #: includes/manager.php:187
607
  msgid "Explicitly negate these capabilities by storing as disabled"
608
  msgstr ""
609
 
610
+ #: includes/manager.php:188
611
  msgid "Post type registration does not define this capability distinctly"
612
  msgstr ""
613
 
614
+ #: includes/manager.php:189
615
  msgid "This capability is explicitly negated. Click to add/remove normally."
616
  msgstr ""
617
 
618
+ #: includes/manager.php:190
619
  msgid "Add or remove this capability from the WordPress role"
620
  msgstr ""
621
 
622
+ #: includes/manager.php:191
623
  msgid "Add or remove capability from the role normally"
624
  msgstr ""
625
 
626
+ #: includes/manager.php:364 includes/roles/roles.php:33
627
+ msgid "Name"
 
628
  msgstr ""
629
 
630
+ #: includes/manager.php:365
631
+ #: includes/roles/class/class-pp-roles-list-table.php:81
632
+ msgid "Role"
 
633
  msgstr ""
634
 
635
+ #: includes/manager.php:366
636
+ #: includes/roles/class/class-pp-roles-list-table.php:82
637
  msgid "Users"
638
  msgstr ""
639
 
640
+ #: includes/manager.php:393
641
  msgid "You do not have permission to manage roles."
642
  msgstr ""
643
 
644
+ #: includes/manager.php:503 includes/manager.php:544
645
  msgid "You do not have permission to manage capabilities."
646
  msgstr ""
647
 
648
+ #: includes/manager.php:558
649
  msgid "New capability added to role."
650
  msgstr ""
651
 
652
+ #: includes/manager.php:576
653
+ msgid "The selected role is not editable."
654
+ msgstr ""
655
+
656
+ #: includes/manager.php:603
657
  msgid "Bad form Received"
658
  msgstr ""
659
 
660
+ #: includes/manager.php:753
661
  #, php-format
662
  msgid "If you like %s, please leave us a %s rating. Thank you!"
663
  msgstr ""
664
 
665
+ #: includes/manager.php:764
666
  msgid "About PublishPress Capabilities"
667
  msgstr ""
668
 
669
+ #: includes/manager.php:764
670
  msgid "About"
671
  msgstr ""
672
 
673
+ #: includes/manager.php:766
674
  msgid "Capabilites Documentation"
675
  msgstr ""
676
 
677
+ #: includes/manager.php:766
678
  msgid "Documentation"
679
  msgstr ""
680
 
681
+ #: includes/manager.php:768
682
  msgid "Contact the PublishPress team"
683
  msgstr ""
684
 
685
+ #: includes/manager.php:768
686
  msgid "Contact"
687
  msgstr ""
688
 
759
  msgid "Enforce Edit, Delete and Assign capabilities separately from Management capability."
760
  msgstr ""
761
 
762
+ #: includes/roles/class/class-pp-roles-actions.php:143
763
  msgid "You do not have sufficient permissions to perform this action."
764
  msgstr ""
765
 
766
+ #: includes/roles/class/class-pp-roles-actions.php:159
767
  msgid "Your link has expired, refresh the page and try again."
768
  msgstr ""
769
 
770
+ #: includes/roles/class/class-pp-roles-actions.php:180
771
+ #: includes/roles/class/class-pp-roles-actions.php:298
772
+ #: includes/roles/class/class-pp-roles-actions.php:412
773
+ #: includes/roles/class/class-pp-roles-actions.php:473
774
  msgid "Missing parameters, refresh the page and try again."
775
  msgstr ""
776
 
777
+ #: includes/roles/class/class-pp-roles-actions.php:214
778
  msgid "Something went wrong, the system wasn't able to create the role, refresh the page and try again."
779
  msgstr ""
780
 
781
+ #: includes/roles/class/class-pp-roles-actions.php:306
782
+ #, php-format
783
+ msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
784
+ msgstr ""
785
+
786
+ #: includes/roles/class/class-pp-roles-actions.php:322
787
  msgid "Deleting a system role is not allowed."
788
  msgstr ""
789
 
790
+ #: includes/roles/class/class-pp-roles-actions.php:345
791
+ #, php-format
792
+ msgid "%1$d users moved to default role %2$s."
793
+ msgstr ""
794
+
795
+ #: includes/roles/class/class-pp-roles-actions.php:350
796
+ #, php-format
797
+ msgid "The role %1$s was successfully deleted. %2$s"
798
+ msgstr ""
799
+
800
+ #: includes/roles/class/class-pp-roles-actions.php:356
801
+ #, php-format
802
+ msgid "The selected %1$s roles were successfully deleted. %2$s"
803
+ msgstr ""
804
+
805
+ #: includes/roles/class/class-pp-roles-actions.php:369
806
+ msgid "The role could not be deleted."
807
+ msgstr ""
808
+
809
+ #: includes/roles/class/class-pp-roles-actions.php:423
810
+ #, php-format
811
+ msgid "The role %1$s was successfully hidden."
812
+ msgstr ""
813
+
814
+ #: includes/roles/class/class-pp-roles-actions.php:484
815
+ #, php-format
816
+ msgid "The role %1$s was successfully unhidden."
817
+ msgstr ""
818
+
819
+ #: includes/roles/class/class-pp-roles-list-table.php:130
820
+ msgid "(non-editable role)"
821
+ msgstr ""
822
+
823
+ #: includes/roles/class/class-pp-roles-list-table.php:150
824
+ msgid "Unhide"
825
+ msgstr ""
826
+
827
+ #: includes/roles/class/class-pp-roles-list-table.php:168
828
+ #: includes/roles/class/class-pp-roles-list-table.php:305
829
  msgid "Delete"
830
  msgstr ""
831
 
832
+ #: includes/roles/class/class-pp-roles-list-table.php:189
833
+ msgid "Hide"
834
+ msgstr ""
835
+
836
  #: includes/roles/roles-functions.php:32
837
  msgid "Are you sure you want to delete this role?"
838
  msgstr ""
846
  msgid "Search Roles"
847
  msgstr ""
848
 
849
+ #: includes/roles/roles.php:25
850
  msgid "Add New Role"
851
  msgstr ""
852
 
854
  msgid "The name is how it appears on your site."
855
  msgstr ""
856
 
857
+ #: includes/roles/roles.php:40
858
+ msgid "Add"
859
+ msgstr ""
860
+
861
  #: includes/roles/roles.php:52
862
  msgid "Description here."
863
  msgstr ""
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: user roles, capabilities, permissions, authors, editors, post types, taxon
7
  Requires at least: 4.9.7
8
  Tested up to: 5.7
9
  Requires PHP: 5.6.20
10
- Stable tag: 2.0
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -149,6 +149,14 @@ Fixed : Non-administrators with user editing capabilities could add new Administ
149
 
150
  == Changelog ==
151
 
 
 
 
 
 
 
 
 
152
  = 2.0 - 18 Feb 2020 =
153
  * Feature : Roles screen
154
  * Feature : Multiple role assignment on Add / Edit User screen
7
  Requires at least: 4.9.7
8
  Tested up to: 5.7
9
  Requires PHP: 5.6.20
10
+ Stable tag: 2.0.2
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
149
 
150
  == Changelog ==
151
 
152
+ = 2.0.2 - 6 May 2021 =
153
+ * Feature : Multisite - "sync options to all sites" checkbox. Copies "use create_posts capability", Type-Specific Capabilities, Taxonomy-Specific Capabilities, Detailed Taxonomy Capabilities settings
154
+ * Fixed : Multisite - "sync role to all sites" did not work if main site ID is not 1
155
+ * Fixed : Fatal error on Capabilities screen if another plugin calls get_editable_roles() too early
156
+ * Fixed : Add New User - couldn't display password entry
157
+ * Compat : PublishPress - Authors without publish capability could directly publish on the Calendar screen
158
+ * Change : Permissions - Hide / Unhide Role setting moved to Roles screen row actions
159
+
160
  = 2.0 - 18 Feb 2020 =
161
  * Feature : Roles screen
162
  * Feature : Multiple role assignment on Add / Edit User screen