Capability Manager Enhanced - Version 1.7

Version Description

  • 28 Mar 2019
Download this release

Release Info

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

Code changes from version 1.6.1 to 1.7

admin.css CHANGED
@@ -158,10 +158,18 @@ padding-right: 10px;
158
  margin-top: 5px;
159
  }
160
 
 
 
 
 
161
  #akmin td.sidebar {
162
  width: 300px;
163
  }
164
 
 
 
 
 
165
  #akmin input.regular-text {
166
  width: 200px;
167
  }
@@ -180,4 +188,9 @@ td.cm-has-via-pp {
180
  background-color: #7f7;
181
  }
182
 
183
- #akmin span.publishpress,#akmin span.publishpress a,#akmin span.publishpress a:visited {color:#655997;font-weight:bold}
 
 
 
 
 
158
  margin-top: 5px;
159
  }
160
 
161
+ #akmin input.button-primary {
162
+ margin: 5px;
163
+ }
164
+
165
  #akmin td.sidebar {
166
  width: 300px;
167
  }
168
 
169
+ #akmin .cme-backup-tool a {
170
+ padding-left:0;
171
+ }
172
+
173
  #akmin input.regular-text {
174
  width: 200px;
175
  }
188
  background-color: #7f7;
189
  }
190
 
191
+ #akmin div.publishpress-headline {line-height:25px}
192
+ #akmin span.publishpress-thanks{margin-left:5px;color:#655997;white-space:nowrap}
193
+ #akmin span.publishpress-thanks,#akmin span.publishpress-thanks a,#akmin span.publishpress-thanks a:visited {color:#655997;font-weight:bold;}
194
+
195
+ table#akmin td.sidebar li.publishpress-contact{text-align:center}
196
+ table#akmin td.sidebar li.publishpress-contact a{padding:5px 0 5px 0;}
admin.dev.js CHANGED
@@ -4,7 +4,7 @@ jQuery(document).ready( function($) {
4
  $('td.cap-unreg').attr('title',cmeAdmin.typeCapUnregistered);
5
  $('a.normal-cap').attr('title',cmeAdmin.switchableCaption);
6
  $('span.cap-x').attr('title',cmeAdmin.capNegated);
7
- $('table.cme-checklist input[class!="cme-check-all"]').attr('title',cmeAdmin.chkCaption);
8
 
9
  $('table.cme-checklist a.neg-cap').click( function(e) {
10
  $(this).closest('td').removeClass('cap-yes').removeClass('cap-no').addClass('cap-neg');
4
  $('td.cap-unreg').attr('title',cmeAdmin.typeCapUnregistered);
5
  $('a.normal-cap').attr('title',cmeAdmin.switchableCaption);
6
  $('span.cap-x').attr('title',cmeAdmin.capNegated);
7
+ $('table.cme-checklist input[class!="cme-check-all"]').not(':disabled').attr('title',cmeAdmin.chkCaption);
8
 
9
  $('table.cme-checklist a.neg-cap').click( function(e) {
10
  $(this).closest('td').removeClass('cap-yes').removeClass('cap-no').addClass('cap-neg');
admin.js CHANGED
@@ -1,3 +1,3 @@
1
- jQuery(document).ready(function($){$('a.neg-cap').attr('title',cmeAdmin.negationCaption);$('a.neg-type-caps').attr('title',cmeAdmin.typeCapsNegationCaption);$('td.cap-unreg').attr('title',cmeAdmin.typeCapUnregistered);$('a.normal-cap').attr('title',cmeAdmin.switchableCaption);$('span.cap-x').attr('title',cmeAdmin.capNegated);$('table.cme-checklist input[class!="cme-check-all"]').attr('title',cmeAdmin.chkCaption);$('table.cme-checklist a.neg-cap').click(function(e){$(this).closest('td').removeClass('cap-yes').removeClass('cap-no').addClass('cap-neg');var cap_name_attr=$(this).parent().find('input[type="checkbox"]').attr('name');$(this).after('<input type="hidden" class="cme-negation-input" name="'+cap_name_attr+'" value="" />');return false;});$(document).on('click','table.cme-typecaps span.cap-x,table.cme-checklist span.cap-x,table.cme-checklist td.cap-neg span',function(e){$(this).closest('td').removeClass('cap-neg').removeClass('cap-yes').addClass('cap-no');$(this).parent().find('input[type="checkbox"]').prop('checked',false);$(this).parent().find('input.cme-negation-input').remove();return false;});$('input.cme-check-all').click(function(e){$(this).closest('table').find('input[type="checkbox"][disabled!="disabled"]:visible').prop('checked',$(this).is(":checked"));});$('a.cme-neg-all').click(function(e){$(this).closest('table').find('a.neg-cap:visible').click();return false;});$('a.cme-switch-all').click(function(e){$(this).closest('table').find('td.cap-neg span').click();return false;});$('table.cme-typecaps a.neg-type-caps').click(function(e){$(this).closest('tr').find('td[class!="cap-neg"]').filter('td[class!="cap-unreg"]').each(function(e){$(this).addClass('cap-neg');var cap_name_attr=$(this).parent().find('input[type="checkbox"]').attr('name');$(this).append('<input type="hidden" class="cme-negation-input" name="'+cap_name_attr+'" value="" />');});return false;});$('table.cme-typecaps th').click(function(){var columnNo=$(this).index();var check_val=!$(this).prop('checked_all');if($(this).hasClass('term-cap'))
2
  var class_sel='[class*="term-cap"]';else
3
  var class_sel='[class*="post-cap"]';$(this).closest("table").find("tr td"+class_sel+":nth-child("+(columnNo+1)+') input[type="checkbox"]:visible').prop("checked",check_val);$(this).prop('checked_all',check_val);});$('a.cme-fix-read-cap').click(function(){$('input[name="caps[read]"]').prop('checked',true);$('input[name="SaveRole"]').trigger('click');return false;});});
1
+ jQuery(document).ready(function($){$('a.neg-cap').attr('title',cmeAdmin.negationCaption);$('a.neg-type-caps').attr('title',cmeAdmin.typeCapsNegationCaption);$('td.cap-unreg').attr('title',cmeAdmin.typeCapUnregistered);$('a.normal-cap').attr('title',cmeAdmin.switchableCaption);$('span.cap-x').attr('title',cmeAdmin.capNegated);$('table.cme-checklist input[class!="cme-check-all"]').not(':disabled').attr('title',cmeAdmin.chkCaption);$('table.cme-checklist a.neg-cap').click(function(e){$(this).closest('td').removeClass('cap-yes').removeClass('cap-no').addClass('cap-neg');var cap_name_attr=$(this).parent().find('input[type="checkbox"]').attr('name');$(this).after('<input type="hidden" class="cme-negation-input" name="'+cap_name_attr+'" value="" />');return false;});$(document).on('click','table.cme-typecaps span.cap-x,table.cme-checklist span.cap-x,table.cme-checklist td.cap-neg span',function(e){$(this).closest('td').removeClass('cap-neg').removeClass('cap-yes').addClass('cap-no');$(this).parent().find('input[type="checkbox"]').prop('checked',false);$(this).parent().find('input.cme-negation-input').remove();return false;});$('input.cme-check-all').click(function(e){$(this).closest('table').find('input[type="checkbox"][disabled!="disabled"]:visible').prop('checked',$(this).is(":checked"));});$('a.cme-neg-all').click(function(e){$(this).closest('table').find('a.neg-cap:visible').click();return false;});$('a.cme-switch-all').click(function(e){$(this).closest('table').find('td.cap-neg span').click();return false;});$('table.cme-typecaps a.neg-type-caps').click(function(e){$(this).closest('tr').find('td[class!="cap-neg"]').filter('td[class!="cap-unreg"]').each(function(e){$(this).addClass('cap-neg');var cap_name_attr=$(this).parent().find('input[type="checkbox"]').attr('name');$(this).append('<input type="hidden" class="cme-negation-input" name="'+cap_name_attr+'" value="" />');});return false;});$('table.cme-typecaps th').click(function(){var columnNo=$(this).index();var check_val=!$(this).prop('checked_all');if($(this).hasClass('term-cap'))
2
  var class_sel='[class*="term-cap"]';else
3
  var class_sel='[class*="post-cap"]';$(this).closest("table").find("tr td"+class_sel+":nth-child("+(columnNo+1)+') input[type="checkbox"]:visible').prop("checked",check_val);$(this).prop('checked_all',check_val);});$('a.cme-fix-read-cap').click(function(){$('input[name="caps[read]"]').prop('checked',true);$('input[name="SaveRole"]').trigger('click');return false;});});
capsman-enhanced.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Capability Manager Enhanced
4
  * Plugin URI: https://publishpress.com
5
  * Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
- * Version: 1.6.1
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com
9
  * Text Domain: capsman-enhanced
@@ -23,12 +23,12 @@
23
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2019 PublishPress
24
  * @license GNU General Public License version 3
25
  * @link https://publishpress.com
26
- * @version 1.6.1
27
  */
28
 
29
  if ( ! defined( 'CAPSMAN_VERSION' ) ) {
30
- define( 'CAPSMAN_VERSION', '1.6.1' );
31
- define( 'CAPSMAN_ENH_VERSION', '1.6.1' );
32
  }
33
 
34
  if ( cme_is_plugin_active( 'capsman.php' ) ) {
@@ -95,13 +95,48 @@ if ( cme_is_plugin_active( 'capsman.php' ) ) {
95
  add_action( 'init', '_cme_init' );
96
  add_action( 'plugins_loaded', '_cme_act_pp_active', 1 );
97
 
 
 
 
 
98
  function _cme_act_pp_active() {
99
- if ( defined('PP_VERSION') || defined('PPC_VERSION') )
100
- define( 'PP_ACTIVE', true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  }
102
 
103
  function _cme_init() {
104
- require_once ( dirname(__FILE__) . '/includes/filters.php' );
105
 
106
  load_plugin_textdomain('capsman-enhanced', false, dirname(__FILE__) . '/lang');
107
  }
@@ -149,5 +184,9 @@ function _cme_pp_default_pattern_role( $role ) {
149
  }
150
  }
151
 
 
 
 
 
152
  if ( is_multisite() )
153
  require_once ( dirname(__FILE__) . '/includes/network.php' );
3
  * Plugin Name: Capability Manager Enhanced
4
  * Plugin URI: https://publishpress.com
5
  * Description: Manage WordPress role definitions, per-site or network-wide. Organizes post capabilities by post type and operation.
6
+ * Version: 1.7
7
  * Author: PublishPress
8
  * Author URI: https://publishpress.com
9
  * Text Domain: capsman-enhanced
23
  * @copyright Copyright (C) 2009, 2010 Jordi Canals; modifications Copyright (C) 2019 PublishPress
24
  * @license GNU General Public License version 3
25
  * @link https://publishpress.com
26
+ * @version 1.7
27
  */
28
 
29
  if ( ! defined( 'CAPSMAN_VERSION' ) ) {
30
+ define( 'CAPSMAN_VERSION', '1.7' );
31
+ define( 'CAPSMAN_ENH_VERSION', '1.7' );
32
  }
33
 
34
  if ( cme_is_plugin_active( 'capsman.php' ) ) {
95
  add_action( 'init', '_cme_init' );
96
  add_action( 'plugins_loaded', '_cme_act_pp_active', 1 );
97
 
98
+ add_action( 'init', '_cme_cap_helper', 49 ); // Press Permit Cap Helper, registered at 50, will leave caps which we've already defined
99
+ //add_action( 'wp_loaded', '_cme_cap_helper_late_init', 99 ); // now instead adding registered_post_type, registered_taxonomy action handlers for latecomers
100
+ // @todo: do this in PP Core also
101
+
102
  function _cme_act_pp_active() {
103
+ if ( defined('PRESSPERMIT_VERSION') || ( defined('PPC_VERSION') && function_exists( 'pp_init_cap_caster' ) ) ) {
104
+ define( 'PRESSPERMIT_ACTIVE', true );
105
+ } else {
106
+ if ( defined('SCOPER_VERSION') || ( defined('PP_VERSION') && function_exists('pp_init_users_interceptor') ) ) {
107
+ define( 'OLD_PRESSPERMIT_ACTIVE', true );
108
+ }
109
+ }
110
+ }
111
+
112
+ function _cme_cap_helper() {
113
+ global $cme_cap_helper;
114
+
115
+ require_once ( dirname(__FILE__) . '/includes/cap-helper.php' );
116
+ $cme_cap_helper = new CME_Cap_Helper();
117
+
118
+ add_action( 'registered_post_type', '_cme_post_type_late_reg', 5, 2 );
119
+ add_action( 'registered_taxonomy', '_cme_taxonomy_late_reg', 5, 2 );
120
+ }
121
+
122
+ function _cme_post_type_late_reg( $post_type, $type_obj ) {
123
+ global $cme_cap_helper;
124
+
125
+ if ( ! empty( $type_obj->public ) || ! empty( $type_obj->show_ui ) ) {
126
+ $cme_cap_helper->refresh();
127
+ }
128
+ }
129
+
130
+ function _cme_taxonomy_late_reg( $taxonomy, $tx_obj ) {
131
+ global $cme_cap_helper;
132
+
133
+ if ( ! empty( $tx_obj->public ) ) {
134
+ $cme_cap_helper->refresh();
135
+ }
136
  }
137
 
138
  function _cme_init() {
139
+ require_once ( dirname(__FILE__) . '/includes/filters.php' );
140
 
141
  load_plugin_textdomain('capsman-enhanced', false, dirname(__FILE__) . '/lang');
142
  }
184
  }
185
  }
186
 
187
+ function capsman_get_pp_option( $option_basename ) {
188
+ return ( function_exists( 'presspermit_get_option') ) ? presspermit_get_option($option_basename) : capsman_get_pp_option($option_basename);
189
+ }
190
+
191
  if ( is_multisite() )
192
  require_once ( dirname(__FILE__) . '/includes/network.php' );
framework/styles/admin.css CHANGED
@@ -113,6 +113,10 @@ table#akmin td.sidebar a {
113
  border: 0 none;
114
  display: block;
115
  }
 
 
 
 
116
 
117
  table#akmin td.sidebar ul li {
118
  margin: 0;
113
  border: 0 none;
114
  display: block;
115
  }
116
+
117
+ table#akmin td.sidebar .cme-backup-tool a {
118
+ padding-left: 0;
119
+ }
120
 
121
  table#akmin td.sidebar ul li {
122
  margin: 0;
includes/admin.php CHANGED
@@ -8,43 +8,47 @@
8
  * @license GNU General Public License version 2
9
  * @link https://publishpress.com
10
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
- Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
13
- Modifications Copyright 2019, PublishPress <help@publishpress.com>
14
-
15
- This program is free software; you can redistribute it and/or
16
- modify it under the terms of the GNU General Public License
17
- version 2 as published by the Free Software Foundation.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
 
24
- You should have received a copy of the GNU General Public License
25
- along with this program. If not, see <http://www.gnu.org/licenses/>.
26
- */
27
 
28
- if ( in_array( $this->current, $this->core_roles ) ) {
29
- $role_obj = get_role( $this->current );
30
-
31
- if ( empty( $role_obj->capabilities['read'] ) ) {
32
- ak_admin_error( sprintf( __( 'Warning: This role may not work correctly because it does not have the read capability. %1$sClick here to fix this now%2$s.', 'capsman-enhanced' ), '<a href="javascript:void(0)" class="cme-fix-read-cap">', '</a>' ) );
33
  }
34
  }
35
-
36
- $roles = $this->roles;
37
- $default = $this->current;
38
 
39
- if( defined('PP_ACTIVE') ) {
40
- require_once( dirname(__FILE__).'/pp-ui.php' );
41
- $pp_ui = new Capsman_PP_UI();
 
42
  $pp_metagroup_caps = $pp_ui->get_metagroup_caps( $default );
43
- } else
44
  $pp_metagroup_caps = array();
 
45
  ?>
46
  <div class="wrap">
47
- <?php if( defined('PP_ACTIVE') ) :
48
  pp_icon();
49
  $style = 'style="height:60px;"';
50
  ?>
@@ -68,111 +72,112 @@ if( defined('PP_ACTIVE') ) {
68
  <div style="float:right">
69
  <input type="submit" name="SaveRole" value="<?php _e('Save Changes', 'capsman-enhanced') ?>" class="button-primary" /> &nbsp;
70
  </div>
71
-
72
- <div>
73
- <?php _e( 'View and modify capabilities WordPress associates with each role. Changes <strong>remain in the database</strong> even if you deactivate this plugin.', 'capsman-enhanced' ); ?>
74
- </div>
75
 
76
  <?php
77
- if ( defined( 'PP_ACTIVE' ) ) {
 
 
 
 
 
 
 
 
 
 
 
78
  $pp_ui->show_capability_hints( $default );
79
- }
80
-
81
- global $capsman;
82
- $img_url = $capsman->mod_url . '/images/';
83
- ?>
84
- <div style="margin-top:5px">
85
- <span class="publishpress"><?php printf( __( 'Thanks for using the %1$sPublishPress%2$s family of professional publishing tools.', 'capsman-enhanced'), '<a href="https://publishpress.com/" target="_blank">', '</a>' );?></span>
86
- </div>
87
-
88
- <script type="text/javascript">
89
- /* <![CDATA[ */
90
- jQuery(document).ready( function($) {
91
- $('a[href="#pp-more"]').click( function() {
92
- $('#pp_features').show();
93
- return false;
94
- });
95
- $('a[href="#pp-hide"]').click( function() {
96
- $('#pp_features').hide();
97
- return false;
98
- });
99
  });
100
- /* ]]> */
101
- </script>
102
- <style>
103
- #pp_features {display:none;border:1px solid #eee;padding:5px;text-align:center;min-width:600px}
104
- div.pp-logo { text-align: center }
105
- div.features-wrap { margin-left: auto; margin-right: auto; text-align: center; width: 540px; }
106
- ul.pp-features { list-style: none; padding-top:10px; text-align:left; margin-left: auto }
107
- ul.pp-features li:before { content: "\2713\0020"; }
108
- ul.pp-features li { padding-bottom: 5px }
109
- img.cme-play { margin-bottom: -3px; margin-left: 5px;}
110
- </style>
111
-
112
- <?php /* play.png icon by Pavel: http://kde-look.org/usermanager/search.php?username=InFeRnODeMoN */ ?>
113
-
114
- <br /><div id="pp_features"><div class="pp-logo"><a href="http://presspermit.com"><img src="<?php echo $img_url;?>pp-logo.png" /></a></div><div class="features-wrap"><ul class="pp-features">
115
- <li>
116
- <?php _e( "Automatically define type-specific capabilities for your custom post types and taxonomies", 'capsman-enhanced' );?>
117
- <a href="http://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
118
-
119
- <li>
120
- <?php _e( "Assign standard WP roles supplementally for a specific post type", 'capsman-enhanced' );?>
121
- <a href="http://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
122
-
123
- <li>
124
- <?php _e( "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>", 'capsman-enhanced' );?>
125
- <a href="http://presspermit.com/tutorial/custom-role-usage" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
126
-
127
- <li>
128
- <?php _e( "Customize reading permissions per-category or per-post", 'capsman-enhanced' );?>
129
- <a href="http://presspermit.com/tutorial/category-exceptions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
130
-
131
- <li>
132
- <?php _e( "Customize editing permissions per-category or per-post <em>(Pro)</em>", 'capsman-enhanced' );?>
133
- <a href="http://presspermit.com/tutorial/page-editing-exceptions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
134
-
135
- <li>
136
- <?php _e( "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>", 'capsman-enhanced' );?>
137
- <a href="http://presspermit.com/tutorial/custom-post-visibility" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
138
-
139
- <li>
140
- <?php _e( "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>", 'capsman-enhanced' );?>
141
- <a href="http://presspermit.com/tutorial/multi-step-moderation" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
142
-
143
- <li>
144
- <?php _e( "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>", 'capsman-enhanced' );?>
145
- <a href="http://presspermit.com/tutorial/edit-flow-integration" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
146
-
147
- <li>
148
- <?php _e( "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>", 'capsman-enhanced' );?>
149
- <a href="http://presspermit.com/tutorial/published-content-revision" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
150
-
151
- <li>
152
- <?php _e( "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>", 'capsman-enhanced' );?>
153
- <a href="http://presspermit.com/tutorial/bbpress-exceptions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
154
-
155
- <li>
156
- <?php _e( "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>", 'capsman-enhanced' );?>
157
- <a href="http://presspermit.com/tutorial/buddypress-content-permissions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
158
-
159
- <li>
160
- <?php _e( "WPML integration to mirror permissions to translations <em>(Pro)</em>", 'capsman-enhanced' );?>
161
- </li>
162
-
163
- <li>
164
- <?php _e( "Member support forum", 'capsman-enhanced' );?>
165
- </li>
166
-
167
- </ul></div>
168
- <?php
169
- echo '<div>';
170
- printf( __('%1$sgrab%2$s %3$s', 'capsman-enhanced'), '<strong>', '</strong>', '<span class="plugins update-message"><a href="' . cme_plugin_info_url('press-permit-core') . '" class="thickbox" title="' . sprintf( __('%s (free install)', 'capsman-enhanced'), 'Press Permit Core' ) . '">Press&nbsp;Permit&nbsp;Core</a></span>' );
171
- echo '&nbsp;&nbsp;&bull;&nbsp;&nbsp;';
172
- printf( __('%1$sbuy%2$s %3$s', 'capsman-enhanced'), '<strong>', '</strong>', '<a href="http://presspermit.com" target="_blank" title="' . sprintf( __('%s info/purchase', 'capsman-enhanced'), 'Press Permit Pro' ) . '">Press&nbsp;Permit&nbsp;Pro</a>' );
173
- echo '&nbsp;&nbsp;&bull;&nbsp;&nbsp;';
174
- echo '<a href="#pp-hide">hide</a>';
175
- echo '</div></div>';
 
 
 
 
 
176
 
177
  if ( MULTISITE ) {
178
  global $wp_roles;
@@ -185,26 +190,26 @@ if( defined('PP_ACTIVE') ) {
185
 
186
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
187
  }
188
-
189
- global $capsman;
190
  $capsman->reinstate_db_roles();
191
 
192
  $current = get_role($default);
193
 
194
  $rcaps = $current->capabilities;
195
 
196
- // ========= Begin Kevin B mod ===========
197
  $is_administrator = current_user_can( 'administrator' );
198
 
199
  $custom_types = get_post_types( array( '_builtin' => false ), 'names' );
200
  $custom_tax = get_taxonomies( array( '_builtin' => false ), 'names' );
201
 
202
  $defined = array();
203
- $defined['type'] = get_post_types( array( 'public' => true ), 'object' );
204
  $defined['taxonomy'] = get_taxonomies( array( 'public' => true ), 'object' );
205
 
206
- $unfiltered['type'] = apply_filters( 'pp_unfiltered_post_types', array('forum','topic','reply') ); // bbPress' dynamic role def requires additional code to enforce stored caps
207
  $unfiltered['taxonomy'] = apply_filters( 'pp_unfiltered_taxonomies', array( 'post_status', 'topic-tag' ) ); // avoid confusion with Edit Flow administrative taxonomy
 
 
 
208
  /*
209
  if ( ( count($custom_types) || count($custom_tax) ) && ( $is_administrator || current_user_can( 'manage_pp_settings' ) ) ) {
210
  $cap_properties[''] = array();
@@ -228,13 +233,13 @@ if( defined('PP_ACTIVE') ) {
228
 
229
  $cap_properties['edit']['taxonomy'] = array( 'manage_terms' );
230
 
231
- if ( ! defined( 'PP_ACTIVE' ) )
232
  $cap_properties['edit']['taxonomy'] = array_merge( $cap_properties['edit']['taxonomy'], array( 'edit_terms', 'assign_terms' ) );
233
 
234
  $cap_properties['delete']['type'] = array( 'delete_posts', 'delete_others_posts' );
235
  $cap_properties['delete']['type'] = array_merge( $cap_properties['delete']['type'], array( 'delete_published_posts', 'delete_private_posts' ) );
236
 
237
- if ( ! defined( 'PP_ACTIVE' ) )
238
  $cap_properties['delete']['taxonomy'] = array( 'delete_terms' );
239
  else
240
  $cap_properties['delete']['taxonomy'] = array();
@@ -271,9 +276,10 @@ if( defined('PP_ACTIVE') ) {
271
  $type_caps = array();
272
 
273
  // Role Scoper and PP1 adjust attachment access based only on user's capabilities for the parent post
274
- if ( defined('SCOPER_VERSION') || ( defined( 'PP_ACTIVE' ) && ! defined( 'PPC_VERSION' ) ) )
275
  unset( $defined['type']['attachment'] );
276
-
 
277
  echo '<ul class="cme-listhoriz">';
278
 
279
  // cap_types: read, edit, deletion
@@ -284,8 +290,9 @@ if( defined('PP_ACTIVE') ) {
284
 
285
  foreach( array_keys($defined) as $item_type ) {
286
  if ( ( 'delete' == $cap_type ) && ( 'taxonomy' == $item_type ) ) {
287
- if ( defined('SCOPER_VERSION') || defined('PP_ACTIVE') )
288
  continue;
 
289
 
290
  $any_term_deletion_caps = false;
291
  foreach( array_keys($defined['taxonomy']) as $_tax ) {
@@ -316,14 +323,18 @@ if( defined('PP_ACTIVE') ) {
316
  $prop = str_replace( '_', '<br />', $prop );
317
  $th_class = ( 'taxonomy' == $item_type ) ? ' class="term-cap"' : ' class="post-cap"';
318
  echo "<th $tip{$th_class}>";
319
- echo ucwords($prop);
 
 
 
 
320
  echo '</th>';
321
  }
322
 
323
  foreach( $defined[$item_type] as $key => $type_obj ) {
324
  if ( in_array( $key, $unfiltered[$item_type] ) )
325
  continue;
326
-
327
  $row = "<tr class='cme_type_{$key}'>";
328
 
329
  if ( $cap_type ) {
@@ -333,12 +344,13 @@ if( defined('PP_ACTIVE') ) {
333
  $row .= "<td><a class='cap_type' href='#toggle_type_caps'>" . $type_obj->labels->name . '</a>';
334
  $row .= '<a href="#" class="neg-type-caps">&nbsp;x&nbsp;</a>';
335
  $row .= '</td>';
336
-
337
  $display_row = ! empty($force_distinct_ui);
338
 
339
  foreach( $cap_properties[$cap_type][$item_type] as $prop ) {
340
  $td_classes = array();
341
  $checkbox = '';
 
342
 
343
  if ( ! empty($type_obj->cap->$prop) && ( in_array( $type_obj->name, array( 'post', 'page' ) )
344
  || ! in_array( $type_obj->cap->$prop, $default_caps )
@@ -347,7 +359,28 @@ if( defined('PP_ACTIVE') ) {
347
  // if edit_published or edit_private cap is same as edit_posts cap, don't display a checkbox for it
348
  if ( ( ! in_array( $prop, array( 'edit_published_posts', 'edit_private_posts', 'create_posts' ) ) || ( $type_obj->cap->$prop != $type_obj->cap->edit_posts ) )
349
  && ( ! in_array( $prop, array( 'delete_published_posts', 'delete_private_posts' ) ) || ( $type_obj->cap->$prop != $type_obj->cap->delete_posts ) )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  ) {
 
 
 
 
 
351
  $cap_name = $type_obj->cap->$prop;
352
 
353
  if ( 'taxonomy' == $item_type )
@@ -372,17 +405,21 @@ if( defined('PP_ACTIVE') ) {
372
  $type_caps [$cap_name] = true;
373
  $display_row = true;
374
  }
375
- } else
376
- $td_classes []= "cap-unreg";
 
 
377
 
378
- if ( isset($rcaps[$cap_name]) && empty($rcaps[$cap_name]) )
379
  $td_classes []= "cap-neg";
380
- } else
 
381
  $td_classes []= "cap-unreg";
 
382
 
383
  $td_class = ( $td_classes ) ? 'class="' . implode(' ', $td_classes) . '"' : '';
384
 
385
- $row .= "<td $td_class><span class='cap-x'>X</span>$checkbox";
386
 
387
  if ( false !== strpos( $td_class, 'cap-neg' ) )
388
  $row .= '<input type="hidden" class="cme-negation-input" name="caps[' . $cap_name . ']" value="" />';
@@ -421,21 +458,14 @@ if( defined('PP_ACTIVE') ) {
421
  /* ]]> */
422
  </script>
423
  <?php
424
-
425
- $core_caps = array_fill_keys( array( 'switch_themes', 'edit_themes', 'activate_plugins', 'edit_plugins', 'edit_users', 'edit_files', 'manage_options', 'moderate_comments',
426
- 'manage_links', 'upload_files', 'import', 'unfiltered_html', 'read', 'delete_users', 'create_users', 'unfiltered_upload', 'edit_dashboard',
427
- 'update_plugins', 'delete_plugins', 'install_plugins', 'update_themes', 'install_themes',
428
- 'update_core', 'list_users', 'remove_users', 'add_users', 'promote_users', 'edit_theme_options', 'delete_themes', 'export' ), true );
429
-
430
- ksort( $core_caps );
431
 
432
  echo '<p>&nbsp;</p><h3>' . __( 'Other WordPress Core Capabilities', 'capsman-enhanced' ) . '</h3>';
433
  echo '<table width="100%" class="form-table cme-checklist"><tr>';
434
 
435
-
436
  $checks_per_row = get_option( 'cme_form-rows', 5 );
437
  $i = 0; $first_row = true;
438
 
 
439
  foreach( array_keys($core_caps) as $cap_name ) {
440
  if ( ! $is_administrator && ! current_user_can($cap_name) )
441
  continue;
@@ -460,22 +490,26 @@ if( defined('PP_ACTIVE') ) {
460
  $disabled = '';
461
  $checked = checked(1, ! empty($rcaps[$cap_name]), false );
462
  $lock_capability = false;
 
463
 
464
  if ( 'read' == $cap_name ) {
465
- if ( in_array( $default, $this->core_roles ) ) {
466
  // prevent the read capability from being removed from a core role, but don't force it to be added
467
  if ( $checked || apply_filters( 'pp_caps_force_capability_storage', false, 'read', $default ) ) {
468
  if ( apply_filters( 'pp_caps_lock_capability', true, 'read', $default ) ) {
469
  $lock_capability = true;
470
  $class .= ' cap-locked';
471
  $disabled = 'disabled="disabled"';
 
 
 
472
  }
473
  }
474
  }
475
  }
476
 
477
  ?>
478
- <td class="<?php echo $class; ?>"><span class="cap-x">X</span><label for="caps[<?php echo $cap_name; ?>]" title="<?php echo $title_text;?>"><input id=caps[<?php echo $cap_name; ?>] type="checkbox" name="caps[<?php echo $cap_name; ?>]" value="1" <?php echo $checked . $disabled;?> />
479
  <span>
480
  <?php
481
  echo str_replace( '_', ' ', $cap_name );
@@ -633,7 +667,7 @@ if( defined('PP_ACTIVE') ) {
633
  </table>
634
 
635
  <br />
636
- <?php if ( ! defined('PP_ACTIVE') || pp_get_option('display_hints') ) :?>
637
  <div class="cme-subtext">
638
  <?php _e( 'Note: Underscores replace spaces in stored capability name ("edit users" => "edit_users").', 'capsman-enhanced' ); ?>
639
  </div>
@@ -644,7 +678,7 @@ if( defined('PP_ACTIVE') ) {
644
  </dl>
645
 
646
  <?php
647
- $support_pp_only_roles = ( defined('PP_ACTIVE') ) ? $pp_ui->pp_only_roles_ui( $default ) : false;
648
  cme_network_role_ui( $default );
649
  ?>
650
 
@@ -654,7 +688,7 @@ if( defined('PP_ACTIVE') ) {
654
  <input type="submit" name="SaveRole" value="<?php _e('Save Changes', 'capsman-enhanced') ?>" class="button-primary" /> &nbsp;
655
 
656
  <?php if ( current_user_can('administrator') && 'administrator' != $default ) : ?>
657
- <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 'Cancel' to stop, 'OK' to delete.", 'capsman-enhanced'), $roles[$default])); ?>') ) { return true;}return false;"><?php _e('Delete Role', 'capsman-enhanced')?></a>
658
  <?php endif; ?>
659
  </p>
660
 
@@ -685,7 +719,7 @@ if( defined('PP_ACTIVE') ) {
685
  <dt><?php _e('Create New Role', 'capsman-enhanced'); ?></dt>
686
  <dd style="text-align:center;">
687
  <?php $class = ( $support_pp_only_roles ) ? 'tight-text' : 'regular-text'; ?>
688
- <p><input type="text" name="create-name"" class="<?php echo $class;?>" placeholder="<?php _e('Name of new role', 'capsman-enhanced') ?>" />
689
 
690
  <?php if( $support_pp_only_roles ) : ?>
691
  <label for="new_role_pp_only" title="<?php _e('Make role available for supplemental assignment to Permission Groups only', 'capsman-enhanced');?>"> <input type="checkbox" name="new_role_pp_only" id="new_role_pp_only" value="1"> <?php _e('hidden', 'capsman-enhanced'); ?> </label>
@@ -701,7 +735,7 @@ if( defined('PP_ACTIVE') ) {
701
  <dt><?php defined('WPLANG') && WPLANG ? _e('Copy this role to', 'capsman-enhanced') : printf( 'Copy %s Role', $roles[$default] ); ?></dt>
702
  <dd style="text-align:center;">
703
  <?php $class = ( $support_pp_only_roles ) ? 'tight-text' : 'regular-text'; ?>
704
- <p><input type="text" name="copy-name" class="<?php echo $class;?>" placeholder="<?php _e('Name of copied role', 'capsman-enhanced') ?>" />
705
 
706
  <?php if( $support_pp_only_roles ) : ?>
707
  <label for="copy_role_pp_only" title="<?php _e('Make role available for supplemental assignment to Permission Groups only', 'capsman-enhanced');?>"> <input type="checkbox" name="copy_role_pp_only" id="copy_role_pp_only" value="1"> <?php _e('hidden', 'capsman-enhanced'); ?> </label>
@@ -716,12 +750,12 @@ if( defined('PP_ACTIVE') ) {
716
  <dl>
717
  <dt><?php _e('Add Capability', 'capsman-enhanced'); ?></dt>
718
  <dd style="text-align:center;">
719
- <p><input type="text" name="capability-name" class="regular-text" placeholder="<?php _e('capability name', 'capsman-enhanced') ?>" /><br />
720
  <input type="submit" name="AddCap" value="<?php _e('Add to role', 'capsman-enhanced') ?>" class="button" /></p>
721
  </dd>
722
  </dl>
723
 
724
- <dl>
725
  <dt><?php _e('Backup Tool', 'capsman-enhanced'); ?></dt>
726
  <dd style="text-align:center;">
727
  <p><a href="tools.php?page=capsman-tool"><?php _e('Backup / Restore Roles', 'capsman-enhanced');?></a></p>
@@ -743,11 +777,13 @@ if( defined('PP_ACTIVE') ) {
743
  $url = ( is_multisite() ) ? network_admin_url($_url) : admin_url($_url);
744
  ?>
745
  <li><a class="thickbox" href="<?php echo $url;?>"><?php _e('Revisionary', 'capsman-enhanced');?></a></li>
 
746
  </ul>
747
  </dl>
748
 
749
- <?php if ( defined('PP_ACTIVE') )
750
- $pp_ui->pp_types_ui( $defined );
 
751
  ?>
752
  </td>
753
  </tr>
8
  * @license GNU General Public License version 2
9
  * @link https://publishpress.com
10
  *
11
+ *
12
+ * Copyright 2009, 2010 Jordi Canals <devel@jcanals.cat>
13
+ * Modifications Copyright 2019, PublishPress <help@publishpress.com>
14
+ *
15
+ * This program is free software; you can redistribute it and/or
16
+ * modify it under the terms of the GNU General Public License
17
+ * version 2 as published by the Free Software Foundation.
18
+ *
19
+ * This program is distributed in the hope that it will be useful,
20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ * GNU General Public License for more details.
23
+ *
24
+ * You should have received a copy of the GNU General Public License
25
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+ **/
27
 
28
+ global $capsman, $cme_cap_helper;
 
 
 
 
 
 
 
 
 
 
29
 
30
+ $roles = $this->roles;
31
+ $default = $this->current;
 
32
 
33
+ if ( $block_read_removal = _cme_is_read_removal_blocked( $this->current ) ) {
34
+ if ( $current = get_role($default) ) {
35
+ if ( empty( $current->capabilities['read'] ) ) {
36
+ ak_admin_error( sprintf( __( 'Warning: This role cannot access the dashboard without the read capability. %1$sClick here to fix this now%2$s.', 'capsman-enhanced' ), '<a href="javascript:void(0)" class="cme-fix-read-cap">', '</a>' ) );
37
+ }
38
  }
39
  }
 
 
 
40
 
41
+ require_once( dirname(__FILE__).'/pp-ui.php' );
42
+ $pp_ui = new Capsman_PP_UI();
43
+
44
+ if( defined('PRESSPERMIT_ACTIVE') ) {
45
  $pp_metagroup_caps = $pp_ui->get_metagroup_caps( $default );
46
+ } else {
47
  $pp_metagroup_caps = array();
48
+ }
49
  ?>
50
  <div class="wrap">
51
+ <?php if( defined('PRESSPERMIT_ACTIVE') ) :
52
  pp_icon();
53
  $style = 'style="height:60px;"';
54
  ?>
72
  <div style="float:right">
73
  <input type="submit" name="SaveRole" value="<?php _e('Save Changes', 'capsman-enhanced') ?>" class="button-primary" /> &nbsp;
74
  </div>
 
 
 
 
75
 
76
  <?php
77
+ global $capsman;
78
+ $img_url = $capsman->mod_url . '/images/';
79
+ ?>
80
+ <div class="publishpress-headline">
81
+ <span class="cme-subtext">
82
+ <?php _e( '<strong>Note:</strong> Capability changes <strong>remain in the database</strong> after plugin deactivation.', 'capsman-enhanced' ); ?>
83
+ </span>
84
+ <span class="publishpress-thanks"> <?php printf( __( 'Thanks for using the %1$sPublishPress%2$s family of professional publishing tools.', 'capsman-enhanced'), '<a href="https://publishpress.com/" target="_blank">', '</a>' );?></span>
85
+ </div>
86
+
87
+ <?php
88
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) ) {
89
  $pp_ui->show_capability_hints( $default );
90
+ }
91
+ ?>
92
+
93
+ <script type="text/javascript">
94
+ /* <![CDATA[ */
95
+ jQuery(document).ready( function($) {
96
+ $('a[href="#pp-more"]').click( function() {
97
+ $('#pp_features').show();
98
+ return false;
 
 
 
 
 
 
 
 
 
 
 
99
  });
100
+ $('a[href="#pp-hide"]').click( function() {
101
+ $('#pp_features').hide();
102
+ return false;
103
+ });
104
+ });
105
+ /* ]]> */
106
+ </script>
107
+ <style>
108
+ #pp_features {display:none;border:1px solid #eee;padding:5px;text-align:center;min-width:600px}
109
+ div.pp-logo { text-align: center }
110
+ div.features-wrap { margin-left: auto; margin-right: auto; text-align: center; width: 540px; }
111
+ ul.pp-features { list-style: none; padding-top:10px; text-align:left; margin-left: auto }
112
+ ul.pp-features li:before { content: "\2713\0020"; }
113
+ ul.pp-features li { padding-bottom: 5px }
114
+ img.cme-play { margin-bottom: -3px; margin-left: 5px;}
115
+ </style>
116
+
117
+ <?php /* play.png icon by Pavel: http://kde-look.org/usermanager/search.php?username=InFeRnODeMoN */ ?>
118
+
119
+ <br /><div id="pp_features"><div class="pp-logo"><a href="http://presspermit.com"><img src="<?php echo $img_url;?>pp-logo.png" /></a></div><div class="features-wrap"><ul class="pp-features">
120
+ <li>
121
+ <?php _e( "Automatically define type-specific capabilities for your custom post types and taxonomies", 'capsman-enhanced' );?>
122
+ <a href="http://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
123
+
124
+ <li>
125
+ <?php _e( "Assign standard WP roles supplementally for a specific post type", 'capsman-enhanced' );?>
126
+ <a href="http://presspermit.com/tutorial/regulate-post-type-access" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
127
+
128
+ <li>
129
+ <?php _e( "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>", 'capsman-enhanced' );?>
130
+ <a href="http://presspermit.com/tutorial/custom-role-usage" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
131
+
132
+ <li>
133
+ <?php _e( "Customize reading permissions per-category or per-post", 'capsman-enhanced' );?>
134
+ <a href="http://presspermit.com/tutorial/category-exceptions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
135
+
136
+ <li>
137
+ <?php _e( "Customize editing permissions per-category or per-post <em>(Pro)</em>", 'capsman-enhanced' );?>
138
+ <a href="http://presspermit.com/tutorial/page-editing-exceptions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
139
+
140
+ <li>
141
+ <?php _e( "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>", 'capsman-enhanced' );?>
142
+ <a href="http://presspermit.com/tutorial/custom-post-visibility" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
143
+
144
+ <li>
145
+ <?php _e( "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>", 'capsman-enhanced' );?>
146
+ <a href="http://presspermit.com/tutorial/multi-step-moderation" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
147
+
148
+ <li>
149
+ <?php _e( "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>", 'capsman-enhanced' );?>
150
+ <a href="http://presspermit.com/tutorial/edit-flow-integration" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
151
+
152
+ <li>
153
+ <?php _e( "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>", 'capsman-enhanced' );?>
154
+ <a href="http://presspermit.com/tutorial/published-content-revision" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
155
+
156
+ <li>
157
+ <?php _e( "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>", 'capsman-enhanced' );?>
158
+ <a href="http://presspermit.com/tutorial/bbpress-exceptions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
159
+
160
+ <li>
161
+ <?php _e( "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>", 'capsman-enhanced' );?>
162
+ <a href="http://presspermit.com/tutorial/buddypress-content-permissions" target="_blank"><img class="cme-play" src="<?php echo $img_url;?>play.png" /></a></li>
163
+
164
+ <li>
165
+ <?php _e( "WPML integration to mirror permissions to translations <em>(Pro)</em>", 'capsman-enhanced' );?>
166
+ </li>
167
+
168
+ <li>
169
+ <?php _e( "Member support forum", 'capsman-enhanced' );?>
170
+ </li>
171
+
172
+ </ul></div>
173
+ <?php
174
+ echo '<div>';
175
+ printf( __('%1$sgrab%2$s %3$s', 'capsman-enhanced'), '<strong>', '</strong>', '<span class="plugins update-message"><a href="' . cme_plugin_info_url('press-permit-core') . '" class="thickbox" title="' . sprintf( __('%s (free install)', 'capsman-enhanced'), 'Press Permit Core' ) . '">Press&nbsp;Permit&nbsp;Core</a></span>' );
176
+ echo '&nbsp;&nbsp;&bull;&nbsp;&nbsp;';
177
+ printf( __('%1$sbuy%2$s %3$s', 'capsman-enhanced'), '<strong>', '</strong>', '<a href="http://presspermit.com" target="_blank" title="' . sprintf( __('%s info/purchase', 'capsman-enhanced'), 'Press Permit Pro' ) . '">Press&nbsp;Permit&nbsp;Pro</a>' );
178
+ echo '&nbsp;&nbsp;&bull;&nbsp;&nbsp;';
179
+ echo '<a href="#pp-hide">hide</a>';
180
+ echo '</div></div>';
181
 
182
  if ( MULTISITE ) {
183
  global $wp_roles;
190
 
191
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
192
  }
 
 
193
  $capsman->reinstate_db_roles();
194
 
195
  $current = get_role($default);
196
 
197
  $rcaps = $current->capabilities;
198
 
 
199
  $is_administrator = current_user_can( 'administrator' );
200
 
201
  $custom_types = get_post_types( array( '_builtin' => false ), 'names' );
202
  $custom_tax = get_taxonomies( array( '_builtin' => false ), 'names' );
203
 
204
  $defined = array();
205
+ $defined['type'] = get_post_types( array( 'public' => true, 'show_ui' => true ), 'object', 'or' );
206
  $defined['taxonomy'] = get_taxonomies( array( 'public' => true ), 'object' );
207
 
208
+ $unfiltered['type'] = apply_filters( 'pp_unfiltered_post_types', array( 'forum','topic','reply','wp_block' ) ); // bbPress' dynamic role def requires additional code to enforce stored caps
209
  $unfiltered['taxonomy'] = apply_filters( 'pp_unfiltered_taxonomies', array( 'post_status', 'topic-tag' ) ); // avoid confusion with Edit Flow administrative taxonomy
210
+
211
+ $enabled_taxonomies = cme_get_assisted_taxonomies();
212
+
213
  /*
214
  if ( ( count($custom_types) || count($custom_tax) ) && ( $is_administrator || current_user_can( 'manage_pp_settings' ) ) ) {
215
  $cap_properties[''] = array();
233
 
234
  $cap_properties['edit']['taxonomy'] = array( 'manage_terms' );
235
 
236
+ if ( ! defined( 'OLD_PRESSPERMIT_ACTIVE' ) )
237
  $cap_properties['edit']['taxonomy'] = array_merge( $cap_properties['edit']['taxonomy'], array( 'edit_terms', 'assign_terms' ) );
238
 
239
  $cap_properties['delete']['type'] = array( 'delete_posts', 'delete_others_posts' );
240
  $cap_properties['delete']['type'] = array_merge( $cap_properties['delete']['type'], array( 'delete_published_posts', 'delete_private_posts' ) );
241
 
242
+ if ( ! defined( 'OLD_PRESSPERMIT_ACTIVE' ) )
243
  $cap_properties['delete']['taxonomy'] = array( 'delete_terms' );
244
  else
245
  $cap_properties['delete']['taxonomy'] = array();
276
  $type_caps = array();
277
 
278
  // Role Scoper and PP1 adjust attachment access based only on user's capabilities for the parent post
279
+ if ( defined('OLD_PRESSPERMIT_ACTIVE') ) {
280
  unset( $defined['type']['attachment'] );
281
+ }
282
+
283
  echo '<ul class="cme-listhoriz">';
284
 
285
  // cap_types: read, edit, deletion
290
 
291
  foreach( array_keys($defined) as $item_type ) {
292
  if ( ( 'delete' == $cap_type ) && ( 'taxonomy' == $item_type ) ) {
293
+ if ( defined('OLD_PRESSPERMIT_ACTIVE') ) {
294
  continue;
295
+ }
296
 
297
  $any_term_deletion_caps = false;
298
  foreach( array_keys($defined['taxonomy']) as $_tax ) {
323
  $prop = str_replace( '_', '<br />', $prop );
324
  $th_class = ( 'taxonomy' == $item_type ) ? ' class="term-cap"' : ' class="post-cap"';
325
  echo "<th $tip{$th_class}>";
326
+
327
+ if ( ( 'delete' != $prop ) || ( 'taxonomy' != $item_type ) || cme_get_detailed_taxonomies() ) {
328
+ echo ucwords($prop);
329
+ }
330
+
331
  echo '</th>';
332
  }
333
 
334
  foreach( $defined[$item_type] as $key => $type_obj ) {
335
  if ( in_array( $key, $unfiltered[$item_type] ) )
336
  continue;
337
+
338
  $row = "<tr class='cme_type_{$key}'>";
339
 
340
  if ( $cap_type ) {
344
  $row .= "<td><a class='cap_type' href='#toggle_type_caps'>" . $type_obj->labels->name . '</a>';
345
  $row .= '<a href="#" class="neg-type-caps">&nbsp;x&nbsp;</a>';
346
  $row .= '</td>';
347
+
348
  $display_row = ! empty($force_distinct_ui);
349
 
350
  foreach( $cap_properties[$cap_type][$item_type] as $prop ) {
351
  $td_classes = array();
352
  $checkbox = '';
353
+ $title = '';
354
 
355
  if ( ! empty($type_obj->cap->$prop) && ( in_array( $type_obj->name, array( 'post', 'page' ) )
356
  || ! in_array( $type_obj->cap->$prop, $default_caps )
359
  // if edit_published or edit_private cap is same as edit_posts cap, don't display a checkbox for it
360
  if ( ( ! in_array( $prop, array( 'edit_published_posts', 'edit_private_posts', 'create_posts' ) ) || ( $type_obj->cap->$prop != $type_obj->cap->edit_posts ) )
361
  && ( ! in_array( $prop, array( 'delete_published_posts', 'delete_private_posts' ) ) || ( $type_obj->cap->$prop != $type_obj->cap->delete_posts ) )
362
+ && ( ! in_array( $prop, array( 'edit_terms', 'delete_terms' ) ) || ( $type_obj->cap->$prop != $type_obj->cap->manage_terms ) )
363
+
364
+ && ( ! in_array( $prop, array( 'manage_terms', 'edit_terms', 'delete_terms', 'assign_terms' ) )
365
+ || ( $cme_cap_helper->all_taxonomy_caps[ $type_obj->cap->$prop ] <= 1 )
366
+ || $type_obj->cap->$prop == str_replace( '_terms', "_{$type_obj->name}s", $prop )
367
+ || $type_obj->cap->$prop == str_replace( '_terms', "_" . _cme_get_plural($type_obj->name, $type_obj), $prop )
368
+ )
369
+
370
+ && ( in_array( $prop, array( 'manage_terms', 'edit_terms', 'delete_terms', 'assign_terms' ) )
371
+ || ( $cme_cap_helper->all_type_caps[ $type_obj->cap->$prop ] <= 1 )
372
+ || $type_obj->cap->$prop == 'upload_files' && 'create_posts' == $prop && 'attachment' == $type_obj->name
373
+ || $type_obj->cap->$prop == str_replace( '_posts', "_{$type_obj->name}s", $prop )
374
+ || $type_obj->cap->$prop == str_replace( '_pages', "_{$type_obj->name}s", $prop )
375
+ || $type_obj->cap->$prop == str_replace( '_posts', "_" . _cme_get_plural($type_obj->name, $type_obj), $prop )
376
+ || $type_obj->cap->$prop == str_replace( '_pages', "_" . _cme_get_plural($type_obj->name, $type_obj), $prop )
377
+ )
378
  ) {
379
+ // only present these term caps up top if we are ensuring that they get enforced separately from manage_terms
380
+ if ( in_array( $prop, array( 'edit_terms', 'delete_terms', 'assign_terms' ) ) && ( ! in_array( $type_obj->name, cme_get_detailed_taxonomies() ) || defined( 'OLD_PRESSPERMIT_ACTIVE' ) ) ) {
381
+ continue;
382
+ }
383
+
384
  $cap_name = $type_obj->cap->$prop;
385
 
386
  if ( 'taxonomy' == $item_type )
405
  $type_caps [$cap_name] = true;
406
  $display_row = true;
407
  }
408
+ } else {
409
+ //$td_classes []= "cap-unreg";
410
+ $title = 'title="' . sprintf( __( 'shared capability: %s', 'capsman-enhanced' ), esc_attr( $type_obj->cap->$prop ) ) . '"';
411
+ }
412
 
413
+ if ( isset($rcaps[$cap_name]) && empty($rcaps[$cap_name]) ) {
414
  $td_classes []= "cap-neg";
415
+ }
416
+ } else {
417
  $td_classes []= "cap-unreg";
418
+ }
419
 
420
  $td_class = ( $td_classes ) ? 'class="' . implode(' ', $td_classes) . '"' : '';
421
 
422
+ $row .= "<td $td_class $title><span class='cap-x'>X</span>$checkbox";
423
 
424
  if ( false !== strpos( $td_class, 'cap-neg' ) )
425
  $row .= '<input type="hidden" class="cme-negation-input" name="caps[' . $cap_name . ']" value="" />';
458
  /* ]]> */
459
  </script>
460
  <?php
 
 
 
 
 
 
 
461
 
462
  echo '<p>&nbsp;</p><h3>' . __( 'Other WordPress Core Capabilities', 'capsman-enhanced' ) . '</h3>';
463
  echo '<table width="100%" class="form-table cme-checklist"><tr>';
464
 
 
465
  $checks_per_row = get_option( 'cme_form-rows', 5 );
466
  $i = 0; $first_row = true;
467
 
468
+ $core_caps = _cme_core_caps();
469
  foreach( array_keys($core_caps) as $cap_name ) {
470
  if ( ! $is_administrator && ! current_user_can($cap_name) )
471
  continue;
490
  $disabled = '';
491
  $checked = checked(1, ! empty($rcaps[$cap_name]), false );
492
  $lock_capability = false;
493
+ $title = $title_text;
494
 
495
  if ( 'read' == $cap_name ) {
496
+ if ( ! empty( $block_read_removal ) ) {
497
  // prevent the read capability from being removed from a core role, but don't force it to be added
498
  if ( $checked || apply_filters( 'pp_caps_force_capability_storage', false, 'read', $default ) ) {
499
  if ( apply_filters( 'pp_caps_lock_capability', true, 'read', $default ) ) {
500
  $lock_capability = true;
501
  $class .= ' cap-locked';
502
  $disabled = 'disabled="disabled"';
503
+ if ( 'administrator' != $this->current ) {
504
+ $title = esc_attr( __('Lockout Prevention: To remove read capability, first remove WordPress admin / editing capabilities, or add "dashboard_lockout_ok" capability', 'capsman-enhanced' ) );
505
+ }
506
  }
507
  }
508
  }
509
  }
510
 
511
  ?>
512
+ <td class="<?php echo $class; ?>"><span class="cap-x">X</span><label for="caps[<?php echo $cap_name; ?>]" title="<?php echo $title;?>"><input id=caps[<?php echo $cap_name; ?>] type="checkbox" name="caps[<?php echo $cap_name; ?>]" value="1" <?php echo $checked . $disabled;?> />
513
  <span>
514
  <?php
515
  echo str_replace( '_', ' ', $cap_name );
667
  </table>
668
 
669
  <br />
670
+ <?php if ( ! defined('PRESSPERMIT_ACTIVE') || capsman_get_pp_option('display_hints') ) :?>
671
  <div class="cme-subtext">
672
  <?php _e( 'Note: Underscores replace spaces in stored capability name ("edit users" => "edit_users").', 'capsman-enhanced' ); ?>
673
  </div>
678
  </dl>
679
 
680
  <?php
681
+ $support_pp_only_roles = ( defined('PRESSPERMIT_ACTIVE') ) ? $pp_ui->pp_only_roles_ui( $default ) : false;
682
  cme_network_role_ui( $default );
683
  ?>
684
 
688
  <input type="submit" name="SaveRole" value="<?php _e('Save Changes', 'capsman-enhanced') ?>" class="button-primary" /> &nbsp;
689
 
690
  <?php if ( current_user_can('administrator') && 'administrator' != $default ) : ?>
691
+ <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>
692
  <?php endif; ?>
693
  </p>
694
 
719
  <dt><?php _e('Create New Role', 'capsman-enhanced'); ?></dt>
720
  <dd style="text-align:center;">
721
  <?php $class = ( $support_pp_only_roles ) ? 'tight-text' : 'regular-text'; ?>
722
+ <p><input type="text" name="create-name"" class="<?php echo $class;?>" placeholder="<?php _e('Role Name', 'capsman-enhanced') ?>" />
723
 
724
  <?php if( $support_pp_only_roles ) : ?>
725
  <label for="new_role_pp_only" title="<?php _e('Make role available for supplemental assignment to Permission Groups only', 'capsman-enhanced');?>"> <input type="checkbox" name="new_role_pp_only" id="new_role_pp_only" value="1"> <?php _e('hidden', 'capsman-enhanced'); ?> </label>
735
  <dt><?php defined('WPLANG') && WPLANG ? _e('Copy this role to', 'capsman-enhanced') : printf( 'Copy %s Role', $roles[$default] ); ?></dt>
736
  <dd style="text-align:center;">
737
  <?php $class = ( $support_pp_only_roles ) ? 'tight-text' : 'regular-text'; ?>
738
+ <p><input type="text" name="copy-name" class="<?php echo $class;?>" placeholder="<?php _e('Role Name', 'capsman-enhanced') ?>" />
739
 
740
  <?php if( $support_pp_only_roles ) : ?>
741
  <label for="copy_role_pp_only" title="<?php _e('Make role available for supplemental assignment to Permission Groups only', 'capsman-enhanced');?>"> <input type="checkbox" name="copy_role_pp_only" id="copy_role_pp_only" value="1"> <?php _e('hidden', 'capsman-enhanced'); ?> </label>
750
  <dl>
751
  <dt><?php _e('Add Capability', 'capsman-enhanced'); ?></dt>
752
  <dd style="text-align:center;">
753
+ <p><input type="text" name="capability-name" class="regular-text" placeholder="<?php echo 'capability_name';?>" /><br />
754
  <input type="submit" name="AddCap" value="<?php _e('Add to role', 'capsman-enhanced') ?>" class="button" /></p>
755
  </dd>
756
  </dl>
757
 
758
+ <dl class="cme-backup-tool">
759
  <dt><?php _e('Backup Tool', 'capsman-enhanced'); ?></dt>
760
  <dd style="text-align:center;">
761
  <p><a href="tools.php?page=capsman-tool"><?php _e('Backup / Restore Roles', 'capsman-enhanced');?></a></p>
777
  $url = ( is_multisite() ) ? network_admin_url($_url) : admin_url($_url);
778
  ?>
779
  <li><a class="thickbox" href="<?php echo $url;?>"><?php _e('Revisionary', 'capsman-enhanced');?></a></li>
780
+ <li class="publishpress-contact"><a href="https://publishpress.com/contact" target="_blank"><?php _e('Help / Contact Form', 'capsman-enhanced');?></a></li>
781
  </ul>
782
  </dl>
783
 
784
+ <?php
785
+ $pp_ui->pp_types_ui( $defined['type'] );
786
+ $pp_ui->pp_taxonomies_ui( $defined['taxonomy'] );
787
  ?>
788
  </td>
789
  </tr>
includes/cap-helper.php ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ // @todo: port improvements back to PP Core
5
+
6
+ class CME_Cap_Helper {
7
+ var $all_taxonomy_caps = array(); // $all_taxonomy_caps = array of capability names
8
+ var $all_type_caps = array(); // $all_type_caps = array of capability names
9
+ var $processed_types = array();
10
+ var $processed_taxonomies = array();
11
+
12
+ function __construct() {
13
+ $this->refresh();
14
+ }
15
+
16
+ function refresh() {
17
+ $this->force_distinct_post_caps();
18
+
19
+ // Work around bug in More Taxonomies (and possibly other plugins) where category taxonomy is overriden without setting it public
20
+ foreach( array( 'category', 'post_tag' ) as $taxonomy ) {
21
+ global $wp_taxonomies;
22
+ if ( isset( $wp_taxonomies[$taxonomy] ) )
23
+ $wp_taxonomies[$taxonomy]->public = true;
24
+ }
25
+
26
+ $this->force_distinct_taxonomy_caps();
27
+ }
28
+
29
+ function force_distinct_post_caps() { // for selected post types (as stored in option array pp_enabled_post_types)
30
+ global $wp_post_types, $wp_roles;
31
+
32
+ $core_meta_caps = array_fill_keys( array( 'read_post', 'edit_post', 'delete_post' ), true );
33
+
34
+ $append_caps = array( 'edit_published_posts' => 'edit_posts', 'edit_private_posts' => 'edit_posts', 'delete_posts' => 'edit_posts', 'delete_others_posts' => 'delete_posts', 'delete_published_posts' => 'delete_posts', 'delete_private_posts' => 'delete_posts', 'read' => 'read' );
35
+
36
+ if ( get_option('pp_define_create_posts_cap') ) {
37
+ foreach( array( 'post', 'page' ) as $post_type ) {
38
+ if ( $wp_post_types[$post_type]->cap->create_posts == $wp_post_types[$post_type]->cap->edit_posts ) {
39
+ $wp_post_types[$post_type]->cap->create_posts = "create_{$post_type}s";
40
+ }
41
+ }
42
+
43
+ foreach( cme_get_assisted_post_types() as $post_type ) {
44
+ if ( ! in_array( $post_type, array( 'post', 'page' ) ) ) {
45
+ if ( $wp_post_types[$post_type]->cap->create_posts == $wp_post_types[$post_type]->cap->edit_posts ) {
46
+ $wp_post_types[$post_type]->cap->create_posts = str_replace( 'edit_', 'create_', $wp_post_types[$post_type]->cap->edit_posts );
47
+ }
48
+ }
49
+ }
50
+
51
+ $append_caps['create_posts'] = 'create_posts';
52
+ }
53
+
54
+ // count the number of post types that use each capability
55
+ foreach( $wp_post_types as $post_type => $type_obj ) {
56
+ foreach( array_unique( (array) $type_obj->cap ) as $cap_name ) {
57
+ if ( ! isset( $this->all_type_caps[$cap_name] ) ) {
58
+ $this->all_type_caps[$cap_name] = 1;
59
+ } else {
60
+ $this->all_type_caps[$cap_name]++;
61
+ }
62
+ }
63
+ }
64
+
65
+ $post_caps = (array) $wp_post_types['post']->cap;
66
+ $page_caps = ( isset( $wp_post_types['page'] ) ) ? (array) $wp_post_types['page']->cap : array();
67
+
68
+ $enabled_types = array_diff( cme_get_assisted_post_types(), $this->processed_types );
69
+
70
+ // post types which are enabled for PP filtering must have distinct type-related cap definitions
71
+ foreach( $enabled_types as $post_type ) {
72
+ // append missing capability definitions
73
+ foreach( $append_caps as $prop => $default ) {
74
+ if ( ! isset( $wp_post_types[$post_type]->cap->$prop ) ) {
75
+ $wp_post_types[$post_type]->cap->$prop = ( 'read' == $prop ) ? 'read' : $wp_post_types[$post_type]->cap->$default;
76
+ }
77
+ }
78
+
79
+ $wp_post_types[$post_type]->map_meta_cap = true;
80
+
81
+ $type_caps = array_diff_key( (array) $wp_post_types[$post_type]->cap, $core_meta_caps );
82
+
83
+ $cap_base = ( 'attachment' == $post_type ) ? 'file' : $post_type;
84
+
85
+ $cap_properties = array_keys( $type_caps );
86
+
87
+ if ( 'attachment' == $post_type ) {
88
+ $cap_properties = array_diff( $cap_properties, array( 'publish_posts', 'edit_published_posts', 'delete_published_posts', 'edit_private_posts', 'delete_private_posts', 'read_private_posts' ) );
89
+ }
90
+
91
+ // 'read' is not converted to a type-specific equivalent, so disregard it for perf.
92
+ $cap_properties = array_diff( $cap_properties, array( 'read' ) );
93
+
94
+ foreach( $cap_properties as $k => $cap_property ) {
95
+ // If a cap property is set to one of the generic post type's caps, we will replace it
96
+ if ( ( 'post' != $post_type ) && in_array( $type_caps[$cap_property], $post_caps ) ) {
97
+ continue;
98
+ }
99
+
100
+ if ( ( 'page' != $post_type ) && in_array( $type_caps[$cap_property], $page_caps ) ) {
101
+ continue;
102
+ }
103
+
104
+ // If a cap property is non-generic and not used by any other post types, keep it as is
105
+ if ( $this->all_type_caps[ $type_caps[$cap_property] ] <= 1 ) {
106
+ unset( $cap_properties[$k] );
107
+
108
+ // If a cap property is used by any other post types, still keep it if it is the standard type-specific capability form for this post type
109
+ } elseif ( ( $type_caps[$cap_property] == str_replace( "_posts", "_{$post_type}s", $cap_property ) )
110
+ || ( $type_caps[$cap_property] == str_replace( "_pages", "_{$post_type}s", $cap_property ) ) ) {
111
+
112
+ unset( $cap_properties[$k] );
113
+
114
+ // If a cap property is used by any other post types, still keep it if it is the custom pluralized type-specific capability form for this post type
115
+ } else {
116
+ $plural_type = _cme_get_plural( $post_type, $wp_post_types[$post_type] );
117
+ if ( ( $type_caps[$cap_property] == str_replace( "_posts", "_{$plural_type}", $cap_property ) )
118
+ || ( $type_caps[$cap_property] == str_replace( "_pages", "_{$plural_type}", $cap_property ) ) ) {
119
+
120
+ unset( $cap_properties[$k] );
121
+ }
122
+ }
123
+ }
124
+
125
+ if ( ! $cap_properties ) {
126
+ // This post type has no defaulted cap properties that need to be made type-specific.
127
+ continue;
128
+ }
129
+
130
+ // Default plural slug
131
+ //$plural_type = "{$cap_base}s";
132
+
133
+ $plural_type = _cme_get_plural( $post_type, $wp_post_types[$post_type] );
134
+
135
+ if ( "{$cap_base}s" != $plural_type ) {
136
+ // If any role already has capabilities based on simple plural form, keep using that instead
137
+ foreach ( $wp_roles as $role ) {
138
+ foreach( array_keys( $type_caps ) as $cap_property ) {
139
+ $generic_type = ( strpos( $cap_property, '_pages' ) ) ? 'page' : 'post';
140
+
141
+ $simple_plural = str_replace( "_{$generic_type}s", "_{$cap_base}s", $cap_property );
142
+
143
+ if ( isset( $role->capabilities[$simple_plural] ) ) {
144
+ // A simple plural capability was manually stored to a role, so stick with that form
145
+ $plural_type = "{$cap_base}s";
146
+ break 2;
147
+ }
148
+ }
149
+ }
150
+ }
151
+
152
+ // Replace "edit_posts" and other post type caps with an equivalent for this post type, using pluralization determined above.
153
+ // If a this is a problem, register the post type with an array capability_type arg including the desired plural form.
154
+ // It is also possible to modify existing $wp_post_types[$post_type]->cap values by hooking to the init action at priority 40.
155
+ foreach( $cap_properties as $cap_property ) {
156
+ // create_posts capability may be defaulted to "edit_posts" / "edit_pages"
157
+ $generic_type = ( strpos( $cap_property, '_pages' ) ) ? 'page' : 'post';
158
+
159
+ $target_cap_property = ( 'create_posts' == $cap_property ) ? $wp_post_types[$generic_type]->cap->$cap_property : $cap_property;
160
+
161
+ if ( $plural_type != "{$cap_base}s" ) {
162
+ // Since plural form is not simple, first replace plurals ('edit_posts' > 'edit_doohickies')
163
+ $wp_post_types[$post_type]->cap->$cap_property = str_replace( "_{$generic_type}s", "_{$plural_type}", $target_cap_property );
164
+ } else {
165
+ // Replace based on simple plural ('edit_posts' > 'edit_doohickys')
166
+ $wp_post_types[$post_type]->cap->$cap_property = str_replace( "_{$generic_type}", "_{$cap_base}", $target_cap_property );
167
+ }
168
+ }
169
+
170
+ // Force distinct capability_type. This may be an array with plural form in second element (but not useful here if set as default 'post' / 'posts' ).
171
+ // Some caution here against changing the variable data type. Although array is supported, other plugin code may assume string.
172
+ if ( is_array( $wp_post_types[$post_type]->capability_type ) ) {
173
+ $wp_post_types[$post_type]->capability_type = array( $post_type, $plural_type );
174
+
175
+ } elseif ( in_array( $wp_post_types[$post_type]->capability_type, array('post','page') ) ) {
176
+ $wp_post_types[$post_type]->capability_type = $post_type;
177
+ }
178
+
179
+ $type_caps = array_diff_key( (array) $wp_post_types[$post_type]->cap, $core_meta_caps );
180
+
181
+ $wp_post_types[$post_type]->cap = (object) array_merge( (array) $wp_post_types[$post_type]->cap, $type_caps );
182
+
183
+ //$this->all_type_caps = array_merge( $this->all_type_caps, array_fill_keys( $type_caps, true ) );
184
+
185
+ foreach( array_unique( (array) $wp_post_types[$post_type]->cap ) as $cap_name ) {
186
+ if ( ! isset( $this->all_type_caps[$cap_name] ) ) {
187
+ $this->all_type_caps[$cap_name] = 1;
188
+ } else {
189
+ $this->all_type_caps[$cap_name]++;
190
+ }
191
+ }
192
+
193
+ } // end foreach post type
194
+
195
+ $this->processed_types = array_merge( $this->processed_types, $enabled_types );
196
+
197
+ // need this for casting to other types even if "post" type is not enabled for PP filtering
198
+ $wp_post_types['post']->cap->set_posts_status = 'set_posts_status';
199
+
200
+ if ( current_user_can( 'administrator' ) || current_user_can( 'pp_administer_content' ) ) { // @ todo: support restricted administrator
201
+ global $current_user;
202
+ $current_user->allcaps = array_merge( $current_user->allcaps, array_fill_keys( array_keys( $this->all_type_caps ), true ) );
203
+
204
+ global $pp_current_user;
205
+ if ( ! empty( $pp_current_user ) ) {
206
+ $pp_current_user->allcaps = array_merge( $pp_current_user->allcaps, array_fill_keys( array_keys( $this->all_type_caps ), true ) );
207
+ }
208
+ }
209
+
210
+ do_action( 'cme_distinct_post_capabilities', $enabled_types );
211
+ }
212
+
213
+ function force_distinct_taxonomy_caps() {
214
+ global $wp_taxonomies, $wp_roles;
215
+
216
+ $use_taxonomies = array_diff( cme_get_assisted_taxonomies(), $this->processed_taxonomies );
217
+ $detailed_taxonomies = cme_get_detailed_taxonomies();
218
+
219
+ $tx_specific_caps = array( 'manage_terms' => 'manage_terms', 'edit_terms' => 'manage_terms', 'delete_terms' => 'manage_terms' );
220
+ $tx_detail_caps = array( 'edit_terms' => 'edit_terms', 'delete_terms' => 'delete_terms', 'assign_terms' => 'assign_terms' );
221
+
222
+ $core_tx_caps = array();
223
+ $this->all_taxonomy_caps = array();
224
+
225
+ // currently, disallow category and post_tag cap use by selected custom taxonomies, but don't require category and post_tag to have different caps
226
+ $core_taxonomies = array( 'category' );
227
+ foreach( $core_taxonomies as $taxonomy ) {
228
+ foreach( array_keys($tx_specific_caps) as $cap_property ) {
229
+ $core_tx_caps[ $wp_taxonomies[$taxonomy]->cap->$cap_property ] = true;
230
+ }
231
+ }
232
+
233
+ // count the number of taxonomies that use each capability
234
+ foreach( $wp_taxonomies as $taxonomy => $tx_obj ) {
235
+ $this_tx_caps = array_unique( (array) $tx_obj->cap );
236
+
237
+ foreach( $this_tx_caps as $cap_name ) {
238
+ if ( ! isset( $this->all_taxonomy_caps[$cap_name] ) ) {
239
+ $this->all_taxonomy_caps[$cap_name] = 1;
240
+ } else {
241
+ $this->all_taxonomy_caps[$cap_name]++;
242
+ }
243
+ }
244
+ }
245
+
246
+ foreach( array_keys($wp_taxonomies) as $taxonomy ) {
247
+ if ( 'yes' == $wp_taxonomies[$taxonomy]->public ) { // clean up a GD Taxonomies quirk (otherwise wp_get_taxonomy_object will fail when filtering for public => true)
248
+ $wp_taxonomies[$taxonomy]->public = true;
249
+
250
+ } elseif ( ( '' === $wp_taxonomies[$taxonomy]->public ) && ( ! empty( $wp_taxonomies[$taxonomy]->query_var_bool ) ) ) { // clean up a More Taxonomies quirk (otherwise wp_get_taxonomy_object will fail when filtering for public => true)
251
+ $wp_taxonomies[$taxonomy]->public = true;
252
+ }
253
+
254
+ $tx_caps = (array) $wp_taxonomies[$taxonomy]->cap;
255
+
256
+ if ( ( ! in_array($taxonomy, $use_taxonomies) || empty( $wp_taxonomies[$taxonomy]->public ) ) && ( 'nav_menu' != $taxonomy ) )
257
+ continue;
258
+
259
+ if ( ! in_array( $taxonomy, $core_taxonomies ) ) {
260
+ // Default plural slug
261
+ //$plural_type = "{$taxonomy}s";
262
+
263
+ $plural_type = _cme_get_plural( $taxonomy, $wp_taxonomies[$taxonomy] );
264
+
265
+ if ( "{$taxonomy}s" != $plural_type ) {
266
+ // ... unless any role already has capabilities based on simple plural form
267
+ foreach ( $wp_roles as $role ) {
268
+ foreach( array_keys( $tx_caps ) as $cap_property ) {
269
+ $simple_plural = str_replace( "_terms", "_{$taxonomy}s", $cap_property );
270
+
271
+ if ( isset( $role->capabilities[$simple_plural] ) ) {
272
+ // A simple plural capability was manually stored to a role, so stick with that form
273
+ $plural_type = "{$taxonomy}s";
274
+ break 2;
275
+ }
276
+ }
277
+ }
278
+ }
279
+
280
+ // First, force taxonomy-specific capabilities.
281
+ // (Don't allow any capability defined for this taxonomy to match any capability defined for category or post tag (unless this IS category or post tag)
282
+ foreach( $tx_specific_caps as $cap_property => $replacement_cap_format ) {
283
+ // If this capability is also defined as another taxonomy cap, replace it
284
+ if ( ! empty($tx_caps[$cap_property]) && ( $this->all_taxonomy_caps[ $tx_caps[$cap_property] ] > 1 ) ) { // note: greater than check is on array value, not count
285
+
286
+ // ... but leave it alone if it is a standard taxonomy-specific cap for this taxonomy
287
+ if ( ( $tx_caps[$cap_property] != str_replace( '_terms', "_{$plural_type}", $cap_property ) )
288
+ && ( $tx_caps[$cap_property] != str_replace( '_terms', "_{$taxonomy}s", $cap_property ) ) ) {
289
+
290
+ $wp_taxonomies[$taxonomy]->cap->$cap_property = str_replace( '_terms', "_{$plural_type}", $replacement_cap_format );
291
+ }
292
+ }
293
+ }
294
+ $tx_caps = (array) $wp_taxonomies[$taxonomy]->cap;
295
+
296
+ // Optionally, also force edit_terms and delete_terms to be distinct from manage_terms, and force a distinct assign_terms capability
297
+ if ( in_array( $taxonomy, $detailed_taxonomies ) ) {
298
+ foreach( $tx_detail_caps as $cap_property => $replacement_cap_format ) {
299
+ if ( ! empty( $this->all_taxonomy_caps[ $tx_caps[$cap_property] ] ) ) {
300
+ // assign_terms is otherwise not forced taxonomy-distinct
301
+ $wp_taxonomies[$taxonomy]->cap->$cap_property = str_replace( '_terms', "_{$plural_type}", $replacement_cap_format );
302
+ break;
303
+ }
304
+
305
+ foreach( $tx_caps as $other_cap_property => $other_cap ) {
306
+ if ( $other_cap_property == $cap_property ) {
307
+ continue;
308
+ }
309
+
310
+ if ( $other_cap == $tx_caps[$cap_property] ) {
311
+ $wp_taxonomies[$taxonomy]->cap->$cap_property = str_replace( '_terms', "_{$plural_type}", $replacement_cap_format );
312
+ break;
313
+ }
314
+ }
315
+ }
316
+ }
317
+
318
+ $tx_caps = (array) $wp_taxonomies[$taxonomy]->cap;
319
+ }
320
+
321
+ foreach( array_unique( $tx_caps ) as $cap_name ) {
322
+ if ( ! isset( $this->all_taxonomy_caps[$cap_name] ) ) {
323
+ $this->all_taxonomy_caps[$cap_name] = 1;
324
+ } else {
325
+ $this->all_taxonomy_caps[$cap_name]++;
326
+ }
327
+ }
328
+ }
329
+
330
+ $this->all_taxonomy_caps = array_merge( $this->all_taxonomy_caps, array( 'assign_term' => true ) );
331
+
332
+ if ( current_user_can( 'administrator' ) || current_user_can( 'pp_administer_content' ) ) { // @ todo: support restricted administrator
333
+ global $current_user;
334
+ $current_user->allcaps = array_merge( $current_user->allcaps, array_fill_keys( array_keys( $this->all_taxonomy_caps ), true ) );
335
+
336
+ global $pp_current_user;
337
+ if ( ! empty( $pp_current_user ) ) {
338
+ $pp_current_user->allcaps = array_merge( $pp_current_user->allcaps, array_fill_keys( array_keys( $this->all_taxonomy_caps ), true ) );
339
+ }
340
+ }
341
+
342
+ // make sure Nav Menu Managers can also add menu items
343
+ global $wp_taxonomies;
344
+ $wp_taxonomies['nav_menu']->cap->assign_terms = 'manage_nav_menus';
345
+
346
+ $this->processed_taxonomies = array_merge( $this->processed_taxonomies, $use_taxonomies );
347
+ }
348
+ } // end class CME_Cap_Helper
includes/filters-woocommerce.php CHANGED
@@ -11,9 +11,26 @@ class CME_WooCommerce {
11
  if ( ! empty( $current_user->allcaps['duplicate_products'] ) ) {
12
  add_filter( 'woocommerce_duplicate_product_capability', array( &$this, 'implement_duplicate_product_cap' ) );
13
  }
 
 
 
14
  }
15
 
16
  function implement_duplicate_product_cap( $cap ) {
17
  return 'duplicate_products';
18
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
11
  if ( ! empty( $current_user->allcaps['duplicate_products'] ) ) {
12
  add_filter( 'woocommerce_duplicate_product_capability', array( &$this, 'implement_duplicate_product_cap' ) );
13
  }
14
+
15
+ // Ensure orders can be edited or added based the edit_orders / create_orders capability
16
+ add_action( '_admin_menu', array( &$this, 'support_order_caps' ), 1 );
17
  }
18
 
19
  function implement_duplicate_product_cap( $cap ) {
20
  return 'duplicate_products';
21
  }
22
+
23
+ function support_order_caps() {
24
+ global $submenu;
25
+
26
+ if ( $type_obj = get_post_type_object( 'shop_order' ) ) {
27
+ $key = 'edit.php?post_type=shop_order';
28
+ if ( ! isset( $submenu[$key] ) ) {
29
+ $submenu[$key] = array();
30
+ }
31
+
32
+ $submenu[$key][5] = array( 0 => sprintf( __( 'All %s' ), $type_obj->labels->name ), 1 => $type_obj->cap->edit_posts, 2 => 'edit.php' );
33
+ $submenu[$key][10] = array( __('Add New'), 1 => $type_obj->cap->create_posts, 2 => 'post-new.php?post_type=shop_order' );
34
+ }
35
+ }
36
  }
includes/filters.php CHANGED
@@ -19,7 +19,142 @@ class CME_Extensions {
19
  global $cme_extensions;
20
  $cme_extensions = new CME_Extensions();
21
 
 
 
22
  if ( defined( 'WC_PLUGIN_FILE' ) ) {
23
  require_once ( dirname(__FILE__) . '/filters-woocommerce.php' );
24
  $cme_extensions->add( new CME_WooCommerce() );
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  global $cme_extensions;
20
  $cme_extensions = new CME_Extensions();
21
 
22
+ add_filter( 'map_meta_cap', '_cme_remap_term_meta_cap', 5, 4 );
23
+
24
  if ( defined( 'WC_PLUGIN_FILE' ) ) {
25
  require_once ( dirname(__FILE__) . '/filters-woocommerce.php' );
26
  $cme_extensions->add( new CME_WooCommerce() );
27
+ }
28
+
29
+ // allow edit_terms, delete_terms, assign_terms capabilities to function separately from manage_terms
30
+ function _cme_remap_term_meta_cap ( $caps, $cap, $user_id, $args ) {
31
+ global $current_user, $cme_cap_helper;
32
+
33
+ if ( ! empty( $cme_cap_helper ) ) {
34
+ $cap_helper = $cme_cap_helper;
35
+ } else {
36
+ global $ppce_cap_helper;
37
+ if ( ! empty( $ppce_cap_helper ) ) {
38
+ $cap_helper = $ppce_cap_helper;
39
+ }
40
+ }
41
+
42
+ if ( empty($cap_helper) || empty( $cap_helper->all_taxonomy_caps[$cap] ) ) {
43
+ return $caps;
44
+ }
45
+
46
+ if ( ! $enabled_taxonomies = array_intersect( cme_get_assisted_taxonomies(), cme_get_detailed_taxonomies() ) ) {
47
+ return $caps;
48
+ }
49
+
50
+ // meta caps
51
+ switch ( $cap ) {
52
+ case 'edit_term':
53
+ case 'delete_term':
54
+ case 'assign_term':
55
+ $tx_cap = $cap . 's';
56
+
57
+ if ( ! is_array($args) || empty($args[0]) ) {
58
+ return $caps;
59
+ }
60
+
61
+ if ( $term = get_term( $args[0] ) ) {
62
+ if ( in_array( $term->taxonomy, $enabled_taxonomies ) ) {
63
+ if ( $tx_obj = get_taxonomy( $term->taxonomy ) ) {
64
+
65
+ // If this taxonomy is set for distinct capabilities, we don't want manage_terms capability to be implicitly assigned.
66
+ if ( empty( $current_user->allcaps[$tx_obj->cap->manage_terms] ) ) {
67
+ $caps = array_diff( $caps, (array) $tx_obj->cap->manage_terms );
68
+ }
69
+ $caps[]= $tx_obj->cap->$tx_cap;
70
+ }
71
+ }
72
+ }
73
+ break;
74
+ default:
75
+ }
76
+
77
+ // primitive caps
78
+ foreach( $enabled_taxonomies as $taxonomy ) {
79
+ if ( ! $tx_obj = get_taxonomy( $taxonomy ) ) {
80
+ continue;
81
+ }
82
+
83
+ foreach( array( 'edit_terms', 'delete_terms', 'assign_terms' ) as $cap_prop ) {
84
+ if ( $cap == $tx_obj->cap->$cap_prop ) {
85
+
86
+ // If this taxonomy is set for distinct capabilities, we don't want manage_terms capability to be implicitly assigned.
87
+ if ( empty( $current_user->allcaps[$tx_obj->cap->manage_terms] ) ) {
88
+ $caps = array_diff( $caps, (array) $tx_obj->cap->manage_terms );
89
+ }
90
+
91
+ $caps[]= $tx_obj->cap->$cap_prop;
92
+ return $caps;
93
+ }
94
+ }
95
+ }
96
+
97
+ return $caps;
98
+ }
99
+
100
+ // Note: this intentionally shares "pp_enabled_post_types" option with Press Permit
101
+ function cme_get_assisted_post_types() {
102
+ $type_args = array( 'public' => true, 'show_ui' => true );
103
+
104
+ $types = get_post_types( $type_args, 'names', 'or' );
105
+
106
+ if ( $omit_types = apply_filters( 'pp_unfiltered_post_types', array( 'wp_block' ) ) ) {
107
+ $post_types = array_diff_key( $types, array_fill_keys( (array) $omit_types, true ) );
108
+ }
109
+
110
+ $enabled = (array) get_option( 'pp_enabled_post_types', array( 'post' => true, 'page' => true ) );
111
+ $post_types = array_intersect( $post_types, array_keys( array_filter( $enabled ) ) );
112
+
113
+ return apply_filters( 'cme_assisted_post_types', $post_types, $type_args );
114
+ }
115
+
116
+ // Note: this intentionally does NOT share Press Permit' option name, for back compat reasons
117
+ // Enabling filtered taxonomies in PP previously did not cause the edit_terms, delete_terms, assign_terms capabilities to be enforced
118
+ function cme_get_assisted_taxonomies() {
119
+ $tx_args = array( 'public' => true );
120
+
121
+ $taxonomies = get_taxonomies( $tx_args );
122
+
123
+ if ( $omit_taxonomies = apply_filters( 'pp_unfiltered_taxonomies', array() ) ) {
124
+ $taxonomies = array_diff_key( $taxonomies, array_fill_keys( (array) $omit_taxonomies, true ) );
125
+ }
126
+
127
+ $enabled = (array) get_option( 'pp_enabled_taxonomies', array() );
128
+ $taxonomies = array_intersect( $taxonomies, array_keys( array_filter( $enabled ) ) );
129
+
130
+ return apply_filters( 'cme_assisted_taxonomies', $taxonomies, $tx_args );
131
+ }
132
+
133
+ function cme_get_detailed_taxonomies() {
134
+ $tx_args = array( 'public' => true );
135
+
136
+ $taxonomies = get_taxonomies( $tx_args );
137
+
138
+ if ( $omit_taxonomies = apply_filters( 'pp_unfiltered_taxonomies', array() ) ) {
139
+ $taxonomies = array_diff_key( $taxonomies, array_fill_keys( (array) $omit_taxonomies, true ) );
140
+ }
141
+
142
+ $enabled = (array) get_option( 'cme_detailed_taxonomies', array() );
143
+ $taxonomies = array_intersect( $taxonomies, array_keys( array_filter( $enabled ) ) );
144
+
145
+ return apply_filters( 'cme_detailed_taxonomies', $taxonomies, $tx_args );
146
+ }
147
+
148
+ function _cme_get_plural( $slug, $type_obj = false ) {
149
+ if ( $type_obj && ! empty( $type_obj->rest_base ) && ( $type_obj->rest_base != $slug ) && ( $type_obj->rest_base != "{$slug}s" ) ) {
150
+ // Use plural form from rest_base
151
+ if ( $pos = strpos( $type_obj->rest_base, '/' ) ) {
152
+ return sanitize_key( substr( $type_obj->rest_base, 0, $pos + 1 ) );
153
+ } else {
154
+ return sanitize_key( $type_obj->rest_base );
155
+ }
156
+ } else {
157
+ require_once ( dirname(__FILE__) . '/inflect-cme.php' );
158
+ return sanitize_key( CME_Inflect::pluralize( $slug ) );
159
+ }
160
+ }
includes/handler.php CHANGED
@@ -44,7 +44,7 @@ class CapsmanHandler
44
 
45
  $this->saveRoleCapabilities($post['current'], $post['caps'], $post['level']);
46
 
47
- if ( defined( 'PP_ACTIVE' ) ) { // log customized role caps for subsequent restoration
48
  // for bbPress < 2.2, need to log customization of roles following bbPress activation
49
  $plugins = ( function_exists( 'bbp_get_version' ) && version_compare( bbp_get_version(), '2.2', '<' ) ) ? array( 'bbpress.php' ) : array(); // back compat
50
 
@@ -86,20 +86,20 @@ class CapsmanHandler
86
  $this->cm->message = __('Incorrect capability name.');
87
  }
88
 
89
- } elseif ( ! empty($post['update_filtered_types']) ) {
90
- if ( cme_update_pp_usage() ) {
91
- ak_admin_notify(__('Capability settings saved.', 'capsman-enhanced'));
92
- } else {
93
- ak_admin_error(__('Error saving capability settings.', 'capsman-enhanced'));
94
- }
95
  } else {
96
  // TODO: Implement exceptions. This must be a fatal error.
97
  ak_admin_error(__('Bad form received.', 'capsman-enhanced'));
98
  }
99
 
100
- if ( ! empty($newrole) && defined('PP_ACTIVE') ) {
101
  if ( ( ! empty($post['CreateRole']) && ! empty( $_REQUEST['new_role_pp_only'] ) ) || ( ! empty($post['CopyRole']) && ! empty( $_REQUEST['copy_role_pp_only'] ) ) ) {
102
- $pp_only = (array) pp_get_option( 'supplemental_role_defs' );
103
  $pp_only[]= $newrole;
104
  pp_update_option( 'supplemental_role_defs', $pp_only );
105
  _cme_pp_default_pattern_role( $newrole );
@@ -210,7 +210,7 @@ class CapsmanHandler
210
  }
211
 
212
  // additional safeguard against removal of read capability
213
- if ( isset( $del_caps['read'] ) && in_array( $role_name, $this->cm->core_roles ) ) {
214
  unset( $del_caps['read'] );
215
  }
216
 
44
 
45
  $this->saveRoleCapabilities($post['current'], $post['caps'], $post['level']);
46
 
47
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) ) { // log customized role caps for subsequent restoration
48
  // for bbPress < 2.2, need to log customization of roles following bbPress activation
49
  $plugins = ( function_exists( 'bbp_get_version' ) && version_compare( bbp_get_version(), '2.2', '<' ) ) ? array( 'bbpress.php' ) : array(); // back compat
50
 
86
  $this->cm->message = __('Incorrect capability name.');
87
  }
88
 
89
+ } elseif ( ! empty($post['update_filtered_types']) || ! empty($post['update_filtered_taxonomies']) || ! empty($post['update_detailed_taxonomies']) ) {
90
+ //if ( /* settings saved successfully on plugins_loaded action */ ) {
91
+ ak_admin_notify(__('Type / Taxonomy settings saved.', 'capsman-enhanced'));
92
+ //} else {
93
+ // ak_admin_error(__('Error saving capability settings.', 'capsman-enhanced'));
94
+ //}
95
  } else {
96
  // TODO: Implement exceptions. This must be a fatal error.
97
  ak_admin_error(__('Bad form received.', 'capsman-enhanced'));
98
  }
99
 
100
+ if ( ! empty($newrole) && defined('PRESSPERMIT_ACTIVE') ) {
101
  if ( ( ! empty($post['CreateRole']) && ! empty( $_REQUEST['new_role_pp_only'] ) ) || ( ! empty($post['CopyRole']) && ! empty( $_REQUEST['copy_role_pp_only'] ) ) ) {
102
+ $pp_only = (array) capsman_get_pp_option( 'supplemental_role_defs' );
103
  $pp_only[]= $newrole;
104
  pp_update_option( 'supplemental_role_defs', $pp_only );
105
  _cme_pp_default_pattern_role( $newrole );
210
  }
211
 
212
  // additional safeguard against removal of read capability
213
+ if ( isset( $del_caps['read'] ) && _cme_is_read_removal_blocked( $role_name ) ) {
214
  unset( $del_caps['read'] );
215
  }
216
 
includes/inflect-cme.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ /* Inflect class by T. Brian Jones
5
+ /* https://gist.github.com/tbrianjones/ba0460cc1d55f357e00b
6
+ /*
7
+ /* original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
8
+ */
9
+
10
+ /*
11
+ The MIT License (MIT)
12
+
13
+ Copyright (c) 2015
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in
23
+ all copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31
+ THE SOFTWARE.
32
+ */
33
+
34
+ // ORIGINAL NOTES
35
+ //
36
+ // Thanks to http://www.eval.ca/articles/php-pluralize (MIT license)
37
+ // http://dev.rubyonrails.org/browser/trunk/activesupport/lib/active_support/inflections.rb (MIT license)
38
+ // http://www.fortunecity.com/bally/durrus/153/gramch13.html
39
+ // http://www2.gsu.edu/~wwwesl/egw/crump.htm
40
+ //
41
+ // Changes (12/17/07)
42
+ // Major changes
43
+ // --
44
+ // Fixed irregular noun algorithm to use regular expressions just like the original Ruby source.
45
+ // (this allows for things like fireman -> firemen
46
+ // Fixed the order of the singular array, which was backwards.
47
+ //
48
+ // Minor changes
49
+ // --
50
+ // Removed incorrect pluralization rule for /([^aeiouy]|qu)ies$/ => $1y
51
+ // Expanded on the list of exceptions for *o -> *oes, and removed rule for buffalo -> buffaloes
52
+ // Removed dangerous singularization rule for /([^f])ves$/ => $1fe
53
+ // Added more specific rules for singularizing lives, wives, knives, sheaves, loaves, and leaves and thieves
54
+ // Added exception to /(us)es$/ => $1 rule for houses => house and blouses => blouse
55
+ // Added excpetions for feet, geese and teeth
56
+ // Added rule for deer -> deer
57
+
58
+ // Changes:
59
+ // Removed rule for virus -> viri
60
+ // Added rule for potato -> potatoes
61
+ // Added rule for *us -> *uses
62
+
63
+ // Kevin Behrens : removed singularization code (not needed for CME)
64
+ class CME_Inflect
65
+ {
66
+ static $plural = array(
67
+ '/(quiz)$/i' => "$1zes",
68
+ '/^(ox)$/i' => "$1en",
69
+ '/([m|l])ouse$/i' => "$1ice",
70
+ '/(matr|vert|ind)ix|ex$/i' => "$1ices",
71
+ '/(x|ch|ss|sh)$/i' => "$1es",
72
+ '/([^aeiouy]|qu)y$/i' => "$1ies",
73
+ '/(hive)$/i' => "$1s",
74
+ '/(?:([^f])fe|([lr])f)$/i' => "$1$2ves",
75
+ '/(shea|lea|loa|thie)f$/i' => "$1ves",
76
+ '/sis$/i' => "ses",
77
+ '/([ti])um$/i' => "$1a",
78
+ '/(tomat|potat|ech|her|vet)o$/i'=> "$1oes",
79
+ '/(bu)s$/i' => "$1ses",
80
+ '/(alias)$/i' => "$1es",
81
+ '/(octop)us$/i' => "$1i",
82
+ '/(ax|test)is$/i' => "$1es",
83
+ '/(us)$/i' => "$1es",
84
+ '/s$/i' => "s",
85
+ '/$/' => "s"
86
+ );
87
+
88
+ static $irregular = array(
89
+ 'move' => 'moves',
90
+ 'foot' => 'feet',
91
+ 'goose' => 'geese',
92
+ 'sex' => 'sexes',
93
+ 'child' => 'children',
94
+ 'man' => 'men',
95
+ 'tooth' => 'teeth',
96
+ 'person' => 'people',
97
+ 'valve' => 'valves'
98
+ );
99
+
100
+ static $uncountable = array(
101
+ 'sheep',
102
+ 'fish',
103
+ 'deer',
104
+ 'series',
105
+ 'species',
106
+ 'money',
107
+ 'rice',
108
+ 'information',
109
+ 'equipment'
110
+ );
111
+
112
+ public static function pluralize( $string ) {
113
+ // save some time in the case that singular and plural are the same
114
+ if ( in_array( strtolower( $string ), self::$uncountable ) ) {
115
+ return $string;
116
+ }
117
+
118
+ // check for irregular singular forms
119
+ foreach ( self::$irregular as $pattern => $result ) {
120
+ $pattern = '/' . $pattern . '$/i';
121
+
122
+ if ( preg_match( $pattern, $string ) ) {
123
+ return preg_replace( $pattern, $result, $string);
124
+ }
125
+ }
126
+
127
+ // check for matches using regular expressions
128
+ foreach ( self::$plural as $pattern => $result ) {
129
+ if ( preg_match( $pattern, $string ) ) {
130
+ return preg_replace( $pattern, $result, $string );
131
+ }
132
+ }
133
+
134
+ return $string;
135
+ }
136
+ }
includes/manager.php CHANGED
@@ -28,12 +28,51 @@
28
  add_action( 'init', 'cme_update_pp_usage' ); // update early so resulting post type cap changes are applied for this request's UI construction
29
 
30
  function cme_update_pp_usage() {
31
- if ( defined( 'PP_ACTIVE' ) && ( ! empty($_REQUEST['update_filtered_types']) || ! empty($_REQUEST['SaveRole']) ) ) {
32
  require_once( dirname(__FILE__).'/pp-handler.php' );
33
  return _cme_update_pp_usage();
34
  }
35
  }
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  /**
39
  * Class CapabilityManager.
@@ -58,11 +97,6 @@ class CapabilityManager
58
  */
59
  var $roles = array();
60
 
61
- /**
62
- * Roles to monitor for removal of essential capabilities
63
- */
64
- var $core_roles = array();
65
-
66
  /**
67
  * Current role we are managing
68
  * @var string
@@ -91,8 +125,6 @@ class CapabilityManager
91
  $this->ID = 'capsman';
92
  $this->mod_url = plugins_url( '', CME_FILE );
93
 
94
- $this->core_roles = apply_filters( 'pp_caps_core_roles', array( 'administrator', 'editor', 'revisor', 'author', 'contributor', 'subscriber' ) );
95
-
96
  $this->moduleLoad();
97
 
98
  add_action('admin_menu', array($this, 'adminMenus'), 5); // execute prior to PP, to use menu hook
28
  add_action( 'init', 'cme_update_pp_usage' ); // update early so resulting post type cap changes are applied for this request's UI construction
29
 
30
  function cme_update_pp_usage() {
31
+ if ( ! empty($_REQUEST['update_filtered_types']) || ! empty($_REQUEST['update_filtered_taxonomies']) || ! empty($_REQUEST['update_detailed_taxonomies']) || ! empty($_REQUEST['SaveRole']) ) {
32
  require_once( dirname(__FILE__).'/pp-handler.php' );
33
  return _cme_update_pp_usage();
34
  }
35
  }
36
 
37
+ // Core WP roles to apply safeguard preventing accidental lockout from dashboard
38
+ function _cme_core_roles() {
39
+ return apply_filters( 'pp_caps_core_roles', array( 'administrator', 'editor', 'revisor', 'author', 'contributor', 'subscriber' ) );
40
+ }
41
+
42
+ function _cme_core_caps() {
43
+ $core_caps = array_fill_keys( array( 'switch_themes', 'edit_themes', 'activate_plugins', 'edit_plugins', 'edit_users', 'edit_files', 'manage_options', 'moderate_comments',
44
+ 'manage_links', 'upload_files', 'import', 'unfiltered_html', 'read', 'delete_users', 'create_users', 'unfiltered_upload', 'edit_dashboard',
45
+ 'update_plugins', 'delete_plugins', 'install_plugins', 'update_themes', 'install_themes',
46
+ 'update_core', 'list_users', 'remove_users', 'add_users', 'promote_users', 'edit_theme_options', 'delete_themes', 'export' ), true );
47
+
48
+ ksort( $core_caps );
49
+ return $core_caps;
50
+ }
51
+
52
+ function _cme_is_read_removal_blocked( $role_name ) {
53
+ $role = get_role($role_name);
54
+ $rcaps = $role->capabilities;
55
+
56
+ $core_caps = array_diff_key( _cme_core_caps(), array_fill_keys( array( 'unfiltered_html', 'unfiltered_upload', 'upload_files', 'edit_files', 'read' ), true ) );
57
+
58
+ if ( empty( $rcaps['dashboard_lockout_ok'] ) ) {
59
+ $edit_caps = array();
60
+ foreach ( get_post_types( array( 'public' => true ), 'object' ) as $type_obj ) {
61
+ $edit_caps = array_merge( $edit_caps, array_values( array_diff_key( (array) $type_obj->cap, array( 'read_private_posts' => true ) ) ) );
62
+ }
63
+
64
+ $edit_caps = array_fill_keys( $edit_caps, true );
65
+ unset( $edit_caps['read'] );
66
+ unset( $edit_caps['upload_files'] );
67
+ unset( $edit_caps['edit_files'] );
68
+
69
+ if ( $role_has_admin_caps = in_array( $role_name, _cme_core_roles() ) && ( array_intersect_key( $rcaps, array_diff_key( $core_caps, array( 'read' => true ) ) ) || array_intersect_key( $rcaps, $edit_caps ) ) ) {
70
+ return true;
71
+ }
72
+ }
73
+
74
+ return false;
75
+ }
76
 
77
  /**
78
  * Class CapabilityManager.
97
  */
98
  var $roles = array();
99
 
 
 
 
 
 
100
  /**
101
  * Current role we are managing
102
  * @var string
125
  $this->ID = 'capsman';
126
  $this->mod_url = plugins_url( '', CME_FILE );
127
 
 
 
128
  $this->moduleLoad();
129
 
130
  add_action('admin_menu', array($this, 'adminMenus'), 5); // execute prior to PP, to use menu hook
includes/network.php CHANGED
@@ -15,8 +15,8 @@ function _cme_new_blog( $new_blog_id ) {
15
  $admin_role = $wp_roles->get_role('administrator');
16
  $main_admin_caps = $admin_role->capabilities;
17
 
18
- if ( defined('PP_ACTIVE') )
19
- $main_pp_only = (array) pp_get_option( 'supplemental_role_defs' );
20
  //$pp_only[]= $newrole;
21
 
22
  foreach( $autocreate_roles as $role_name ) {
@@ -29,9 +29,9 @@ function _cme_new_blog( $new_blog_id ) {
29
  switch_to_blog($new_blog_id);
30
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
31
 
32
- if ( defined('PP_ACTIVE') ) {
33
  pp_refresh_options();
34
- $blog_pp_only = (array) pp_get_option( 'supplemental_role_defs' );
35
  }
36
 
37
  foreach( $main_site_caps as $role_name => $caps ) {
@@ -53,7 +53,7 @@ function _cme_new_blog( $new_blog_id ) {
53
  $wp_roles->add_role( $role_name, $role_captions[$role_name], $caps );
54
  }
55
 
56
- if ( defined('PP_ACTIVE') ) {
57
  if ( in_array( $role_name, $main_pp_only ) ) {
58
  _cme_pp_default_pattern_role( $role_name );
59
  $blog_pp_only []= $role_name;
@@ -62,13 +62,13 @@ function _cme_new_blog( $new_blog_id ) {
62
  }
63
  }
64
 
65
- if ( defined('PP_ACTIVE') )
66
  pp_update_option( 'supplemental_role_defs', $blog_pp_only );
67
 
68
  restore_current_blog();
69
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
70
 
71
- if ( defined('PP_ACTIVE') )
72
  pp_refresh_options();
73
  }
74
  }
15
  $admin_role = $wp_roles->get_role('administrator');
16
  $main_admin_caps = $admin_role->capabilities;
17
 
18
+ if ( defined('PRESSPERMIT_ACTIVE') )
19
+ $main_pp_only = (array) capsman_get_pp_option( 'supplemental_role_defs' );
20
  //$pp_only[]= $newrole;
21
 
22
  foreach( $autocreate_roles as $role_name ) {
29
  switch_to_blog($new_blog_id);
30
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
31
 
32
+ if ( defined('PRESSPERMIT_ACTIVE') ) {
33
  pp_refresh_options();
34
+ $blog_pp_only = (array) capsman_get_pp_option( 'supplemental_role_defs' );
35
  }
36
 
37
  foreach( $main_site_caps as $role_name => $caps ) {
53
  $wp_roles->add_role( $role_name, $role_captions[$role_name], $caps );
54
  }
55
 
56
+ if ( defined('PRESSPERMIT_ACTIVE') ) {
57
  if ( in_array( $role_name, $main_pp_only ) ) {
58
  _cme_pp_default_pattern_role( $role_name );
59
  $blog_pp_only []= $role_name;
62
  }
63
  }
64
 
65
+ if ( defined('PRESSPERMIT_ACTIVE') )
66
  pp_update_option( 'supplemental_role_defs', $blog_pp_only );
67
 
68
  restore_current_blog();
69
  ( method_exists( $wp_roles, 'for_site' ) ) ? $wp_roles->for_site() : $wp_roles->reinit();
70
 
71
+ if ( defined('PRESSPERMIT_ACTIVE') )
72
  pp_refresh_options();
73
  }
74
  }
includes/pp-handler.php CHANGED
@@ -3,60 +3,82 @@
3
  function _cme_update_pp_usage() {
4
  static $updated;
5
  if ( ! empty($updated) ) { return true; }
6
-
7
- if ( ! current_user_can( 'pp_manage_settings' ) )
8
  return false;
 
9
 
10
- if ( ! empty( $_REQUEST['update_filtered_types']) ) {
11
  // update Press Permit "Filtered Post Types". This determines whether type-specific capability definitions are forced
12
- $options = array( 'enabled_post_types', 'enabled_taxonomies' );
 
 
13
 
14
  foreach( $options as $option_basename ) {
15
- if ( ! isset( $_POST["{$option_basename}-options"] ) )
16
  continue;
17
 
18
  $unselected = array();
19
  $value = array();
20
 
21
- foreach( $_POST["{$option_basename}-options"] as $key ) {
22
- if ( empty( $_POST["{$option_basename}-$key"] ) )
 
 
 
 
 
23
  $unselected[$key] = true;
24
- else
 
 
25
  $value[$key] = true;
 
26
  }
27
 
28
- if ( $current = pp_get_option( $option_basename ) ) {
 
 
 
29
  if ( $current = array_diff_key( $current, $unselected ) )
30
  $value = array_merge( $current, $value ); // retain setting for any types which were previously enabled for filtering but are currently not registered
31
  }
32
 
33
  $value = stripslashes_deep($value);
34
- pp_update_option( $option_basename, $value );
 
 
 
 
 
 
35
 
36
  $updated = true;
37
  }
38
 
39
- if ( pp_wp_ver( '3.5' ) ) {
40
- pp_update_option( 'define_create_posts_cap', ! empty($_REQUEST['pp_define_create_posts_cap']) );
41
  }
42
  }
43
 
44
- if ( ! empty( $_REQUEST['SaveRole']) ) {
45
- if ( ! empty( $_REQUEST['role'] ) ) {
46
- $pp_only = (array) pp_get_option( 'supplemental_role_defs' );
47
-
48
- if ( empty($_REQUEST['pp_only_role']) )
49
- $pp_only = array_diff( $pp_only, array($_REQUEST['role']) );
50
- else
51
- $pp_only[]= $_REQUEST['role'];
 
52
 
53
- pp_update_option( 'supplemental_role_defs', array_unique($pp_only) );
54
- _cme_pp_default_pattern_role( $_REQUEST['role'] );
 
 
 
 
 
55
  }
56
- }
57
-
58
- if ( $updated ) {
59
- pp_refresh_options();
60
  }
61
 
62
  return $updated;
3
  function _cme_update_pp_usage() {
4
  static $updated;
5
  if ( ! empty($updated) ) { return true; }
6
+
7
+ if ( ! current_user_can( 'manage_capabilities' ) ) {
8
  return false;
9
+ }
10
 
11
+ if ( ! empty( $_REQUEST['update_filtered_types']) || ! empty( $_REQUEST['update_filtered_taxonomies']) || ! empty($_REQUEST['update_detailed_taxonomies']) || ! empty( $_REQUEST['SaveRole']) ) {
12
  // update Press Permit "Filtered Post Types". This determines whether type-specific capability definitions are forced
13
+ $options = array( 'enabled_post_types', 'enabled_taxonomies', 'detailed_taxonomies' );
14
+
15
+ $posted = $_POST;
16
 
17
  foreach( $options as $option_basename ) {
18
+ if ( ! isset( $posted["{$option_basename}-options"] ) )
19
  continue;
20
 
21
  $unselected = array();
22
  $value = array();
23
 
24
+ foreach( $posted["{$option_basename}-options"] as $key ) {
25
+ if ( ( 'enabled_taxonomies' == $option_basename ) && ! empty( $posted["detailed_taxonomies-{$key}"] ) && ! empty( $posted['update_detailed_taxonomies']) ) {
26
+ // if Detailed is selected, also select Type-Specific
27
+ $posted["enabled_taxonomies-{$key}"] = true;
28
+ $value[$key] = true;
29
+ } elseif ( ( 'detailed_taxonomies' == $option_basename ) && empty( $posted["enabled_taxonomies-{$key}"] ) && ! empty( $posted['update_filtered_taxonomies']) ) {
30
+ // if Enabled is deselected, also deselect Type-Specific
31
  $unselected[$key] = true;
32
+ } elseif ( empty( $posted["{$option_basename}-$key"] ) ) {
33
+ $unselected[$key] = true;
34
+ } else {
35
  $value[$key] = true;
36
+ }
37
  }
38
 
39
+ //$option_name = ( ( 'detailed_taxonomies' == $option_basename ) || ! defined( 'PRESSPERMIT_ACTIVE' ) ) ? 'cme_' . $option_basename : 'pp_' . $option_basename;
40
+ $option_name = ( 'detailed_taxonomies' == $option_basename ) ? 'cme_' . $option_basename : 'pp_' . $option_basename;
41
+
42
+ if ( $current = get_option( $option_name ) ) {
43
  if ( $current = array_diff_key( $current, $unselected ) )
44
  $value = array_merge( $current, $value ); // retain setting for any types which were previously enabled for filtering but are currently not registered
45
  }
46
 
47
  $value = stripslashes_deep($value);
48
+
49
+ update_option( $option_name, $value );
50
+
51
+ if ( 'pp_enabled_post_types' == $option_name ) {
52
+ // ensure smooth transition if Press Permit Core is deactivated
53
+ update_option( 'cme_enabled_post_types', $value );
54
+ }
55
 
56
  $updated = true;
57
  }
58
 
59
+ if ( ! empty( $_REQUEST['update_filtered_types']) ) {
60
+ update_option( 'pp_' . 'define_create_posts_cap', ! empty($_REQUEST['pp_define_create_posts_cap']) );
61
  }
62
  }
63
 
64
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) ) {
65
+ if ( ! empty( $_REQUEST['SaveRole']) ) {
66
+ if ( ! empty( $_REQUEST['role'] ) ) {
67
+ $pp_only = (array) capsman_get_pp_option( 'supplemental_role_defs' );
68
+
69
+ if ( empty($_REQUEST['pp_only_role']) )
70
+ $pp_only = array_diff( $pp_only, array($_REQUEST['role']) );
71
+ else
72
+ $pp_only[]= $_REQUEST['role'];
73
 
74
+ pp_update_option( 'supplemental_role_defs', array_unique($pp_only) );
75
+ _cme_pp_default_pattern_role( $_REQUEST['role'] );
76
+ }
77
+ }
78
+
79
+ if ( $updated ) {
80
+ pp_refresh_options();
81
  }
 
 
 
 
82
  }
83
 
84
  return $updated;
includes/pp-ui.php CHANGED
@@ -1,15 +1,10 @@
1
  <?php
2
 
3
  class Capsman_PP_UI {
4
-
5
- function __construct() {
6
-
7
- }
8
-
9
  function get_metagroup_caps( $default ) {
10
  global $wpdb;
11
 
12
- if ( defined( 'PPC_VERSION' ) ) {
13
  $query = $wpdb->prepare( "SELECT role_name FROM $wpdb->ppc_roles AS r INNER JOIN $wpdb->pp_groups AS g ON g.ID = r.agent_id AND r.agent_type = 'pp_group' WHERE g.metagroup_type = 'wp_role' AND g.metagroup_id = %s", $default );
14
  $pp_supplemental_roles = $wpdb->get_col( $query );
15
  } else {
@@ -35,22 +30,24 @@ class Capsman_PP_UI {
35
  }
36
 
37
  function show_capability_hints( $default ) {
38
- if ( pp_get_option('display_hints') ) {
39
  $cme_id = 'capsman';
40
 
41
  echo '<ul class="ul-disc" style="margin-top:10px">';
42
 
43
- if ( defined( 'PPCE_VERSION' ) || ! defined( 'PPC_VERSION' ) || in_array( $default, array( 'subscriber', 'contributor', 'author', 'editor' ) ) ) {
 
 
44
  echo '<li>';
45
- if ( defined( 'PPCE_VERSION' ) || ! defined( 'PPC_VERSION' ) ) {
46
- if ( pp_get_option( 'advanced_options' ) )
47
- $parenthetical = ' (' . sprintf( __( 'see %1$sRole Usage%2$s: "Pattern Roles"', 'capsman-enhanced' ), "<a href='" . admin_url('admin.php?page=pp-role-usage') . "'>", '</a>' ) . ')';
48
  else
49
- $parenthetical = ' (' . sprintf( __( 'activate %1$sAdvanced settings%2$s, see Role Usage', 'capsman-enhanced' ), "<a href='" . admin_url('admin.php?page=pp-settings&pp_tab=advanced') . "'>", '</a>' ). ')';
50
  } else
51
  $parenthetical = '';
52
 
53
- if ( defined( 'PPC_VERSION' ) )
54
  printf( __( '"Posts" capabilities selected here also define type-specific role assignment for Permission Groups%s.', $cme_id ), $parenthetical ) ;
55
  else
56
  printf( __( '"Posts" capabilities selected here also define type-specific role assignment for Permit Groups%s.', $cme_id ), $parenthetical ) ;
@@ -59,14 +56,14 @@ class Capsman_PP_UI {
59
  }
60
 
61
  $status_hint = '';
62
- if ( defined( 'PPC_VERSION' ) )
63
  if ( defined( 'PPS_VERSION' ) )
64
- $status_hint = sprintf( __( 'Capabilities for custom statuses can be manually added here (see Post Statuses > Status > Capability Mapping for applicable names). However, it is usually more convenient to use Permission Groups to assign a supplemental status-specific role.', $cme_id ), "<a href='" . admin_url('?page=pp-role-usage') . "'>", '</a>' ) ;
65
- elseif ( pp_get_option( 'display_extension_hints' ) )
66
- $status_hint = sprintf( __( 'Capabilities for custom statuses can be manually added here. Or activate the PP Custom Post Statuses extension to assign status-specific supplemental roles.', $cme_id ), "<a href='" . admin_url('?page=pp-role-usage') . "'>", '</a>' ) ;
67
 
68
  elseif ( defined( 'PP_VERSION' ) )
69
- $status_hint = sprintf( __( 'Capabilities for custom statuses can be manually added to a role here (see Conditions > Status > Capability Mapping for applicable names). However, it is usually more convenient to use Permit Groups to assign a supplemental status-specific role.', $cme_id ), "<a href='" . admin_url('?page=pp-role-usage') . "'>", '</a>' ) ;
70
 
71
  if ( $status_hint )
72
  echo "<li>$status_hint</li>";
@@ -76,14 +73,14 @@ class Capsman_PP_UI {
76
  }
77
 
78
  function pp_only_roles_ui( $default ) {
79
- $support_pp_only_roles = defined('PPC_VERSION') || version_compare( PP_VERSION, '1.0-beta1.4', '>=');
80
  ?>
81
 
82
  <?php if ( $support_pp_only_roles && ! in_array( $default, array( /*'subscriber', 'contributor', 'author', 'editor',*/ 'administrator' ) ) ) : ?>
83
  <div style="float:right">
84
  <?php
85
  pp_refresh_options();
86
- $pp_only = (array) pp_get_option( 'supplemental_role_defs' );
87
  $checked = ( in_array( $default, $pp_only ) ) ? 'checked="checked"': '';
88
  ?>
89
  <label for="pp_only_role" title="<?php _e('Make role available for supplemental assignment to Permission Groups only', 'capsman-enhanced');?>"><input type="checkbox" name="pp_only_role" id="pp_only_role" value="1" <?php echo $checked;?>> <?php _e('hidden role', 'capsman-enhanced'); ?> </label>
@@ -93,81 +90,194 @@ class Capsman_PP_UI {
93
  return $support_pp_only_roles;
94
  }
95
 
96
- function pp_types_ui( $defined ) {
97
- if ( current_user_can( 'pp_manage_settings' ) ) :?>
 
98
  <dl>
99
- <dt><?php _e('Force Type-Specific Capabilities', 'capsman-enhanced'); ?></dt>
100
  <dd style="text-align:center;">
101
  <?php
102
- $caption = __( 'Force unique capability names for:', 'capsman-enhanced' );
103
- echo "<p>$caption</p>";
104
 
105
- if ( pp_get_option( 'display_hints' ) ) :?>
106
  <div class="cme-subtext" style="margin-top:0">
107
- <?php _e( '(PP Filtered Post Types, Taxonomies)', 'capsman-enhanced' );?>
108
  </div>
109
  <?php endif;
110
 
111
  echo "<table style='width:100%'><tr>";
112
 
113
- $unfiltered['type'] = apply_filters( 'pp_unfiltered_post_types', array('forum','topic','reply') ); // bbPress' dynamic role def requires additional code to enforce stored caps
114
- $unfiltered['taxonomy'] = apply_filters( 'pp_unfiltered_taxonomies', array( 'post_status', 'topic-tag' ) ); // avoid confusion with Edit Flow administrative taxonomy
115
- $hidden['type'] = apply_filters( 'pp_hidden_post_types', array() );
116
- $hidden['taxonomy'] = apply_filters( 'pp_hidden_taxonomies', array() );
117
 
118
- foreach( array_keys($defined) as $item_type ) {
119
- echo '<td style="width:50%">';
120
- $option_name = ( 'taxonomy' == $item_type ) ? 'enabled_taxonomies' : 'enabled_post_types';
 
 
 
121
 
122
- $enabled = pp_get_option( $option_name );
123
-
124
- foreach( $defined[$item_type] as $key => $type_obj ) {
125
- if ( ! $key )
126
- continue;
127
-
128
- if ( in_array( $key, $unfiltered[$item_type] ) )
129
- continue;
130
-
131
- $id = "$option_name-" . $key;
132
- ?>
133
- <div style="text-align:left">
134
- <?php if ( ! empty( $hidden[$item_type][$key] ) ) :?>
135
- <input name="<?php echo($id);?>" type="hidden" id="<?php echo($id);?>" value="1" />
136
- <input name="<?php echo("{$option_name}-options[]");?>" type="hidden" value="<?php echo($key)?>" />
137
 
138
- <?php else: ?>
139
- <div class="agp-vspaced_input">
140
- <label for="<?php echo($id);?>" title="<?php echo($key);?>">
141
- <input name="<?php echo("{$option_name}-options[]");?>" type="hidden" value="<?php echo($key)?>" />
142
- <input name="<?php echo($id);?>" type="checkbox" id="<?php echo($id);?>" value="1" <?php checked('1', ! empty($enabled[$key]) );?> /> <?php echo($type_obj->label);?>
143
-
144
- <?php
145
- echo ('</label></div>');
146
-
147
- endif; // displaying checkbox UI
 
 
148
 
149
- echo '</div>';
150
- }
151
- echo '</td>';
 
 
 
152
  }
 
153
  ?>
154
  </tr>
155
  </table>
156
 
157
- <?php if( pp_wp_ver( '3.5' ) ) :
158
- $define_create_posts_cap = pp_get_option( 'define_create_posts_cap' );
159
- ?>
160
- <div>
161
  <label for="pp_define_create_posts_cap">
162
- <input name="pp_define_create_posts_cap" type="checkbox" id="pp_define_create_posts_cap" value="1" <?php checked('1', $define_create_posts_cap );?> /> <?php _e('Use create_posts capability');?>
163
  </label>
164
  </div>
165
- <?php endif; ?>
166
 
167
  <input type="submit" name="update_filtered_types" value="<?php _e('Update', 'capsman-enhanced') ?>" class="button" />
168
  </dd>
169
  </dl>
170
- <?php endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  }
172
  }
173
 
1
  <?php
2
 
3
  class Capsman_PP_UI {
 
 
 
 
 
4
  function get_metagroup_caps( $default ) {
5
  global $wpdb;
6
 
7
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) ) {
8
  $query = $wpdb->prepare( "SELECT role_name FROM $wpdb->ppc_roles AS r INNER JOIN $wpdb->pp_groups AS g ON g.ID = r.agent_id AND r.agent_type = 'pp_group' WHERE g.metagroup_type = 'wp_role' AND g.metagroup_id = %s", $default );
9
  $pp_supplemental_roles = $wpdb->get_col( $query );
10
  } else {
30
  }
31
 
32
  function show_capability_hints( $default ) {
33
+ if ( capsman_get_pp_option('display_hints') ) {
34
  $cme_id = 'capsman';
35
 
36
  echo '<ul class="ul-disc" style="margin-top:10px">';
37
 
38
+ $pp_prefix = ( defined( 'PRESSPERMIT_VERSION') ) ? 'presspermit' : 'pp';
39
+
40
+ if ( defined( 'PPCE_VERSION' ) || ! defined( 'PRESSPERMIT_ACTIVE' ) || in_array( $default, array( 'subscriber', 'contributor', 'author', 'editor' ) ) ) {
41
  echo '<li>';
42
+ if ( defined( 'PPCE_VERSION' ) || ! defined( 'PRESSPERMIT_ACTIVE' ) ) {
43
+ if ( capsman_get_pp_option( 'advanced_options' ) )
44
+ $parenthetical = ' (' . sprintf( __( 'see %1$sRole Usage%2$s: "Pattern Roles"', 'capsman-enhanced' ), "<a href='" . admin_url("admin.php?page={$pp_prefix}-role-usage") . "'>", '</a>' ) . ')';
45
  else
46
+ $parenthetical = ' (' . sprintf( __( 'activate %1$sAdvanced settings%2$s, see Role Usage', 'capsman-enhanced' ), "<a href='" . admin_url("admin.php?page={$pp_prefix}-settings&pp_tab=advanced") . "'>", '</a>' ). ')';
47
  } else
48
  $parenthetical = '';
49
 
50
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) )
51
  printf( __( '"Posts" capabilities selected here also define type-specific role assignment for Permission Groups%s.', $cme_id ), $parenthetical ) ;
52
  else
53
  printf( __( '"Posts" capabilities selected here also define type-specific role assignment for Permit Groups%s.', $cme_id ), $parenthetical ) ;
56
  }
57
 
58
  $status_hint = '';
59
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) )
60
  if ( defined( 'PPS_VERSION' ) )
61
+ $status_hint = sprintf( __( 'Capabilities for custom statuses can be manually added here. (See %sPermissions > Post Statuses%s for applicable names). %sSupplemental status-specific roles%s are usually more convenient, though.', $cme_id ), "<a href='" . admin_url("admin.php?page={$pp_prefix}-statuses&show_caps=1") . "'>", '</a>', "<a href='" . admin_url("admin.php?page={$pp_prefix}-groups") . "'>", '</a>' ) ;
62
+ elseif ( capsman_get_pp_option( 'display_extension_hints' ) )
63
+ $status_hint = sprintf( __( 'Capabilities for custom statuses can be manually added here. Or activate the PP Custom Post Statuses extension to assign status-specific supplemental roles.', $cme_id ), "<a href='" . admin_url("admin.php?page={$pp_prefix}-role-usage") . "'>", '</a>' ) ;
64
 
65
  elseif ( defined( 'PP_VERSION' ) )
66
+ $status_hint = sprintf( __( 'Capabilities for custom statuses can be manually added to a role here (see Conditions > Status > Capability Mapping for applicable names). However, it is usually more convenient to use Permit Groups to assign a supplemental status-specific role.', $cme_id ), "<a href='" . admin_url("admin.php?page={$pp_prefix}-role-usage") . "'>", '</a>' ) ;
67
 
68
  if ( $status_hint )
69
  echo "<li>$status_hint</li>";
73
  }
74
 
75
  function pp_only_roles_ui( $default ) {
76
+ $support_pp_only_roles = defined('PRESSPERMIT_ACTIVE') || version_compare( PP_VERSION, '1.0-beta1.4', '>=');
77
  ?>
78
 
79
  <?php if ( $support_pp_only_roles && ! in_array( $default, array( /*'subscriber', 'contributor', 'author', 'editor',*/ 'administrator' ) ) ) : ?>
80
  <div style="float:right">
81
  <?php
82
  pp_refresh_options();
83
+ $pp_only = (array) capsman_get_pp_option( 'supplemental_role_defs' );
84
  $checked = ( in_array( $default, $pp_only ) ) ? 'checked="checked"': '';
85
  ?>
86
  <label for="pp_only_role" title="<?php _e('Make role available for supplemental assignment to Permission Groups only', 'capsman-enhanced');?>"><input type="checkbox" name="pp_only_role" id="pp_only_role" value="1" <?php echo $checked;?>> <?php _e('hidden role', 'capsman-enhanced'); ?> </label>
90
  return $support_pp_only_roles;
91
  }
92
 
93
+ // Note: CME can now impose type-specific capabilities without Press Permit Core active
94
+ function pp_types_ui( $defined_types ) {
95
+ ?>
96
  <dl>
97
+ <dt><?php _e('Type-Specific Capabilities', 'capsman-enhanced'); ?></dt>
98
  <dd style="text-align:center;">
99
  <?php
100
+ $caption = __( 'Ensure permissions can be controlled separately from other post types.', 'capsman-enhanced' );
101
+ echo "<p class='cme-hint'>$caption</p>";
102
 
103
+ if ( defined( 'PRESSPERMIT_ACTIVE' ) && capsman_get_pp_option( 'display_hints' ) ) :?>
104
  <div class="cme-subtext" style="margin-top:0">
105
+ <?php /*_e( '(PP Filtered Post Types, Taxonomies)', 'capsman-enhanced' ); */?>
106
  </div>
107
  <?php endif;
108
 
109
  echo "<table style='width:100%'><tr>";
110
 
111
+ $unfiltered = apply_filters( 'pp_unfiltered_post_types', array('forum','topic','reply','wp_block') ); // bbPress' dynamic role def requires additional code to enforce stored caps
112
+ $hidden = apply_filters( 'pp_hidden_post_types', array() );
113
+
114
+ echo '<td style="width:50%">';
115
 
116
+ $option_basename = 'enabled_post_types';
117
+ $enabled = get_option( 'pp_' . $option_basename, array( 'post' => true, 'page' => true ) );
118
+
119
+ foreach( $defined_types as $key => $type_obj ) {
120
+ if ( ! $key )
121
+ continue;
122
 
123
+ if ( in_array( $key, $unfiltered ) )
124
+ continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
+ $id = "$option_basename-" . $key;
127
+ ?>
128
+ <div style="text-align:left">
129
+ <?php if ( ! empty( $hidden[$key] ) ) :?>
130
+ <input name="<?php echo($id);?>" type="hidden" id="<?php echo($id);?>" value="1" />
131
+ <input name="<?php echo("{$option_basename}-options[]");?>" type="hidden" value="<?php echo($key)?>" />
132
+
133
+ <?php else: ?>
134
+ <div class="agp-vspaced_input">
135
+ <label for="<?php echo($id);?>" title="<?php echo($key);?>">
136
+ <input name="<?php echo("{$option_basename}-options[]");?>" type="hidden" value="<?php echo($key)?>" />
137
+ <input name="<?php echo($id);?>" type="checkbox" id="<?php echo($id);?>" value="1" <?php checked('1', ! empty($enabled[$key]) );?> /> <?php echo($type_obj->label);?>
138
 
139
+ <?php
140
+ echo ('</label></div>');
141
+
142
+ endif; // displaying checkbox UI
143
+
144
+ echo '</div>';
145
  }
146
+ echo '</td>';
147
  ?>
148
  </tr>
149
  </table>
150
 
151
+ <?php $define_create_posts_cap = get_option( 'pp_define_create_posts_cap' );?>
152
+
153
+ <div style="margin-top:10px;margin-bottom:10px">
 
154
  <label for="pp_define_create_posts_cap">
155
+ <input name="pp_define_create_posts_cap" type="checkbox" id="pp_define_create_posts_cap" value="1" <?php checked('1', $define_create_posts_cap );?> title="<?php esc_attr( _e( 'Make selected post types require a different capability to add new posts.', 'capsman-enhanced') );?>" /> <?php _e('Use create_posts capability');?>
156
  </label>
157
  </div>
158
+
159
 
160
  <input type="submit" name="update_filtered_types" value="<?php _e('Update', 'capsman-enhanced') ?>" class="button" />
161
  </dd>
162
  </dl>
163
+ <?php
164
+ }
165
+
166
+ // Note: CME can now impose type-specific capabilities without Press Permit Core active
167
+ function pp_taxonomies_ui( $defined_taxonomies ) {
168
+ ?>
169
+ <dl>
170
+ <dt><?php _e('Taxonomy-Specific Capabilities', 'capsman-enhanced'); ?></dt>
171
+ <dd style="text-align:center;">
172
+ <?php
173
+ $caption = __( 'Ensure permissions can be controlled separately from other taxonomies.', 'capsman-enhanced' );
174
+ echo "<p class='cme-hint'>$caption</p>";
175
+
176
+ echo "<table style='width:100%'><tr>";
177
+
178
+ $unfiltered = apply_filters( 'pp_unfiltered_taxonomies', array( 'post_status', 'topic-tag' ) ); // avoid confusion with Edit Flow administrative taxonomy
179
+ $hidden = apply_filters( 'pp_hidden_taxonomies', array() );
180
+
181
+ echo '<td style="width:50%">';
182
+
183
+ $option_basename = 'enabled_taxonomies';
184
+ $option_name = 'pp_' . $option_basename;
185
+
186
+ $enabled = get_option( $option_name, array() );
187
+
188
+ foreach( $defined_taxonomies as $taxonomy => $type_obj ) {
189
+ if ( ! $taxonomy )
190
+ continue;
191
+
192
+ if ( in_array( $taxonomy, $unfiltered ) )
193
+ continue;
194
+
195
+ $id = "$option_basename-" . $taxonomy;
196
+ ?>
197
+ <div style="text-align:left">
198
+ <?php if ( ! empty( $hidden[$taxonomy] ) ) :?>
199
+ <input name="<?php echo($id);?>" type="hidden" id="<?php echo($id);?>" value="1" />
200
+ <input name="<?php echo("{$option_basename}-options[]");?>" type="hidden" value="<?php echo($taxonomy)?>" />
201
+
202
+ <?php else: ?>
203
+ <div class="agp-vspaced_input">
204
+ <label for="<?php echo($id);?>" title="<?php echo($taxonomy);?>">
205
+ <input name="<?php echo("{$option_basename}-options[]");?>" type="hidden" value="<?php echo($taxonomy)?>" />
206
+ <input name="<?php echo($id);?>" type="checkbox" id="<?php echo($id);?>" value="1" <?php checked('1', ! empty($enabled[$taxonomy]) );?> /> <?php echo($type_obj->label);?>
207
+
208
+ <?php
209
+ echo ('</label></div>');
210
+
211
+ endif; // displaying checkbox UI
212
+
213
+ echo '</div>';
214
+ }
215
+ echo '</td>';
216
+
217
+ ?>
218
+ </tr>
219
+ </table>
220
+
221
+ <input type="submit" name="update_filtered_taxonomies" value="<?php _e('Update', 'capsman-enhanced') ?>" class="button" />
222
+ </dd>
223
+ </dl>
224
+
225
+ <dl>
226
+ <dt><?php _e('Detailed Taxonomy Capabilities', 'capsman-enhanced'); ?></dt>
227
+ <dd style="text-align:center;">
228
+ <?php
229
+ $caption = __( 'Enforce Edit, Delete and Assign capabilities separately from Management capability.', 'capsman-enhanced' );
230
+ echo "<p class='cme-hint'>$caption</p>";
231
+
232
+ echo "<table style='width:100%'><tr>";
233
+
234
+ $unfiltered = apply_filters( 'pp_unfiltered_taxonomies', array( 'post_status', 'topic-tag' ) ); // avoid confusion with Edit Flow administrative taxonomy
235
+ $hidden = apply_filters( 'pp_hidden_taxonomies', array() );
236
+
237
+ echo '<td style="width:50%">';
238
+
239
+ $option_basename = 'detailed_taxonomies';
240
+ $option_name = 'cme_' . $option_basename;
241
+
242
+ $enabled = get_option( $option_name, array() );
243
+
244
+ foreach( $defined_taxonomies as $taxonomy => $type_obj ) {
245
+ if ( ! $taxonomy )
246
+ continue;
247
+
248
+ if ( in_array( $taxonomy, $unfiltered ) )
249
+ continue;
250
+
251
+ $id = "$option_basename-" . $taxonomy;
252
+ ?>
253
+ <div style="text-align:left">
254
+ <?php if ( ! empty( $hidden[$taxonomy] ) ) :?>
255
+ <input name="<?php echo($id);?>" type="hidden" id="<?php echo($id);?>" value="1" />
256
+ <input name="<?php echo("{$option_basename}-options[]");?>" type="hidden" value="<?php echo($taxonomy)?>" />
257
+
258
+ <?php else: ?>
259
+ <div class="agp-vspaced_input">
260
+ <label for="<?php echo($id);?>" title="<?php echo($taxonomy);?>">
261
+ <input name="<?php echo("{$option_basename}-options[]");?>" type="hidden" value="<?php echo($taxonomy)?>" />
262
+ <input name="<?php echo($id);?>" type="checkbox" id="<?php echo($id);?>" value="1" <?php checked('1', ! empty($enabled[$taxonomy]) );?> /> <?php echo($type_obj->label);?>
263
+
264
+ <?php
265
+ echo ('</label></div>');
266
+
267
+ endif; // displaying checkbox UI
268
+
269
+ echo '</div>';
270
+ }
271
+ echo '</td>';
272
+
273
+ ?>
274
+ </tr>
275
+ </table>
276
+
277
+ <input type="submit" name="update_detailed_taxonomies" value="<?php _e('Update', 'capsman-enhanced') ?>" class="button" />
278
+ </dd>
279
+ </dl>
280
+ <?php
281
  }
282
  }
283
 
lang/capsman.mo CHANGED
Binary file
lang/capsman.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Capability Manager Enhanced\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2019-02-25 22:38-0500\n"
6
- "PO-Revision-Date: 2019-02-25 22:38-0500\n"
7
  "Last-Translator: Kevin Behrens <kevin@publishpress.com>\n"
8
  "Language-Team: PublishPress <help@publishpress.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -35,19 +35,19 @@ msgstr ""
35
  msgid "%s is required for this plugin."
36
  msgstr ""
37
 
38
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:118
39
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:123
40
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:125
41
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:223
42
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:228
43
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:230
44
  msgid "Capability Manager"
45
  msgstr ""
46
 
47
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:122
48
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:125
49
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:227
50
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:230
51
  msgid "Capabilities"
52
  msgstr ""
53
 
@@ -55,548 +55,529 @@ msgstr ""
55
  msgid "Settings saved."
56
  msgstr ""
57
 
58
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:32
59
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:32
60
  #, php-format
61
- msgid "Warning: This role may not work correctly because it does not have the read capability. %1$sClick here to fix this now%2$s."
62
  msgstr ""
63
 
64
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:57
65
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:57
66
  msgid "Roles and Capabilities"
67
  msgstr ""
68
 
69
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:66
70
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:66
71
  #, php-format
72
  msgid "Capabilities for %s"
73
  msgstr ""
74
 
75
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:69
76
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:651
77
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:69
78
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:651
79
  msgid "Save Changes"
80
  msgstr ""
81
 
82
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:73
83
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:73
84
  msgid "View and modify capabilities WordPress associates with each role. Changes <strong>remain in the database</strong> even if you deactivate this plugin."
85
  msgstr ""
86
 
87
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:84
88
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:84
89
  #, php-format
90
  msgid "Thanks for using the %1$sPublishPress%2$s family of professional publishing tools."
91
  msgstr ""
92
 
93
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:115
94
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:115
95
  msgid "Automatically define type-specific capabilities for your custom post types and taxonomies"
96
  msgstr ""
97
 
98
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:119
99
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:119
100
  msgid "Assign standard WP roles supplementally for a specific post type"
101
  msgstr ""
102
 
103
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:123
104
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:123
105
  msgid "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>"
106
  msgstr ""
107
 
108
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:127
109
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:127
110
  msgid "Customize reading permissions per-category or per-post"
111
  msgstr ""
112
 
113
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:131
114
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:131
115
  msgid "Customize editing permissions per-category or per-post <em>(Pro)</em>"
116
  msgstr ""
117
 
118
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:135
119
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:135
120
  msgid "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>"
121
  msgstr ""
122
 
123
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:139
124
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:139
125
  msgid "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>"
126
  msgstr ""
127
 
128
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:143
129
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:143
130
  msgid "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>"
131
  msgstr ""
132
 
133
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:147
134
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:147
135
  msgid "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>"
136
  msgstr ""
137
 
138
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:151
139
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:151
140
  msgid "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>"
141
  msgstr ""
142
 
143
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:155
144
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:155
145
  msgid "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>"
146
  msgstr ""
147
 
148
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:159
149
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:159
150
  msgid "WPML integration to mirror permissions to translations <em>(Pro)</em>"
151
  msgstr ""
152
 
153
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:163
154
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:163
155
  msgid "Member support forum"
156
  msgstr ""
157
 
158
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:169
159
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:169
160
  #, php-format
161
  msgid "%1$sgrab%2$s %3$s"
162
  msgstr ""
163
 
164
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:169
165
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:169
166
  #, php-format
167
  msgid "%s (free install)"
168
  msgstr ""
169
 
170
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:171
171
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:171
172
  #, php-format
173
  msgid "%1$sbuy%2$s %3$s"
174
  msgstr ""
175
 
176
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:171
177
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:171
178
  #, php-format
179
  msgid "%s info/purchase"
180
  msgstr ""
181
 
182
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:248
183
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:248
184
  msgid "&nbsp;"
185
  msgstr ""
186
 
187
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:249
188
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:249
189
  msgid "Reading"
190
  msgstr ""
191
 
192
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:250
193
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:250
194
  msgid "Editing Capabilities"
195
  msgstr ""
196
 
197
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:251
198
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:251
199
  msgid "Deletion Capabilities"
200
  msgstr ""
201
 
202
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:255
203
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:255
204
  msgid "can read posts which are currently published with private visibility"
205
  msgstr ""
206
 
207
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:256
208
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:256
209
  msgid "has basic editing capability (but may need other capabilities based on post status and ownership)"
210
  msgstr ""
211
 
212
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:257
213
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:257
214
  msgid "can edit posts which were created by other users"
215
  msgstr ""
216
 
217
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:258
218
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:258
219
  msgid "can edit posts which are currently published"
220
  msgstr ""
221
 
222
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:259
223
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:259
224
  msgid "can edit posts which are currently published with private visibility"
225
  msgstr ""
226
 
227
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:260
228
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:260
229
  msgid "can make a post publicly visible"
230
  msgstr ""
231
 
232
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:261
233
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:261
234
  msgid "has basic deletion capability (but may need other capabilities based on post status and ownership)"
235
  msgstr ""
236
 
237
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:262
238
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:262
239
  msgid "can delete posts which were created by other users"
240
  msgstr ""
241
 
242
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:263
243
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:263
244
  msgid "can delete posts which are currently published"
245
  msgstr ""
246
 
247
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:264
248
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:264
249
  msgid "can delete posts which are currently published with private visibility"
250
  msgstr ""
251
 
252
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:363
253
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:455
254
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:561
255
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:363
256
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:455
257
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:561
258
  #, php-format
259
  msgid "%s: assigned by Permission Group"
260
  msgstr ""
261
 
262
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:432
263
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:432
 
 
 
 
 
 
264
  msgid "Other WordPress Core Capabilities"
265
  msgstr ""
266
 
267
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:510
268
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:626
269
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:510
270
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:626
 
 
 
 
 
271
  msgid "check/uncheck all"
272
  msgstr ""
273
 
274
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:510
275
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:626
276
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:510
277
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:626
278
  msgid "negate all (storing as disabled capabilities)"
279
  msgstr ""
280
 
281
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:510
282
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:626
283
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:510
284
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:626
285
  msgid "negate none (add/remove all capabilities normally)"
286
  msgstr ""
287
 
288
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:517
289
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:517
290
  msgid "Additional Capabilities"
291
  msgstr ""
292
 
293
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:617
294
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:617
295
  msgid "Level:"
296
  msgstr ""
297
 
298
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:635
299
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:635
300
  msgid "Note: Underscores replace spaces in stored capability name (\"edit users\" => \"edit_users\")."
301
  msgstr ""
302
 
303
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:654
304
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:654
305
  msgid "Delete this role"
306
  msgstr ""
307
 
308
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:654
309
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:654
310
  #, php-format
311
  msgid ""
312
  "You are about to delete the %s role.\n"
313
  " 'Cancel' to stop, 'OK' to delete."
314
  msgstr ""
315
 
316
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:654
317
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:654
318
  msgid "Delete Role"
319
  msgstr ""
320
 
321
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:661
322
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:661
323
  msgid "Select New Role"
324
  msgstr ""
325
 
326
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:669
327
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:669
328
  msgid "Change"
329
  msgstr ""
330
 
331
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:682
332
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:682
333
  msgid "Create New Role"
334
  msgstr ""
335
 
336
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:685
337
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:685
338
- msgid "Name of new role"
 
 
339
  msgstr ""
340
 
341
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:688
342
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:704
343
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:89
344
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:688
345
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:704
346
  msgid "Make role available for supplemental assignment to Permission Groups only"
347
  msgstr ""
348
 
349
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:688
350
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:704
351
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:688
352
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:704
353
  msgid "hidden"
354
  msgstr ""
355
 
356
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:692
357
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:692
358
  msgid "Create"
359
  msgstr ""
360
 
361
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:698
362
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:698
363
  msgid "Copy this role to"
364
  msgstr ""
365
 
366
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:701
367
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:701
368
- msgid "Name of copied role"
369
- msgstr ""
370
-
371
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:708
372
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:708
373
  msgid "Copy"
374
  msgstr ""
375
 
376
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:714
377
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:714
378
  msgid "Add Capability"
379
  msgstr ""
380
 
381
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:716
382
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:716
383
- msgid "capability name"
384
- msgstr ""
385
-
386
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:717
387
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:717
388
  msgid "Add to role"
389
  msgstr ""
390
 
391
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:722
392
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:722
393
  msgid "Backup Tool"
394
  msgstr ""
395
 
396
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:724
397
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:724
398
  msgid "Backup / Restore Roles"
399
  msgstr ""
400
 
401
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:729
402
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:729
403
  msgid "Related Permissions Plugins"
404
  msgstr ""
405
 
406
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:731
407
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:731
408
  msgid "PublishPress"
409
  msgstr ""
410
 
411
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:732
412
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:732
413
  msgid "Press Permit"
414
  msgstr ""
415
 
416
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:733
417
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:733
418
  msgid "Revisionary"
419
  msgstr ""
420
 
421
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:761
422
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:761
423
  msgid "Create this role definition in new (future) sites"
424
  msgstr ""
425
 
426
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:761
427
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:761
428
  msgid "include in new sites"
429
  msgstr ""
430
 
431
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:764
432
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:764
433
  msgid "Copy / update this role definition to all sites now"
434
  msgstr ""
435
 
436
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:764
437
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:764
438
  msgid "sync role to all sites now"
439
  msgstr ""
440
 
441
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:9
442
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:9
443
  msgid "You do not have permission to restore roles."
444
  msgstr ""
445
 
446
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:44
447
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:44
448
  msgid "New backup saved."
449
  msgstr ""
450
 
451
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:51
452
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:51
453
  msgid "Roles and Capabilities restored from initial backup."
454
  msgstr ""
455
 
456
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:53
457
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:63
458
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:53
459
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:63
460
  msgid "Restore failed. No backup found."
461
  msgstr ""
462
 
463
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:61
464
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:61
465
  msgid "Roles and Capabilities restored from last backup."
466
  msgstr ""
467
 
468
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:82
469
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:82
470
  msgid "Needed function to create default roles not found!"
471
  msgstr ""
472
 
473
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:95
474
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup-handler.php:95
475
  msgid "Roles and Capabilities reset to WordPress defaults"
476
  msgstr ""
477
 
478
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:33
479
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:33
480
  #, php-format
481
  msgid "Backup Tool for %1$sCapability Manager%2$s"
482
  msgstr ""
483
 
484
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:42
485
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:42
486
  msgid "Backup and Restore"
487
  msgstr ""
488
 
489
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:46
490
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:46
491
  msgid "Select action:"
492
  msgstr ""
493
 
494
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:49
495
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:49
496
  msgid "Backup roles and capabilities"
497
  msgstr ""
498
 
499
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:53
500
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:53
501
  msgid "Restore initial backup"
502
  msgstr ""
503
 
504
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:56
505
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:56
506
  msgid "Restore last saved backup"
507
  msgstr ""
508
 
509
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:58
510
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:58
511
  msgid "Do Action"
512
  msgstr ""
513
 
514
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:66
515
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:66
516
  msgid "Show initial backup"
517
  msgstr ""
518
 
519
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:68
520
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:68
521
  msgid "Show last backup"
522
  msgstr ""
523
 
524
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:89
525
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:89
526
  #, php-format
527
  msgid "Initial Backup - %s"
528
  msgstr ""
529
 
530
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:89
531
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:89
532
  msgid "Initial Backup"
533
  msgstr ""
534
 
535
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:90
536
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:90
537
  #, php-format
538
  msgid "Last Backup - %s"
539
  msgstr ""
540
 
541
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:90
542
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:90
543
  msgid "Last Backup"
544
  msgstr ""
545
 
546
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:100
547
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:100
548
  #, php-format
549
  msgid "%s (%s roles)"
550
  msgstr ""
551
 
552
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:116
553
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:116
554
  #, php-format
555
  msgid "%s (level %s)"
556
  msgstr ""
557
 
558
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:137
559
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:137
560
  msgid "Reset WordPress Defaults"
561
  msgstr ""
562
 
563
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:139
564
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:139
565
  msgid "WARNING:"
566
  msgstr ""
567
 
568
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:139
569
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:139
570
  msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
571
  msgstr ""
572
 
573
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:142
574
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:142
575
  msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
576
  msgstr ""
577
 
578
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:143
579
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:143
580
  msgid "It is recommended to use this only as a last resource!"
581
  msgstr ""
582
 
583
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:144
584
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:144
585
  msgid "Reset Roles and Capabilities to WordPress defaults"
586
  msgstr ""
587
 
588
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:144
589
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:144
590
  msgid ""
591
  "You are about to reset Roles and Capabilities to WordPress defaults.\n"
592
  " 'Cancel' to stop, 'OK' to reset."
593
  msgstr ""
594
 
595
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:144
596
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/backup.php:144
597
  msgid "Reset to WordPress defaults"
598
  msgstr ""
599
 
 
 
 
 
 
 
 
 
 
600
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:16
601
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:29
602
  msgid "New role created."
@@ -616,11 +597,7 @@ msgid "Incorrect capability name."
616
  msgstr ""
617
 
618
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:91
619
- msgid "Capability settings saved."
620
- msgstr ""
621
-
622
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:93
623
- msgid "Error saving capability settings."
624
  msgstr ""
625
 
626
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:97
@@ -631,103 +608,122 @@ msgstr ""
631
  msgid "You cannot remove Manage Capabilities from Administrators"
632
  msgstr ""
633
 
634
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:311
635
  #, php-format
636
  msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
637
  msgstr ""
638
 
639
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:358
640
  #, php-format
641
  msgid "Role has been deleted. %1$d users moved to default role %2$s."
642
  msgstr ""
643
 
644
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:126
645
  msgid "Explicity negate this capability by storing as disabled"
646
  msgstr ""
647
 
648
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:127
649
  msgid "Explicitly negate these capabilities by storing as disabled"
650
  msgstr ""
651
 
652
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:128
653
  msgid "Post type registration does not define this capability distinctly"
654
  msgstr ""
655
 
656
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:129
657
  msgid "This capability is explicitly negated. Click to add/remove normally."
658
  msgstr ""
659
 
660
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:130
661
  msgid "Add or remove this capability from the WordPress role"
662
  msgstr ""
663
 
664
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:131
665
  msgid "Add or remove capability from the role normally"
666
  msgstr ""
667
 
668
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:327
669
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:346
670
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:505
671
  msgid "What do you think you're doing?!?"
672
  msgstr ""
673
 
674
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:385
675
  msgid "Bad form Received"
676
  msgstr ""
677
 
678
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:47
679
  #, php-format
680
  msgid "see %1$sRole Usage%2$s: \"Pattern Roles\""
681
  msgstr ""
682
 
683
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:49
684
  #, php-format
685
  msgid "activate %1$sAdvanced settings%2$s, see Role Usage"
686
  msgstr ""
687
 
688
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:54
689
  #, php-format
690
  msgid "\"Posts\" capabilities selected here also define type-specific role assignment for Permission Groups%s."
691
  msgstr ""
692
 
693
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:56
694
  #, php-format
695
  msgid "\"Posts\" capabilities selected here also define type-specific role assignment for Permit Groups%s."
696
  msgstr ""
697
 
698
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:64
699
- msgid "Capabilities for custom statuses can be manually added here (see Post Statuses > Status > Capability Mapping for applicable names). However, it is usually more convenient to use Permission Groups to assign a supplemental status-specific role."
 
700
  msgstr ""
701
 
702
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:66
703
  msgid "Capabilities for custom statuses can be manually added here. Or activate the PP Custom Post Statuses extension to assign status-specific supplemental roles."
704
  msgstr ""
705
 
706
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:69
707
  msgid "Capabilities for custom statuses can be manually added to a role here (see Conditions > Status > Capability Mapping for applicable names). However, it is usually more convenient to use Permit Groups to assign a supplemental status-specific role."
708
  msgstr ""
709
 
710
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:89
711
  msgid "hidden role"
712
  msgstr ""
713
 
714
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:99
715
- msgid "Force Type-Specific Capabilities"
716
  msgstr ""
717
 
718
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:102
719
- msgid "Force unique capability names for:"
720
  msgstr ""
721
 
722
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:107
723
- msgid "(PP Filtered Post Types, Taxonomies)"
724
  msgstr ""
725
 
726
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:162
727
  msgid "Use create_posts capability"
728
  msgstr ""
729
 
730
- #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:167
 
 
731
  msgid "Update"
732
  msgstr ""
733
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: Capability Manager Enhanced\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2019-03-28 17:59-0500\n"
6
+ "PO-Revision-Date: 2019-03-28 17:59-0500\n"
7
  "Last-Translator: Kevin Behrens <kevin@publishpress.com>\n"
8
  "Language-Team: PublishPress <help@publishpress.com>\n"
9
  "MIME-Version: 1.0\n"
35
  msgid "%s is required for this plugin."
36
  msgstr ""
37
 
38
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:153
39
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:158
40
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:160
41
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:255
42
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:260
43
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:262
44
  msgid "Capability Manager"
45
  msgstr ""
46
 
47
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:157
48
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/capsman-enhanced.php:160
49
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:259
50
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:262
51
  msgid "Capabilities"
52
  msgstr ""
53
 
55
  msgid "Settings saved."
56
  msgstr ""
57
 
58
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:36
59
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:36
60
  #, php-format
61
+ msgid "Warning: This role cannot access the dashboard without the read capability. %1$sClick here to fix this now%2$s."
62
  msgstr ""
63
 
64
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:61
65
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:61
66
  msgid "Roles and Capabilities"
67
  msgstr ""
68
 
69
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:70
70
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:70
71
  #, php-format
72
  msgid "Capabilities for %s"
73
  msgstr ""
74
 
75
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:73
76
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:687
77
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:73
78
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:687
79
  msgid "Save Changes"
80
  msgstr ""
81
 
82
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:77
83
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:77
84
  msgid "View and modify capabilities WordPress associates with each role. Changes <strong>remain in the database</strong> even if you deactivate this plugin."
85
  msgstr ""
86
 
87
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:89
88
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:89
89
  #, php-format
90
  msgid "Thanks for using the %1$sPublishPress%2$s family of professional publishing tools."
91
  msgstr ""
92
 
93
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:120
94
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:120
95
  msgid "Automatically define type-specific capabilities for your custom post types and taxonomies"
96
  msgstr ""
97
 
98
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:124
99
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:124
100
  msgid "Assign standard WP roles supplementally for a specific post type"
101
  msgstr ""
102
 
103
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:128
104
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:128
105
  msgid "Assign custom WP roles supplementally for a specific post type <em>(Pro)</em>"
106
  msgstr ""
107
 
108
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:132
109
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:132
110
  msgid "Customize reading permissions per-category or per-post"
111
  msgstr ""
112
 
113
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:136
114
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:136
115
  msgid "Customize editing permissions per-category or per-post <em>(Pro)</em>"
116
  msgstr ""
117
 
118
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:140
119
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:140
120
  msgid "Custom Post Visibility statuses, fully implemented throughout wp-admin <em>(Pro)</em>"
121
  msgstr ""
122
 
123
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:144
124
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:144
125
  msgid "Custom Moderation statuses for access-controlled, multi-step publishing workflow <em>(Pro)</em>"
126
  msgstr ""
127
 
128
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:148
129
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:148
130
  msgid "Regulate permissions for Edit Flow post statuses <em>(Pro)</em>"
131
  msgstr ""
132
 
133
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:152
134
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:152
135
  msgid "Customize the moderated editing of published content with Revisionary or Post Forking <em>(Pro)</em>"
136
  msgstr ""
137
 
138
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:156
139
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:156
140
  msgid "Grant Spectator, Participant or Moderator access to specific bbPress forums <em>(Pro)</em>"
141
  msgstr ""
142
 
143
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:160
144
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:160
145
  msgid "Grant supplemental content permissions to a BuddyPress group <em>(Pro)</em>"
146
  msgstr ""
147
 
148
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:164
149
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:164
150
  msgid "WPML integration to mirror permissions to translations <em>(Pro)</em>"
151
  msgstr ""
152
 
153
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:168
154
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:168
155
  msgid "Member support forum"
156
  msgstr ""
157
 
158
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:174
159
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:174
160
  #, php-format
161
  msgid "%1$sgrab%2$s %3$s"
162
  msgstr ""
163
 
164
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:174
165
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:174
166
  #, php-format
167
  msgid "%s (free install)"
168
  msgstr ""
169
 
170
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:176
171
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:176
172
  #, php-format
173
  msgid "%1$sbuy%2$s %3$s"
174
  msgstr ""
175
 
176
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:176
177
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:176
178
  #, php-format
179
  msgid "%s info/purchase"
180
  msgstr ""
181
 
182
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:252
183
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:252
184
  msgid "&nbsp;"
185
  msgstr ""
186
 
187
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:253
188
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:253
189
  msgid "Reading"
190
  msgstr ""
191
 
192
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:254
193
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:254
194
  msgid "Editing Capabilities"
195
  msgstr ""
196
 
197
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:255
198
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:255
199
  msgid "Deletion Capabilities"
200
  msgstr ""
201
 
202
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:259
203
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:259
204
  msgid "can read posts which are currently published with private visibility"
205
  msgstr ""
206
 
207
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:260
208
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:260
209
  msgid "has basic editing capability (but may need other capabilities based on post status and ownership)"
210
  msgstr ""
211
 
212
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:261
213
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:261
214
  msgid "can edit posts which were created by other users"
215
  msgstr ""
216
 
217
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:262
218
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:262
219
  msgid "can edit posts which are currently published"
220
  msgstr ""
221
 
222
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:263
223
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:263
224
  msgid "can edit posts which are currently published with private visibility"
225
  msgstr ""
226
 
227
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:264
228
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:264
229
  msgid "can make a post publicly visible"
230
  msgstr ""
231
 
232
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:265
233
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:265
234
  msgid "has basic deletion capability (but may need other capabilities based on post status and ownership)"
235
  msgstr ""
236
 
237
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:266
238
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:266
239
  msgid "can delete posts which were created by other users"
240
  msgstr ""
241
 
242
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:267
243
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:267
244
  msgid "can delete posts which are currently published"
245
  msgstr ""
246
 
247
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:268
248
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:268
249
  msgid "can delete posts which are currently published with private visibility"
250
  msgstr ""
251
 
252
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:395
253
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:484
254
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:597
255
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:395
256
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:484
257
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:597
258
  #, php-format
259
  msgid "%s: assigned by Permission Group"
260
  msgstr ""
261
 
262
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:409
263
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:409
264
+ #, php-format
265
+ msgid "shared capability: %s"
266
+ msgstr ""
267
+
268
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:461
269
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:461
270
  msgid "Other WordPress Core Capabilities"
271
  msgstr ""
272
 
273
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:503
274
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:503
275
+ msgid "Lockout Prevention: To remove read capability, first remove WordPress admin / editing capabilities, or add \"dashboard_lockout_ok\" capability"
276
+ msgstr ""
277
+
278
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:546
279
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:662
280
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:546
281
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:662
282
  msgid "check/uncheck all"
283
  msgstr ""
284
 
285
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:546
286
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:662
287
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:546
288
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:662
289
  msgid "negate all (storing as disabled capabilities)"
290
  msgstr ""
291
 
292
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:546
293
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:662
294
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:546
295
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:662
296
  msgid "negate none (add/remove all capabilities normally)"
297
  msgstr ""
298
 
299
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:553
300
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:553
301
  msgid "Additional Capabilities"
302
  msgstr ""
303
 
304
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:653
305
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:653
306
  msgid "Level:"
307
  msgstr ""
308
 
309
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:671
310
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:671
311
  msgid "Note: Underscores replace spaces in stored capability name (\"edit users\" => \"edit_users\")."
312
  msgstr ""
313
 
314
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:690
315
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:690
316
  msgid "Delete this role"
317
  msgstr ""
318
 
319
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:690
320
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:690
321
  #, php-format
322
  msgid ""
323
  "You are about to delete the %s role.\n"
324
  " 'Cancel' to stop, 'OK' to delete."
325
  msgstr ""
326
 
327
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:690
328
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:690
329
  msgid "Delete Role"
330
  msgstr ""
331
 
332
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:697
333
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:697
334
  msgid "Select New Role"
335
  msgstr ""
336
 
337
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:705
338
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:705
339
  msgid "Change"
340
  msgstr ""
341
 
342
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:718
343
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:718
344
  msgid "Create New Role"
345
  msgstr ""
346
 
347
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:721
348
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:737
349
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:721
350
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:737
351
+ msgid "Role Name"
352
  msgstr ""
353
 
354
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:724
355
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:740
356
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:86
357
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:724
358
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:740
359
  msgid "Make role available for supplemental assignment to Permission Groups only"
360
  msgstr ""
361
 
362
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:724
363
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:740
364
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:724
365
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:740
366
  msgid "hidden"
367
  msgstr ""
368
 
369
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:728
370
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:728
371
  msgid "Create"
372
  msgstr ""
373
 
374
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:734
375
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:734
376
  msgid "Copy this role to"
377
  msgstr ""
378
 
379
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:744
380
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:744
 
 
 
 
 
381
  msgid "Copy"
382
  msgstr ""
383
 
384
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:750
385
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:750
386
  msgid "Add Capability"
387
  msgstr ""
388
 
389
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:753
390
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:753
 
 
 
 
 
391
  msgid "Add to role"
392
  msgstr ""
393
 
394
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:758
395
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:758
396
  msgid "Backup Tool"
397
  msgstr ""
398
 
399
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:760
400
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:760
401
  msgid "Backup / Restore Roles"
402
  msgstr ""
403
 
404
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:765
405
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:765
406
  msgid "Related Permissions Plugins"
407
  msgstr ""
408
 
409
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:770
410
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:770
411
  msgid "PublishPress"
412
  msgstr ""
413
 
414
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:772
415
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:772
416
  msgid "Press Permit"
417
  msgstr ""
418
 
419
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:778
420
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:778
421
  msgid "Revisionary"
422
  msgstr ""
423
 
424
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:807
425
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:807
426
  msgid "Create this role definition in new (future) sites"
427
  msgstr ""
428
 
429
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:807
430
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:807
431
  msgid "include in new sites"
432
  msgstr ""
433
 
434
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:810
435
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:810
436
  msgid "Copy / update this role definition to all sites now"
437
  msgstr ""
438
 
439
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/admin.php:810
440
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced\includes/admin.php:810
441
  msgid "sync role to all sites now"
442
  msgstr ""
443
 
444
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:9
 
445
  msgid "You do not have permission to restore roles."
446
  msgstr ""
447
 
448
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:44
 
449
  msgid "New backup saved."
450
  msgstr ""
451
 
452
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:51
 
453
  msgid "Roles and Capabilities restored from initial backup."
454
  msgstr ""
455
 
456
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:53
457
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:63
 
 
458
  msgid "Restore failed. No backup found."
459
  msgstr ""
460
 
461
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:61
 
462
  msgid "Roles and Capabilities restored from last backup."
463
  msgstr ""
464
 
465
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:82
 
466
  msgid "Needed function to create default roles not found!"
467
  msgstr ""
468
 
469
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup-handler.php:95
 
470
  msgid "Roles and Capabilities reset to WordPress defaults"
471
  msgstr ""
472
 
473
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:33
 
474
  #, php-format
475
  msgid "Backup Tool for %1$sCapability Manager%2$s"
476
  msgstr ""
477
 
478
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:42
 
479
  msgid "Backup and Restore"
480
  msgstr ""
481
 
482
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:46
 
483
  msgid "Select action:"
484
  msgstr ""
485
 
486
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:49
 
487
  msgid "Backup roles and capabilities"
488
  msgstr ""
489
 
490
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:53
 
491
  msgid "Restore initial backup"
492
  msgstr ""
493
 
494
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:56
 
495
  msgid "Restore last saved backup"
496
  msgstr ""
497
 
498
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:58
 
499
  msgid "Do Action"
500
  msgstr ""
501
 
502
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:66
 
503
  msgid "Show initial backup"
504
  msgstr ""
505
 
506
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:68
 
507
  msgid "Show last backup"
508
  msgstr ""
509
 
510
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:89
 
511
  #, php-format
512
  msgid "Initial Backup - %s"
513
  msgstr ""
514
 
515
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:89
 
516
  msgid "Initial Backup"
517
  msgstr ""
518
 
519
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:90
 
520
  #, php-format
521
  msgid "Last Backup - %s"
522
  msgstr ""
523
 
524
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:90
 
525
  msgid "Last Backup"
526
  msgstr ""
527
 
528
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:100
 
529
  #, php-format
530
  msgid "%s (%s roles)"
531
  msgstr ""
532
 
533
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:116
 
534
  #, php-format
535
  msgid "%s (level %s)"
536
  msgstr ""
537
 
538
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:137
 
539
  msgid "Reset WordPress Defaults"
540
  msgstr ""
541
 
542
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:139
 
543
  msgid "WARNING:"
544
  msgstr ""
545
 
546
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:139
 
547
  msgid "Reseting default Roles and Capabilities will set them to the WordPress install defaults."
548
  msgstr ""
549
 
550
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:142
 
551
  msgid "If you have installed any plugin that adds new roles or capabilities, these will be lost."
552
  msgstr ""
553
 
554
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:143
 
555
  msgid "It is recommended to use this only as a last resource!"
556
  msgstr ""
557
 
558
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:144
 
559
  msgid "Reset Roles and Capabilities to WordPress defaults"
560
  msgstr ""
561
 
562
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:144
 
563
  msgid ""
564
  "You are about to reset Roles and Capabilities to WordPress defaults.\n"
565
  " 'Cancel' to stop, 'OK' to reset."
566
  msgstr ""
567
 
568
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/backup.php:144
 
569
  msgid "Reset to WordPress defaults"
570
  msgstr ""
571
 
572
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/filters-woocommerce.php:32
573
+ #, php-format
574
+ msgid "All %s"
575
+ msgstr ""
576
+
577
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/filters-woocommerce.php:33
578
+ msgid "Add New"
579
+ msgstr ""
580
+
581
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:16
582
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:29
583
  msgid "New role created."
597
  msgstr ""
598
 
599
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:91
600
+ msgid "Type / Taxonomy settings saved."
 
 
 
 
601
  msgstr ""
602
 
603
  #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:97
608
  msgid "You cannot remove Manage Capabilities from Administrators"
609
  msgstr ""
610
 
611
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:317
612
  #, php-format
613
  msgid "Cannot delete default role. You <a href=\"%s\">have to change it first</a>."
614
  msgstr ""
615
 
616
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/handler.php:364
617
  #, php-format
618
  msgid "Role has been deleted. %1$d users moved to default role %2$s."
619
  msgstr ""
620
 
621
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:158
622
  msgid "Explicity negate this capability by storing as disabled"
623
  msgstr ""
624
 
625
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:159
626
  msgid "Explicitly negate these capabilities by storing as disabled"
627
  msgstr ""
628
 
629
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:160
630
  msgid "Post type registration does not define this capability distinctly"
631
  msgstr ""
632
 
633
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:161
634
  msgid "This capability is explicitly negated. Click to add/remove normally."
635
  msgstr ""
636
 
637
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:162
638
  msgid "Add or remove this capability from the WordPress role"
639
  msgstr ""
640
 
641
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:163
642
  msgid "Add or remove capability from the role normally"
643
  msgstr ""
644
 
645
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:359
646
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:378
647
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:537
648
  msgid "What do you think you're doing?!?"
649
  msgstr ""
650
 
651
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/manager.php:417
652
  msgid "Bad form Received"
653
  msgstr ""
654
 
655
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:44
656
  #, php-format
657
  msgid "see %1$sRole Usage%2$s: \"Pattern Roles\""
658
  msgstr ""
659
 
660
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:46
661
  #, php-format
662
  msgid "activate %1$sAdvanced settings%2$s, see Role Usage"
663
  msgstr ""
664
 
665
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:51
666
  #, php-format
667
  msgid "\"Posts\" capabilities selected here also define type-specific role assignment for Permission Groups%s."
668
  msgstr ""
669
 
670
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:53
671
  #, php-format
672
  msgid "\"Posts\" capabilities selected here also define type-specific role assignment for Permit Groups%s."
673
  msgstr ""
674
 
675
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:61
676
+ #, php-format
677
+ msgid "Capabilities for custom statuses can be manually added here. (See %sPermissions > Post Statuses%s for applicable names). %sSupplemental status-specific roles%s are usually more convenient, though."
678
  msgstr ""
679
 
680
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:63
681
  msgid "Capabilities for custom statuses can be manually added here. Or activate the PP Custom Post Statuses extension to assign status-specific supplemental roles."
682
  msgstr ""
683
 
684
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:66
685
  msgid "Capabilities for custom statuses can be manually added to a role here (see Conditions > Status > Capability Mapping for applicable names). However, it is usually more convenient to use Permit Groups to assign a supplemental status-specific role."
686
  msgstr ""
687
 
688
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:86
689
  msgid "hidden role"
690
  msgstr ""
691
 
692
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:97
693
+ msgid "Type-Specific Capabilities"
694
  msgstr ""
695
 
696
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:100
697
+ msgid "Ensure permissions can be controlled separately from other post types."
698
  msgstr ""
699
 
700
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:155
701
+ msgid "Make selected post types require a different capability to add new posts."
702
  msgstr ""
703
 
704
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:155
705
  msgid "Use create_posts capability"
706
  msgstr ""
707
 
708
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:160
709
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:221
710
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:277
711
  msgid "Update"
712
  msgstr ""
713
 
714
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:170
715
+ msgid "Taxonomy-Specific Capabilities"
716
+ msgstr ""
717
+
718
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:173
719
+ msgid "Ensure permissions can be controlled separately from other taxonomies."
720
+ msgstr ""
721
+
722
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:226
723
+ msgid "Detailed Taxonomy Capabilities"
724
+ msgstr ""
725
+
726
+ #: F:\www\wp50\wp-content\plugins\capability-manager-enhanced/includes/pp-ui.php:229
727
+ msgid "Enforce Edit, Delete and Assign capabilities separately from Management capability."
728
+ msgstr ""
729
+
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: publishpress, kevinB, stevejburge, andergmartins
3
  Tags: roles, capabilities, manager, editor, rights, role, capability, types, taxonomies, network, multisite, default
4
  Requires at least: 4.1
5
  Tested up to: 5.1
6
- Stable tag: 1.6.1
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -11,43 +11,44 @@ A simple way to manage WordPress roles and capabilities.
11
 
12
  == Description ==
13
 
14
- Capability Manager Enhanced provides a simple way to manage WordPress role definitions (Subscriber, Editor, etc.). View or change the capabilities of any role, add new roles, copy existing roles into new ones, and add new capabilities to existing roles. Now supports capability negation and role networking.
15
 
16
  = Features: =
17
 
18
- * Create roles
19
- * Manage role capabilities
20
- * Supports negation: set any capability to granted, not granted, or blocked
21
- * Copy any role to all network sites
22
- * Mark any role for auto-copy to future network sites
 
 
 
 
23
  * Backup and restore Roles and Capabilities to revert your last changes.
24
- * Revert Roles and Capabilities to WordPress defaults.
25
-
26
  Capability Manager Enhanced is professionally developed and supported by the experienced <a href="https://publishpress.com">PublishPress</a> team.
27
 
28
  It has been a reliable tool since 2012, when PublishPress team member Kevin Behrens forked it from Jordi Canals' abandoned Capability Manager plugin.
29
 
30
- When the WordPress roles and capabilities model is not enough, take advantage of <a href="https://wordpress.org/plugins/press-permit-core">Press Permit</a> plugin integration:
31
-
32
- * easily specify which post types require type-specific capability definitions
33
- * show capabilities which Press Permit adds to the role by supplemental type-specific role assignment
34
 
35
  Role management can also be delegated:
36
 
37
- * Only users with 'manage_capabilities' can manage them. This capability is created at install time and assigned to Administrators.
38
- * Administrator role cannot be deleted.
39
- * Non-administrators can only manage roles or users with same or lower capabilities.
40
 
41
  == Screenshots ==
42
 
43
- 1. Users Menu.
44
- 2. View or Modify capabilities for a role.
45
- 3. Network: copy role to existing or future sites.
46
- 4. Actions on roles.
47
- 5. Permissions Menu (Press Permit integration).
48
- 6. View or Modify capabilities for a role (with Press Permit Pro).
49
- 7. Force type-specific capabilities (Press Permit integration).
50
- 8. Backup/Restore tool.
51
 
52
  == Frequently Asked Questions ==
53
 
@@ -69,6 +70,14 @@ Keep in mind that this plugin's main purpose is to expose switches (defined capa
69
 
70
  == Changelog ==
71
 
 
 
 
 
 
 
 
 
72
  = 1.6.1 =
73
  * Feature : Prevent read capability from being removed from a standard role
74
  * Feature : If read capability is missing from a standard role, display warning and instant fix link
3
  Tags: roles, capabilities, manager, editor, rights, role, capability, types, taxonomies, network, multisite, default
4
  Requires at least: 4.1
5
  Tested up to: 5.1
6
+ Stable tag: 1.7
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ Control permissions requirements for your post types, and assign those capabilities to any WordPress role.
15
 
16
  = Features: =
17
 
18
+ * Create Roles
19
+ * Manage Role Capabilities
20
+ * Cause type-specific Capabilities to be required and applied for any Post Type
21
+ * Cause distinct edit, delete and assign Capabilities to be required and applied for any Taxonomy
22
+ * Some specialized support for WooCommerce Post Types
23
+ * Supports negation: set any Capability to granted, not granted, or blocked
24
+ * Integration with Press Permit and PublishPress for comprehensive publishing solutions
25
+ * Copy any Role to all network sites
26
+ * Mark any Role for auto-copy to future network sites
27
  * Backup and restore Roles and Capabilities to revert your last changes.
28
+ * Revert Roles and Capabilities to WordPress defaults.
29
+
30
  Capability Manager Enhanced is professionally developed and supported by the experienced <a href="https://publishpress.com">PublishPress</a> team.
31
 
32
  It has been a reliable tool since 2012, when PublishPress team member Kevin Behrens forked it from Jordi Canals' abandoned Capability Manager plugin.
33
 
34
+ For additional versatility and convenience, enjoy <a href="https://wordpress.org/plugins/press-permit-core">Press Permit</a> plugin integration. Capability Manager Enhanced will show which capabilities have been added indirectly (as a pre-defined subset) by supplemental Type-Specific Roles (Page Contributor, Media Author, Product Editor, etc.)
 
 
 
35
 
36
  Role management can also be delegated:
37
 
38
+ * Only Users with 'manage_capabilities' can manage them. This Capability is created at install time and assigned to Administrators.
39
+ * Administrator Role cannot be deleted.
40
+ * Non-administrators can only manager Roles or Users with same or lower capabilities.
41
 
42
  == Screenshots ==
43
 
44
+ 1. Users Menu
45
+ 2. View or modify Capabilities for any Role
46
+ 3. Network: copy Role to existing or future Sites
47
+ 4. Role operations
48
+ 5. Permissions Menu (Press Permit integration)
49
+ 6. Shading of Capabilities granted by supplemental Type-Specific Roles
50
+ 7. Enforce Type-Specific Capabilities (Press Permit no longer required)
51
+ 8. Backup / Restore tool
52
 
53
  == Frequently Asked Questions ==
54
 
70
 
71
  == Changelog ==
72
 
73
+ = 1.7 - 28 Mar 2019 =
74
+ * Feature : New right sidebar setting: "Type-Specific Capabilities" for selected post types (without activating Press Permit Core).
75
+ * Feature : New right sidebar setting: "Taxonomy-Specific Capabilities" ensures a distinct manage capability for selected taxonomies
76
+ * Feature : New right sidebar setting: "Detailed Taxonomy Capabilities" causes term assign, edit and deletion capabilities to be required and credited separate from management capability
77
+ * Feature : WooCommerce - Ensure orders can be edited or added based on edit_shop_orders / create_shop_orders capability
78
+ * Change : Lockout safeguard (preventing read capability removal) is bypassed if role has no WP admin / edit capabilities, or if it has "dashboard_lockout_ok" capability
79
+ * Compat : Press Permit: new plugin page slugs in Press Permit Core 2.7
80
+
81
  = 1.6.1 =
82
  * Feature : Prevent read capability from being removed from a standard role
83
  * Feature : If read capability is missing from a standard role, display warning and instant fix link