User Role Editor - Version 3.10

Version Description

  • 04.02.2013
  • You can assign to user multiple roles simultaneously. Use user level roles and capabilities editor for that. You can click 'Capabilities' link under selected user row at users list or 'Assign Roles and Additional Capabilities' link at user profile.
  • Critical bug fix: hidden deprecated WordPress core capabilities had turned on after any update made to the role. Deprecated capabilities are not currently in use by WordPress itself. But old plugins or themes could still use them. If you use some outdated code I recommend you to check all roles, you modified with User Role Editor, and turn off unneeded deprecated capabilities there.
  • User with Administrator role is secured better from editing, deletion by user with lower capabilities.
Download this release

Release Info

Developer shinephp
Plugin Icon 128x128 User Role Editor
Version 3.10
Comparing to
See all releases

Code changes from version 3.9 to 3.10

css/ure-admin.css CHANGED
@@ -78,4 +78,8 @@ input.warning:hover, a.warning:hover {
78
 
79
  #ure_greetings {
80
  max-width: 250px;
 
 
 
 
81
  }
78
 
79
  #ure_greetings {
80
  max-width: 250px;
81
+ }
82
+
83
+ .hidden {
84
+ display: none;
85
  }
includes/ure-lib.php CHANGED
@@ -14,6 +14,7 @@ $ure_roles = false; $ure_capabilitiesToSave = false;
14
  $ure_currentRole = false; $ure_currentRoleName = false;
15
  $ure_toldAboutBackup = false; $ure_apply_to_all = false;
16
  $ure_userToEdit = false; $ure_fullCapabilities = false;
 
17
 
18
  // this array will be used to cashe users checked for Administrator role
19
  $ure_userToCheck = array();
@@ -119,14 +120,14 @@ function ure_showMessage($message) {
119
  // end of ure_showMessage()
120
 
121
 
122
- function ure_getUserRoles() {
123
  global $wp_roles;
124
 
125
  if (!isset( $wp_roles ) ) {
126
  $wp_roles = new WP_Roles();
127
  }
128
 
129
- if ( function_exists('bbp_filter_blog_editable_roles') ) { // bbPress plugin is active
130
  $ure_roles = bbp_filter_blog_editable_roles( $wp_roles->roles ); // exclude bbPress roles
131
  $bbp_full_caps = bbp_get_caps_for_role( bbp_get_keymaster_role() );
132
  // add bbPress keymaster caps to Administrator role
@@ -729,19 +730,31 @@ class ure_TableSorter {
729
 
730
 
731
  function ure_updateUser($user) {
732
- global $wpdb, $ure_capabilitiesToSave, $ure_currentRole;
733
 
734
- $user->remove_all_caps();
735
- if (count($user->roles)>0) {
736
- $userRole = $user->roles[0];
737
- } else {
738
- $userRole = '';
739
- }
740
- $user->set_role($ure_currentRole);
741
-
742
- if (count($ure_capabilitiesToSave)>0) {
743
- foreach ($ure_capabilitiesToSave as $key=>$value) {
744
- $user->add_cap($key);
 
 
 
 
 
 
 
 
 
 
 
 
745
  }
746
  }
747
  $user->update_user_level_from_caps();
@@ -1043,4 +1056,134 @@ function ure_get_deprecated_caps() {
1043
  }
1044
  // end of get_deprecated_caps()
1045
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1046
  ?>
14
  $ure_currentRole = false; $ure_currentRoleName = false;
15
  $ure_toldAboutBackup = false; $ure_apply_to_all = false;
16
  $ure_userToEdit = false; $ure_fullCapabilities = false;
17
+ $ure_show_deprecated_caps = false; $ure_caps_readable = false;
18
 
19
  // this array will be used to cashe users checked for Administrator role
20
  $ure_userToCheck = array();
120
  // end of ure_showMessage()
121
 
122
 
123
+ function ure_getUserRoles( $ure_object='role' ) {
124
  global $wp_roles;
125
 
126
  if (!isset( $wp_roles ) ) {
127
  $wp_roles = new WP_Roles();
128
  }
129
 
130
+ if ('role'===$ure_object && function_exists('bbp_filter_blog_editable_roles') ) { // bbPress plugin is active
131
  $ure_roles = bbp_filter_blog_editable_roles( $wp_roles->roles ); // exclude bbPress roles
132
  $bbp_full_caps = bbp_get_caps_for_role( bbp_get_keymaster_role() );
133
  // add bbPress keymaster caps to Administrator role
730
 
731
 
732
  function ure_updateUser($user) {
733
+ global $wp_roles, $ure_capabilitiesToSave;
734
 
735
+ // revoke all roles and capabilities from this user
736
+ $user->roles = false;
737
+ $user->remove_all_caps();
738
+
739
+ // add roles to user
740
+ foreach( $_POST as $key=>$value ) {
741
+ $result = preg_match( '/^wp_role_(.+)/', $key, $match);
742
+ if ($result === 1 ) {
743
+ $role = $match[ 1 ];
744
+ if ( isset( $wp_roles->roles[ $role ] ) ) {
745
+ $user->add_role($role);
746
+ }
747
+ }
748
+ }
749
+
750
+ // add individual capabilities to user
751
+ if ( count( $ure_capabilitiesToSave ) > 0 ) {
752
+ foreach ( $ure_capabilitiesToSave as $key=>$value ) {
753
+ foreach( $user->roles as $role_id=>$role) {
754
+ if ( empty( $role['capabilities'][$key] ) ) {
755
+ $user->add_cap($key);
756
+ }
757
+ }
758
  }
759
  }
760
  $user->update_user_level_from_caps();
1056
  }
1057
  // end of get_deprecated_caps()
1058
 
1059
+ /**
1060
+ * output HTML-code for capabilities list
1061
+ * @global boolean $ure_currentRole
1062
+ * @global type $ure_show_deprecated_caps
1063
+ * @global boolean $ure_roles
1064
+ * @global boolean $ure_fullCapabilities
1065
+ * @global type $ure_caps_readable
1066
+ * @param boolean $core - if true, then show WordPress core capabilities, else custom (plugins and themes created)
1067
+ * @param boolean $for_role - if true, it is role capabilities list, else - user specific capabilities list
1068
+ */
1069
+ function ure_show_capabilities( $core=true, $for_role=true ) {
1070
+ global $ure_currentRole, $ure_show_deprecated_caps, $ure_roles, $ure_fullCapabilities, $ure_caps_readable, $ure_userToEdit;
1071
+
1072
+ $onclick_for_admin = '';
1073
+ if (! ( is_multisite() && is_super_admin() ) ) { // do not limit SuperAdmin for multi-site
1074
+ if ('administrator' == $ure_currentRole) {
1075
+ $onclick_for_admin = 'onclick="turn_it_back(this)"';
1076
+ }
1077
+ }
1078
+
1079
+ if ($core) {
1080
+ $quant = count( ure_getBuiltInWPCaps() );
1081
+ $deprecatedCaps = ure_get_deprecated_caps();
1082
+ } else {
1083
+ $quant = count( $ure_fullCapabilities ) - count( ure_getBuiltInWPCaps() );
1084
+ $deprecatedCaps = array();
1085
+ }
1086
+ $quantInColumn = (int) $quant / 3;
1087
+ $printed_quant = 0;
1088
+ foreach( $ure_fullCapabilities as $capability) {
1089
+ if ($core) {
1090
+ if ( !$capability['wp_core'] ) { // show WP built-in capabilities 1st
1091
+ continue;
1092
+ }
1093
+ } else {
1094
+ if ( $capability['wp_core'] ) { // show plugins and themes added capabilities
1095
+ continue;
1096
+ }
1097
+ }
1098
+ if (!$ure_show_deprecated_caps && isset($deprecatedCaps[$capability['inner']])) {
1099
+ $hidden_class = 'class="hidden"';
1100
+ } else {
1101
+ $hidden_class = '';
1102
+ }
1103
+ if (isset($deprecatedCaps[$capability['inner']])) {
1104
+ $labelStyle = 'style="color:#BBBBBB;"';
1105
+ } else {
1106
+ $labelStyle = '';
1107
+ }
1108
+ $checked = ''; $disabled = '';
1109
+ if ($for_role) {
1110
+ if (isset($ure_roles[$ure_currentRole]['capabilities'][$capability['inner']]) &&
1111
+ !empty($ure_roles[$ure_currentRole]['capabilities'][$capability['inner']])) {
1112
+ $checked = 'checked="checked"';
1113
+ }
1114
+ } else {
1115
+ if (user_can($ure_userToEdit->ID, $capability['inner'])) {
1116
+ $checked = 'checked="checked"';
1117
+ if (!isset($ure_userToEdit->caps[$capability['inner']])) {
1118
+ $disabled = 'disabled="disabled"';
1119
+ }
1120
+ }
1121
+ }
1122
+ $cap_id = str_replace(' ', URE_SPACE_REPLACER, $capability['inner']);
1123
+ echo '<input type="checkbox" name="'. $cap_id .'" id="' . $cap_id .'" value="'. $capability['inner'] .'" '. $hidden_class .' '. $checked .' '. $disabled .' '. $onclick_for_admin .' />';
1124
+ if ( empty( $hidden_class ) ) {
1125
+ if ( $ure_caps_readable ) {
1126
+ $capInd = 'human';
1127
+ $capIndAlt = 'inner';
1128
+ } else {
1129
+ $capInd = 'inner';
1130
+ $capIndAlt = 'human';
1131
+ }
1132
+ echo '<label for="'. $cap_id .'" title="'. $capability[$capIndAlt] .'" '. $labelStyle .' > '. $capability[$capInd] .'</label> '. ure_capability_help_link($capability['inner']) .'<br/>';
1133
+ $printed_quant++;
1134
+ if ($printed_quant>=$quantInColumn) {
1135
+ $printed_quant = 0;
1136
+ echo '</td>
1137
+ <td style="vertical-align:top;">';
1138
+ }
1139
+ } // if ('hidden'
1140
+ }
1141
+
1142
+ }
1143
+ // end of ure_show_capabilities()
1144
+
1145
+
1146
+ /**
1147
+ * Returns list of user roles, except 1st one, and bbPress assined as they are shown by WordPress and bbPress theirselves.
1148
+ *
1149
+ * @param type $user WP_User from wp-includes/capabilities.php
1150
+ * @return string
1151
+ */
1152
+ function ure_other_user_roles($user) {
1153
+
1154
+ global $wp_roles;
1155
+
1156
+ if ( !is_array($user->roles) || count($user->roles)<=1 ) {
1157
+ return '';
1158
+ }
1159
+
1160
+ // get bbPress assigned user role
1161
+ if ( function_exists('bbp_filter_blog_editable_roles') ) {
1162
+ $bb_press_role = bbp_get_user_role( $user->ID );
1163
+ } else {
1164
+ $bb_press_role = '';
1165
+ }
1166
+
1167
+ $roles = array();
1168
+ foreach ($user->roles as $key=>$value) {
1169
+ if ( !empty( $bb_press_role ) && $bb_press_role===$value ) {
1170
+ // exclude bbPress assigned role
1171
+ continue;
1172
+ }
1173
+
1174
+ $roles[] = $wp_roles->roles[ $value ]['name'];
1175
+ }
1176
+ array_shift($roles); // exclude primary role which is show by WordPress itself
1177
+
1178
+ if ( count( $roles ) > 0 ) {
1179
+ $output = implode(', ', $roles );
1180
+ } else {
1181
+ $output = '';
1182
+ }
1183
+
1184
+ return $output;
1185
+
1186
+ }
1187
+ // end of ure_other_user_roles()
1188
+
1189
  ?>
includes/ure-options.php CHANGED
@@ -19,7 +19,7 @@ $option_name = $wpdb->prefix.'user_roles';
19
  if (isset($_REQUEST['object'])) {
20
  $ure_object = $_REQUEST['object'];
21
  } else {
22
- $ure_object = '';
23
  }
24
 
25
  if (isset($_REQUEST['action'])) {
@@ -72,7 +72,7 @@ if (isset($_POST['ure_apply_to_all'])) {
72
 
73
  if (!isset($ure_roles) || !$ure_roles) {
74
  // get roles data from database
75
- $ure_roles = ure_getUserRoles();
76
  if (!$ure_roles) {
77
  return;
78
  }
@@ -124,37 +124,39 @@ if ($ure_object=='user') {
124
  }
125
  }
126
 
127
- if (isset($_POST['action']) && $_POST['action'] == 'update' && isset($_POST['user_role'])) {
128
- $ure_currentRole = $_POST['user_role'];
129
- if (!isset($ure_roles[$ure_currentRole])) {
130
- $mess = __('Error: ', 'ure') . __('Role', 'ure') . ' <em>' . $ure_currentRole . '</em> ' . __('does not exist', 'ure');
131
- } else {
132
- $ure_currentRoleName = $ure_roles[$ure_currentRole]['name'];
133
- $ure_capabilitiesToSave = array();
134
- foreach ($ure_fullCapabilities as $availableCapability) {
135
- $cap_id = str_replace(' ', URE_SPACE_REPLACER, $availableCapability['inner']);
136
- if (isset($_POST[$cap_id])) {
137
- $ure_capabilitiesToSave[$availableCapability['inner']] = true;
138
- }
 
 
139
  }
140
- if ($ure_object == 'role') { // save role changes to database
141
- if (count($ure_capabilitiesToSave) > 0) {
142
- if (ure_updateRoles()) {
143
- if ($mess) {
144
- $mess .= '<br/>';
145
- }
146
- $mess = __('Role', 'ure') . ' <em>' . __($ure_roles[$ure_currentRole]['name'], 'ure') . '</em> ' . __('is updated successfully', 'ure');
147
- }
148
- }
149
- } else {
150
- if (ure_updateUser($ure_userToEdit)) {
151
  if ($mess) {
152
  $mess .= '<br/>';
153
  }
154
- $mess = __('User', 'ure') . ' &lt;<em>' . $ure_userToEdit->display_name . '</em>&gt; ' . __('capabilities are updated successfully', 'ure');
155
  }
156
  }
157
- }
 
 
 
 
 
 
 
158
  }
159
 
160
  // options page display part
19
  if (isset($_REQUEST['object'])) {
20
  $ure_object = $_REQUEST['object'];
21
  } else {
22
+ $ure_object = 'role';
23
  }
24
 
25
  if (isset($_REQUEST['action'])) {
72
 
73
  if (!isset($ure_roles) || !$ure_roles) {
74
  // get roles data from database
75
+ $ure_roles = ure_getUserRoles( $ure_object );
76
  if (!$ure_roles) {
77
  return;
78
  }
124
  }
125
  }
126
 
127
+ if ( isset( $_POST['action'] ) && $_POST['action'] == 'update' && isset( $_POST['submit'] ) ) {
128
+ if ( isset( $_POST['user_role'] ) ) {
129
+ $ure_currentRole = $_POST['user_role'];
130
+ if (!isset($ure_roles[$ure_currentRole])) {
131
+ $mess = __('Error: ', 'ure') . __('Role', 'ure') . ' <em>' . $ure_currentRole . '</em> ' . __('does not exist', 'ure');
132
+ } else {
133
+ $ure_currentRoleName = $ure_roles[$ure_currentRole]['name'];
134
+ }
135
+ }
136
+ $ure_capabilitiesToSave = array();
137
+ foreach ($ure_fullCapabilities as $availableCapability) {
138
+ $cap_id = str_replace(' ', URE_SPACE_REPLACER, $availableCapability['inner']);
139
+ if (isset($_POST[$cap_id])) {
140
+ $ure_capabilitiesToSave[$availableCapability['inner']] = true;
141
  }
142
+ }
143
+ if ($ure_object == 'role') { // save role changes to database
144
+ if (count($ure_capabilitiesToSave) > 0) {
145
+ if (ure_updateRoles()) {
 
 
 
 
 
 
 
146
  if ($mess) {
147
  $mess .= '<br/>';
148
  }
149
+ $mess = __('Role', 'ure') . ' <em>' . __($ure_roles[$ure_currentRole]['name'], 'ure') . '</em> ' . __('is updated successfully', 'ure');
150
  }
151
  }
152
+ } else {
153
+ if (ure_updateUser($ure_userToEdit)) {
154
+ if ($mess) {
155
+ $mess .= '<br/>';
156
+ }
157
+ $mess = __('User', 'ure') . ' &lt;<em>' . $ure_userToEdit->display_name . '</em>&gt; ' . __('capabilities are updated successfully', 'ure');
158
+ }
159
+ }
160
  }
161
 
162
  // options page display part
includes/ure-role-edit.php CHANGED
@@ -158,7 +158,9 @@ if (is_multisite()) {
158
  function ure_onSubmit() {
159
  if (!confirm('<?php echo sprintf(__('Role "%s" update: please confirm to continue', 'ure'), __($ure_roles[$ure_currentRole]['name'], 'ure')); ?>')) {
160
  return false;
161
- }
 
 
162
  }
163
 
164
 
@@ -210,107 +212,20 @@ if (is_multisite() && is_super_admin()) {
210
  <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
211
  <tr>
212
  <td style="vertical-align:top;">
213
- <?php
214
- if ('administrator' == $ure_currentRole ) {
215
- $onclick_for_admin = 'onclick="turn_it_back(this)"';
216
- } else {
217
- $onclick_for_admin = '';
218
- }
219
- $deprecatedCaps = ure_get_deprecated_caps();
220
- $quant = count($built_in_wp_caps);
221
- $quantInColumn = 22;
222
- $printed_quant = 0;
223
- foreach( $ure_fullCapabilities as $capability) {
224
- if ( !$capability['wp_core'] ) { // show WP built-in capabilities 1st
225
- continue;
226
- }
227
- if (!$ure_show_deprecated_caps && isset($deprecatedCaps[$capability['inner']])) {
228
- $input_type = 'hidden';
229
- } else {
230
- $input_type = 'checkbox';
231
- }
232
- if (isset($deprecatedCaps[$capability['inner']])) {
233
- $labelStyle = 'style="color:#BBBBBB;"';
234
- } else {
235
- $labelStyle = '';
236
- }
237
- $checked = '';
238
- if ( isset( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) &&
239
- !empty( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) ) {
240
- $checked = 'checked="checked"';
241
- }
242
- $cap_id = str_replace(' ', URE_SPACE_REPLACER, $capability['inner']);
243
- ?>
244
- <input type="<?php echo $input_type;?>" name="<?php echo $cap_id; ?>" id="<?php echo $cap_id; ?>" value="<?php echo $capability['inner']; ?>" <?php echo $checked.' '.$onclick_for_admin; ?> />
245
- <?php
246
- if ($input_type=='checkbox') {
247
- if ($ure_caps_readable) {
248
- $capInd = 'human';
249
- $capIndAlt = 'inner';
250
- } else {
251
- $capInd = 'inner';
252
- $capIndAlt = 'human';
253
- }
254
- ?>
255
- <label for="<?php echo $cap_id; ?>" title="<?php echo $capability[$capIndAlt]; ?>" <?php echo $labelStyle;?> ><?php echo $capability[$capInd]; ?></label> <?php echo ure_capability_help_link($capability['inner']); ?><br/>
256
- <?php
257
- $printed_quant++;
258
- }
259
- if ($printed_quant>=$quantInColumn) {
260
- $printed_quant = 0;
261
- echo '</td>
262
- <td style="vertical-align:top;">';
263
- }
264
- }
265
- ?>
266
  </td>
267
  </tr>
268
  </table>
269
  <hr />
270
  <?php
271
- $quant = count($ure_fullCapabilities) - $quant;
272
  if ($quant>0) {
273
  _e('Custom capabilities:', 'ure');
274
  ?>
275
  <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
276
  <tr>
277
  <td style="vertical-align:top;">
278
- <?php
279
- $quantInColumn = (int) $quant / 3;
280
- $printed_quant = 0;
281
- foreach ($ure_fullCapabilities as $capability) {
282
- if ($capability['wp_core']) { // show plugins or users added capabilities
283
- continue;
284
- }
285
- $checked = '';
286
- if ( isset( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) &&
287
- !empty( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) ) {
288
- $checked = 'checked="checked"';
289
- }
290
- $cap_id = str_replace(' ', URE_SPACE_REPLACER, $capability['inner']);
291
- ?>
292
- <input type="<?php echo $input_type; ?>" name="<?php echo $cap_id; ?>" id="<?php echo $cap_id; ?>" value="<?php echo $capability['inner']; ?>" <?php echo $checked.' '.$onclick_for_admin; ?>/>
293
- <?php
294
- if ($input_type == 'checkbox') {
295
- if ($ure_caps_readable) {
296
- $capInd = 'human';
297
- $capIndAlt = 'inner';
298
- } else {
299
- $capInd = 'inner';
300
- $capIndAlt = 'human';
301
- }
302
- ?>
303
- <label for="<?php echo $cap_id; ?>" title="<?php echo $capability[$capIndAlt]; ?>" ><?php echo $capability[$capInd]; ?></label> <?php echo ure_capability_help_link($capability['inner']); ?><br/>
304
- <?php
305
- $printed_quant++;
306
- }
307
- if ($printed_quant >= $quantInColumn) {
308
- $printed_quant = 0;
309
- echo '</td>
310
- <td style="vertical-align:top;">';
311
- }
312
- }
313
- ?>
314
  </td>
315
  </tr>
316
  </table>
158
  function ure_onSubmit() {
159
  if (!confirm('<?php echo sprintf(__('Role "%s" update: please confirm to continue', 'ure'), __($ure_roles[$ure_currentRole]['name'], 'ure')); ?>')) {
160
  return false;
161
+ } else {
162
+ return true;
163
+ }
164
  }
165
 
166
 
212
  <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
213
  <tr>
214
  <td style="vertical-align:top;">
215
+ <?php ure_show_capabilities( true, true ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  </td>
217
  </tr>
218
  </table>
219
  <hr />
220
  <?php
221
+ $quant = count( $ure_fullCapabilities ) - count( ure_getBuiltInWPCaps() );
222
  if ($quant>0) {
223
  _e('Custom capabilities:', 'ure');
224
  ?>
225
  <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
226
  <tr>
227
  <td style="vertical-align:top;">
228
+ <?php ure_show_capabilities( false, true ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  </td>
230
  </tr>
231
  </table>
includes/ure-user-edit.php CHANGED
@@ -10,37 +10,6 @@ if (!defined('URE_PLUGIN_URL')) {
10
  die; // Silence is golden, direct call is prohibited
11
  }
12
 
13
- if (!isset($ure_currentRole) || !$ure_currentRole) {
14
- if (isset($_REQUEST['user_role']) && $_REQUEST['user_role']) {
15
- $ure_currentRole = $_REQUEST['user_role'];
16
- } else if (count($ure_userToEdit->roles)>0) {
17
- // just take the 1st element of array, as it could start from index not equal to 0
18
- foreach ($ure_userToEdit->roles as $role) {
19
- $ure_currentRole = $role;
20
- break;
21
- }
22
- } else {
23
- $ure_currentRole = '';
24
- }
25
- }
26
-
27
-
28
- $roleSelectHTML = '<select id="user_role" name="user_role" onchange="ure_Actions(\'role-change\', this.value);">';
29
- foreach ($ure_roles as $key=>$value) {
30
- if ($key!='administrator') {
31
- $selected = ure_optionSelected($key, $ure_currentRole);
32
- $roleSelectHTML .= '<option value="'.$key.'" '.$selected.'>'.__($value['name'], 'ure').'</option>';
33
- }
34
- }
35
- if ($ure_currentRole==-1) {
36
- $selected = 'selected="selected"';
37
- } else {
38
- $selected = '';
39
- }
40
- $roleSelectHTML .= '<option value="-1" '.$selected.' >&mdash; No role for this site &mdash;</option>';
41
- $roleSelectHTML .= '</select>';
42
-
43
-
44
  ?>
45
 
46
  <div class="has-sidebar-content">
@@ -71,15 +40,18 @@ $roleSelectHTML .= '</select>';
71
 
72
  </script>
73
  <?php
74
- $userInfo = ' <span style="font-weight: bold;">'.$ure_userToEdit->user_login;
75
  if ($ure_userToEdit->display_name!==$ure_userToEdit->user_login) {
76
  $userInfo .= ' ('.$ure_userToEdit->display_name.')';
77
  }
78
- $userInfo .= '</span>';
79
  ure_displayBoxStart(__('Change capabilities for user', 'ure').$userInfo);
80
 
81
  ?>
82
- <div style="float: left;"><?php echo __('Role:', 'ure').' '.$roleSelectHTML; ?></div>
 
 
 
83
  <?php
84
  if ($ure_caps_readable) {
85
  $checked = 'checked="checked"';
@@ -87,8 +59,9 @@ $roleSelectHTML .= '</select>';
87
  $checked = '';
88
  }
89
  ?>
90
- <div style="display:inline;float: right;"><input type="checkbox" name="ure_caps_readable" id="ure_caps_readable" value="1" <?php echo $checked; ?> onclick="ure_Actions('capsreadable');"/>
91
- <label for="ure_caps_readable"><?php _e('Show capabilities in human readable form', 'ure'); ?></label><br/>
 
92
  <?php
93
  if ($ure_show_deprecated_caps) {
94
  $checked = 'checked="checked"';
@@ -96,127 +69,49 @@ $roleSelectHTML .= '</select>';
96
  $checked = '';
97
  }
98
  ?>
99
- <input type="checkbox" name="ure_show_deprecated_caps" id="ure_show_deprecated_caps" value="1" <?php echo $checked; ?> onclick="ure_Actions('showdeprecatedcaps');"/>
100
- <label for="ure_show_deprecated_caps"><?php _e('Show deprecated capabilities', 'ure'); ?></label>
101
- </div>
102
-
103
- <br/><br/><hr/>
104
- <h3><?php _e('Add capabilities to this user:', 'ure'); ?></h3>
105
- <?php _e('Core capabilities:', 'ure'); ?>
106
- <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
107
- <tr>
108
- <td style="vertical-align:top;">
109
  <?php
110
- $deprecatedCaps = ure_get_deprecated_caps();
111
- $quant = count($built_in_wp_caps);
112
- $quantInColumn = 22;
113
- $printed_quant = 0;
114
- foreach ( $ure_fullCapabilities as $capability ) {
115
- if ( !$capability['wp_core'] ) { // show WP built-in capabilities 1st
116
- continue;
117
- }
118
- if (!$ure_show_deprecated_caps && isset($deprecatedCaps[$capability['inner']])) {
119
- $input_type = 'hidden';
120
- } else {
121
- $input_type = 'checkbox';
122
- }
123
- if (isset($deprecatedCaps[$capability['inner']])) {
124
- $labelStyle = 'style="color:#BBBBBB;"';
125
- } else {
126
- $labelStyle = '';
127
- }
128
- $checked = '';
129
- $disabled = '';
130
- if ( isset( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) &&
131
- !empty( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) ) {
132
  $checked = 'checked="checked"';
133
- $disabled = 'disabled="disabled"';
134
- } else if (isset($ure_userToEdit->caps[$capability['inner']])) {
135
- $checked = 'checked="checked"';
136
- }
137
- $cap_id = str_replace(' ', URE_SPACE_REPLACER, $capability['inner']);
138
- ?>
139
- <input type="<?php echo $input_type; ?>" name="<?php echo $cap_id; ?>" id="<?php echo $cap_id; ?>" value="<?php echo $capability['inner']; ?>" <?php echo $checked; ?> <?php echo $disabled; ?>/>
140
- <?php
141
- if ($input_type == 'checkbox') {
142
- if ($ure_caps_readable) {
143
- $capInd = 'human';
144
- $capIndAlt = 'inner';
145
- } else {
146
- $capInd = 'inner';
147
- $capIndAlt = 'human';
148
- }
149
- ?>
150
- <label for="<?php echo $cap_id; ?>" title="<?php echo $capability[$capIndAlt]; ?>" <?php echo $labelStyle; ?> ><?php echo $capability[$capInd]; ?></label> <?php echo ure_capability_help_link($capability['inner']); ?><br/>
151
- <?php
152
- $printed_quant++;
153
- }
154
- if ( $printed_quant >= $quantInColumn ) {
155
- $printed_quant = 0;
156
- echo '</td>
157
- <td style="vertical-align:top;">';
158
  }
 
159
  }
160
- ?>
 
 
 
 
 
 
 
161
  </td>
162
  </tr>
163
  </table>
164
- <hr/>
165
  <?php
166
- $quant = count($ure_fullCapabilities) - $quant;
167
- if ($quant>0) {
168
- _e('Custom capabilities:', 'ure');
169
  ?>
 
170
  <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
171
  <tr>
172
  <td style="vertical-align:top;">
173
- <?php
174
-
175
- $quantInColumn = (int) $quant / 3;
176
- $printed_quant = 0;
177
- foreach ($ure_fullCapabilities as $capability) {
178
- if ( $capability['wp_core'] ) { // show plugins or user added capabilities
179
- continue;
180
- }
181
- $checked = ''; $disabled = '';
182
- if ( isset( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) &&
183
- !empty( $ure_roles[ $ure_currentRole ][ 'capabilities' ][ $capability[ 'inner' ] ] ) ) {
184
-
185
-
186
-
187
- $checked = 'checked="checked"';
188
- $disabled = 'disabled="disabled"';
189
- } else if (isset($ure_userToEdit->caps[$capability['inner']])) {
190
- $checked = 'checked="checked"';
191
- }
192
- $cap_id = str_replace(' ', URE_SPACE_REPLACER, $capability['inner']);
193
- ?>
194
- <input type="checkbox" name="<?php echo $cap_id; ?>" id="<?php echo $cap_id; ?>" value="<?php echo $capability['inner']; ?>" <?php echo $checked; ?> <?php echo $disabled; ?>/>
195
- <?php
196
- if ($input_type=='checkbox') {
197
- if ($ure_caps_readable) {
198
- $capInd = 'human';
199
- $capIndAlt = 'inner';
200
- } else {
201
- $capInd = 'inner';
202
- $capIndAlt = 'human';
203
- }
204
- ?>
205
- <label for="<?php echo $cap_id; ?>" title="<?php echo $capability[$capIndAlt]; ?>" ><?php echo $capability[$capInd]; ?></label> <?php echo ure_capability_help_link($capability['inner']); ?><br/>
206
- <?php
207
- $printed_quant++;
208
- }
209
- if ( $printed_quant >= $quantInColumn ) {
210
- $printed_quant = 0;
211
- echo '</td>
212
- <td style="vertical-align:top;">';
213
- }
214
- }
215
- ?>
216
  </td>
217
  </tr>
218
  </table>
219
- <hr/>
 
 
 
220
  <?php
221
  } // if ($quant>0)
222
  ?>
@@ -228,7 +123,9 @@ $roleSelectHTML .= '</select>';
228
  <input type="button" name="cancel" value="<?php _e('Cancel', 'ure') ?>" title="<?php _e('Cancel not saved changes','ure');?>" onclick="ure_Actions('cancel');"/>
229
  </div>
230
  </div>
231
-
 
 
232
  <?php
233
  ure_displayBoxEnd();
234
  ?>
10
  die; // Silence is golden, direct call is prohibited
11
  }
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  ?>
14
 
15
  <div class="has-sidebar-content">
40
 
41
  </script>
42
  <?php
43
+ $userInfo = ' <span style="font-weight: bold;"><a href="' . wp_nonce_url("user-edit.php?user_id={$ure_userToEdit->ID}", "ure_user_{$ure_userToEdit->ID}") .'" >' . $ure_userToEdit->user_login;
44
  if ($ure_userToEdit->display_name!==$ure_userToEdit->user_login) {
45
  $userInfo .= ' ('.$ure_userToEdit->display_name.')';
46
  }
47
+ $userInfo .= '</a></span>';
48
  ure_displayBoxStart(__('Change capabilities for user', 'ure').$userInfo);
49
 
50
  ?>
51
+ <table cellpadding="0" cellspacing="0">
52
+ <tr>
53
+ <td>&nbsp;</td>
54
+ <td style="padding-left: 10px; padding-bottom: 5px;">
55
  <?php
56
  if ($ure_caps_readable) {
57
  $checked = 'checked="checked"';
59
  $checked = '';
60
  }
61
  ?>
62
+
63
+ <input type="checkbox" name="ure_caps_readable" id="ure_caps_readable" value="1" <?php echo $checked; ?> onclick="ure_Actions('capsreadable');" />
64
+ <label for="ure_caps_readable"><?php _e('Show capabilities in human readable form', 'ure'); ?></label>&nbsp;&nbsp;&nbsp;
65
  <?php
66
  if ($ure_show_deprecated_caps) {
67
  $checked = 'checked="checked"';
69
  $checked = '';
70
  }
71
  ?>
72
+ <input type="checkbox" name="ure_show_deprecated_caps" id="ure_show_deprecated_caps" value="1" <?php echo $checked; ?> onclick="ure_Actions('showdeprecatedcaps');"/>
73
+ <label for="ure_show_deprecated_caps"><?php _e('Show deprecated capabilities', 'ure'); ?></label>
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <td style="vertical-align: text-top; padding-right: 10px; padding-top: 5px; font-size: 1.1em; border-top: 1px solid #ccc; border-right: 1px solid #ccc;">
78
+ <div style="margin-bottom: 17px; font-weight: bold;">WordPress <?php echo __('Roles:', 'ure'); ?></div>
 
 
 
79
  <?php
80
+ foreach ($ure_roles as $role_id => $role) {
81
+ if ( user_can( $ure_userToEdit->ID, $role_id ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  $checked = 'checked="checked"';
83
+ } else {
84
+ $checked = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
+ echo '<label for="wp_role_' . $role_id .'"><input type="checkbox" id="wp_role_' . $role_id . '" name="wp_role_' . $role_id . '" value="' . $role_id . '"' . $checked .' />&nbsp;' . __($role['name'], 'ure') . '</label><br />';
87
  }
88
+ ?>
89
+ </td>
90
+ <td style="padding-left: 5px; padding-top: 5px; border-top: 1px solid #ccc;">
91
+ <span style="font-weight: bold;"><?php _e('Core capabilities:', 'ure'); ?></span>
92
+ <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
93
+ <tr>
94
+ <td style="vertical-align:top;">
95
+ <?php ure_show_capabilities( true, false ); ?>
96
  </td>
97
  </tr>
98
  </table>
 
99
  <?php
100
+ $quant = count( $ure_fullCapabilities ) - count( ure_getBuiltInWPCaps() );
101
+ if ($quant>0) {
 
102
  ?>
103
+ <span style="font-weight: bold;"><?php _e('Custom capabilities:', 'ure'); ?></span>
104
  <table class="form-table" style="clear:none;" cellpadding="0" cellspacing="0">
105
  <tr>
106
  <td style="vertical-align:top;">
107
+ <?php ure_show_capabilities( false, false ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  </td>
109
  </tr>
110
  </table>
111
+ </td>
112
+ </tr>
113
+ <tr>
114
+ <td colspan="2" style="border-top: 1px solid #ccc;">
115
  <?php
116
  } // if ($quant>0)
117
  ?>
123
  <input type="button" name="cancel" value="<?php _e('Cancel', 'ure') ?>" title="<?php _e('Cancel not saved changes','ure');?>" onclick="ure_Actions('cancel');"/>
124
  </div>
125
  </div>
126
+ </td>
127
+ </tr>
128
+ </table>
129
  <?php
130
  ure_displayBoxEnd();
131
  ?>
lang/ure-sk_SK.mo DELETED
Binary file
lang/ure-sk_SK.po DELETED
@@ -1,753 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: User Role Editor 2.0\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-09-01 08:44+0700\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Vladimir Garagulya <vladimir@shinephp.com>\n"
8
- "Language-Team: ShinePHP.com <vladimir@shinephp.com>\n"
9
- "Language: en_RU\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "X-Poedit-KeywordsList: __;_e\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Generator: Poedit 1.5.4\n"
17
- "X-Poedit-SearchPath-0: ..\n"
18
-
19
- #: ../user-role-editor.php:35
20
- msgid "User Role Editor requires WordPress 3.0 or newer."
21
- msgstr "Používateľ úlohu Editor vyžaduje WordPress 3.0 alebo novšie."
22
-
23
- #: ../user-role-editor.php:35 ../user-role-editor.php:40
24
- msgid "Please update!"
25
- msgstr "Prosím aktualizujte!"
26
-
27
- #: ../user-role-editor.php:40
28
- msgid "User Role Editor requires PHP 5.0 or newer."
29
- msgstr "Používateľ úlohu Editor vyžaduje PHP 5.0 alebo novší."
30
-
31
- #: ../user-role-editor.php:76
32
- msgid "Only"
33
- msgstr "Len"
34
-
35
- #: ../user-role-editor.php:76
36
- msgid "is allowed to use"
37
- msgstr "je dovolené používať"
38
-
39
- #: ../user-role-editor.php:82 ../user-role-editor.php:251
40
- msgid "User Role Editor"
41
- msgstr "Používateľ úlohu Editor"
42
-
43
- #: ../user-role-editor.php:223
44
- msgid "Settings"
45
- msgstr "Nastavenia"
46
-
47
- #: ../user-role-editor.php:233 ../includes/ure-options.php:235
48
- msgid "Changelog"
49
- msgstr "Changelog"
50
-
51
- #: ../user-role-editor.php:280
52
- msgid "Capabilities"
53
- msgstr "Schopnosti"
54
-
55
- #: ../includes/ure-lib.php:34
56
- msgid "Error is occur. Please check the log file."
57
- msgstr "Vyskytnúť chyba. Skontrolujte súbor denníka."
58
-
59
- #: ../includes/ure-lib.php:144
60
- msgid "Database operation error. Check log file."
61
- msgstr "Databáza Chyba operácie. Skontrolujte súbor denníka."
62
-
63
- #: ../includes/ure-lib.php:177
64
- msgid ""
65
- "No backup data. It is created automatically before the first role data "
66
- "update."
67
- msgstr ""
68
- "Žiadne zálohovanie dát. Je vytvorený automaticky pred prvej aktualizácii "
69
- "údajov úlohu."
70
-
71
- #: ../includes/ure-lib.php:215
72
- msgid "Backup record is created for the current role capabilities"
73
- msgstr "Zálohovanie záznamov je vytvorený pre aktuálnu úlohu schopnosti"
74
-
75
- #: ../includes/ure-lib.php:329
76
- msgid "Error: Role name must contain latin characters and digits only!"
77
- msgstr "Chyba: Názov roly musí obsahovať latinku a len číslice!"
78
-
79
- #: ../includes/ure-lib.php:336
80
- #, php-format
81
- msgid "Role %s exists already"
82
- msgstr "Úlohu %s už existuje"
83
-
84
- #: ../includes/ure-lib.php:349
85
- msgid "Error is encountered during new role create operation"
86
- msgstr "K chybe počas nová úloha vytvoriť prevádzky"
87
-
88
- #: ../includes/ure-lib.php:351
89
- #, php-format
90
- msgid "Role %s is created successfully"
91
- msgstr "Úlohu %s sa úspešne vytvorila"
92
-
93
- #: ../includes/ure-lib.php:435
94
- msgid "Error encountered during role delete operation"
95
- msgstr "Počas úlohy sa vyskytla chyba operácie odstránenia"
96
-
97
- #: ../includes/ure-lib.php:437
98
- #, php-format
99
- msgid "Role %s is deleted successfully"
100
- msgstr "Úlohu %s sa úspešne vypúšťa"
101
-
102
- #: ../includes/ure-lib.php:455
103
- msgid "Error encountered during default role change operation"
104
- msgstr "Počas predvolenú úlohu Zmena činnosť sa vyskytla chyba."
105
-
106
- #: ../includes/ure-lib.php:461
107
- #, php-format
108
- msgid "Default role for new users is set to %s successfully"
109
- msgstr "Predvolená funkcia pre nových používateľov je nastavená na %s úspešne"
110
-
111
- #: ../includes/ure-lib.php:489
112
- msgid "Editor"
113
- msgstr "Editor"
114
-
115
- #: ../includes/ure-lib.php:490
116
- msgid "Author"
117
- msgstr "Autor"
118
-
119
- #: ../includes/ure-lib.php:491
120
- msgid "Contributor"
121
- msgstr "Prispievateľ"
122
-
123
- #: ../includes/ure-lib.php:492
124
- msgid "Subscriber"
125
- msgstr "Účastníka"
126
-
127
- #: ../includes/ure-lib.php:494
128
- msgid "Switch themes"
129
- msgstr "Prepínať medzi motívmi"
130
-
131
- #: ../includes/ure-lib.php:495
132
- msgid "Edit themes"
133
- msgstr "Upraviť témy"
134
-
135
- #: ../includes/ure-lib.php:496
136
- msgid "Activate plugins"
137
- msgstr "Aktivovať pluginy"
138
-
139
- #: ../includes/ure-lib.php:497
140
- msgid "Edit plugins"
141
- msgstr "Upraviť pluginy"
142
-
143
- #: ../includes/ure-lib.php:498
144
- msgid "Edit users"
145
- msgstr "Upraviť používateľom"
146
-
147
- #: ../includes/ure-lib.php:499
148
- msgid "Edit files"
149
- msgstr "Upraviť súbory"
150
-
151
- #: ../includes/ure-lib.php:500
152
- msgid "Manage options"
153
- msgstr "Spravovať možnosti"
154
-
155
- #: ../includes/ure-lib.php:501
156
- msgid "Moderate comments"
157
- msgstr "Umiernené komentáre"
158
-
159
- #: ../includes/ure-lib.php:502
160
- msgid "Manage categories"
161
- msgstr "Spravujte kategórie"
162
-
163
- #: ../includes/ure-lib.php:503
164
- msgid "Manage links"
165
- msgstr "Spravovať prepojenia"
166
-
167
- #: ../includes/ure-lib.php:504
168
- msgid "Upload files"
169
- msgstr "Upload súborov"
170
-
171
- #: ../includes/ure-lib.php:505
172
- msgid "Import"
173
- msgstr "Import"
174
-
175
- #: ../includes/ure-lib.php:506
176
- msgid "Unfiltered html"
177
- msgstr "Nefiltrované html"
178
-
179
- #: ../includes/ure-lib.php:507
180
- msgid "Edit posts"
181
- msgstr "Upravovať príspevky"
182
-
183
- #: ../includes/ure-lib.php:508
184
- msgid "Edit others posts"
185
- msgstr "Upraviť ďalšie príspevky"
186
-
187
- #: ../includes/ure-lib.php:509
188
- msgid "Edit published posts"
189
- msgstr "Upraviť uverejnené príspevky"
190
-
191
- #: ../includes/ure-lib.php:510
192
- msgid "Publish posts"
193
- msgstr "Publikovať príspevky"
194
-
195
- #: ../includes/ure-lib.php:511
196
- msgid "Edit pages"
197
- msgstr "Upravovať stránky"
198
-
199
- #: ../includes/ure-lib.php:512
200
- msgid "Read"
201
- msgstr "Čítanie"
202
-
203
- #: ../includes/ure-lib.php:513
204
- msgid "Level 10"
205
- msgstr "Úrovne 10"
206
-
207
- #: ../includes/ure-lib.php:514
208
- msgid "Level 9"
209
- msgstr "Úroveň 9"
210
-
211
- #: ../includes/ure-lib.php:515
212
- msgid "Level 8"
213
- msgstr "Úroveň 8"
214
-
215
- #: ../includes/ure-lib.php:516
216
- msgid "Level 7"
217
- msgstr "Úroveň 7"
218
-
219
- #: ../includes/ure-lib.php:517
220
- msgid "Level 6"
221
- msgstr "Úroveň 6"
222
-
223
- #: ../includes/ure-lib.php:518
224
- msgid "Level 5"
225
- msgstr "Úroveň 5"
226
-
227
- #: ../includes/ure-lib.php:519
228
- msgid "Level 4"
229
- msgstr "Úroveň 4"
230
-
231
- #: ../includes/ure-lib.php:520
232
- msgid "Level 3"
233
- msgstr "Úroveň 3"
234
-
235
- #: ../includes/ure-lib.php:521
236
- msgid "Level 2"
237
- msgstr "Úroveň 2"
238
-
239
- #: ../includes/ure-lib.php:522
240
- msgid "Level 1"
241
- msgstr "Úroveň 1"
242
-
243
- #: ../includes/ure-lib.php:523
244
- msgid "Level 0"
245
- msgstr "Úroveň 0"
246
-
247
- #: ../includes/ure-lib.php:524
248
- msgid "Edit others pages"
249
- msgstr "Upraviť iné stránky"
250
-
251
- #: ../includes/ure-lib.php:525
252
- msgid "Edit published pages"
253
- msgstr "Upraviť Publikované stránky"
254
-
255
- #: ../includes/ure-lib.php:526
256
- msgid "Publish pages"
257
- msgstr "Publikovanie stránok"
258
-
259
- #: ../includes/ure-lib.php:527
260
- msgid "Delete pages"
261
- msgstr "Odstrániť strany"
262
-
263
- #: ../includes/ure-lib.php:528
264
- msgid "Delete others pages"
265
- msgstr "Ostatné odstrániť stránky"
266
-
267
- #: ../includes/ure-lib.php:529
268
- msgid "Delete published pages"
269
- msgstr "Odstrániť Publikované stránky"
270
-
271
- #: ../includes/ure-lib.php:530
272
- msgid "Delete posts"
273
- msgstr "Mazať príspevky"
274
-
275
- #: ../includes/ure-lib.php:531
276
- msgid "Delete others posts"
277
- msgstr "Odstrániť ďalšie príspevky"
278
-
279
- #: ../includes/ure-lib.php:532
280
- msgid "Delete published posts"
281
- msgstr "Uverejnené príspevky mazať"
282
-
283
- #: ../includes/ure-lib.php:533
284
- msgid "Delete private posts"
285
- msgstr "Súkromné príspevky mazať"
286
-
287
- #: ../includes/ure-lib.php:534
288
- msgid "Edit private posts"
289
- msgstr "Upravovať súkromnú príspevky"
290
-
291
- #: ../includes/ure-lib.php:535
292
- msgid "Read private posts"
293
- msgstr "Čítať súkromné príspevky"
294
-
295
- #: ../includes/ure-lib.php:536
296
- msgid "Delete private pages"
297
- msgstr "Odstrániť súkromné stránky"
298
-
299
- #: ../includes/ure-lib.php:537
300
- msgid "Edit private pages"
301
- msgstr "Upravovať súkromnú stránky"
302
-
303
- #: ../includes/ure-lib.php:538
304
- msgid "Read private pages"
305
- msgstr "Čítať súkromné stránky"
306
-
307
- #: ../includes/ure-lib.php:539
308
- msgid "Delete users"
309
- msgstr "Odstránenie používateľov"
310
-
311
- #: ../includes/ure-lib.php:540
312
- msgid "Create users"
313
- msgstr "Vytvorte používateľov"
314
-
315
- #: ../includes/ure-lib.php:541
316
- msgid "Unfiltered upload"
317
- msgstr "Nefiltrované upload"
318
-
319
- #: ../includes/ure-lib.php:542
320
- msgid "Edit dashboard"
321
- msgstr "Úprava tabule (dashboard)"
322
-
323
- #: ../includes/ure-lib.php:543
324
- msgid "Update plugins"
325
- msgstr "Aktualizácia pluginy"
326
-
327
- #: ../includes/ure-lib.php:544
328
- msgid "Delete plugins"
329
- msgstr "Odstránenie pluginy"
330
-
331
- #: ../includes/ure-lib.php:545
332
- msgid "Install plugins"
333
- msgstr "Inštalovať pluginy"
334
-
335
- #: ../includes/ure-lib.php:546
336
- msgid "Update themes"
337
- msgstr "Aktualizovať témy"
338
-
339
- #: ../includes/ure-lib.php:547
340
- msgid "Install themes"
341
- msgstr "Nainštalovať témy"
342
-
343
- #: ../includes/ure-lib.php:548
344
- msgid "Update core"
345
- msgstr "Aktualizácia jadra"
346
-
347
- #: ../includes/ure-lib.php:549
348
- msgid "List users"
349
- msgstr "Zoznam užívateľov"
350
-
351
- #: ../includes/ure-lib.php:550
352
- msgid "Remove users"
353
- msgstr "Odstránenie používateľov"
354
-
355
- #: ../includes/ure-lib.php:551
356
- msgid "Add users"
357
- msgstr "Pridať používateľov"
358
-
359
- #: ../includes/ure-lib.php:552
360
- msgid "Promote users"
361
- msgstr "Podporovať užívateľov"
362
-
363
- #: ../includes/ure-lib.php:553
364
- msgid "Edit theme options"
365
- msgstr "Téma možnosti editovania"
366
-
367
- #: ../includes/ure-lib.php:554
368
- msgid "Delete themes"
369
- msgstr "Odstrániť témy"
370
-
371
- #: ../includes/ure-lib.php:555
372
- msgid "Export"
373
- msgstr "Export"
374
-
375
- #: ../includes/ure-lib.php:639
376
- msgid "Error: Capability name must contain latin characters and digits only!"
377
- msgstr "Chyba: Schopnosť meno musí obsahovať latinku a len číslice!"
378
-
379
- #: ../includes/ure-lib.php:651
380
- #, php-format
381
- msgid "Capability %s is added successfully"
382
- msgstr "Schopnosť %s sa úspešne pridaný"
383
-
384
- #: ../includes/ure-lib.php:653
385
- #, php-format
386
- msgid "Capability %s exists already"
387
- msgstr "Schopnosť %s už existuje"
388
-
389
- #: ../includes/ure-lib.php:802
390
- #, php-format
391
- msgid "Error! You do not have permission to delete this capability: %s!"
392
- msgstr "Chyba! Nemáte povolenie na odstránenie tejto schopnosti: % s!"
393
-
394
- #: ../includes/ure-lib.php:824
395
- #, php-format
396
- msgid "Capability %s is removed successfully"
397
- msgstr "Schopnosť %s sa úspešne odstránené"
398
-
399
- #: ../includes/ure-lib.php:889
400
- msgid "Help"
401
- msgstr "pomoc"
402
-
403
- #: ../includes/ure-role-edit.php:29
404
- msgid "None"
405
- msgstr "Žiadny"
406
-
407
- #: ../includes/ure-role-edit.php:101
408
- msgid " Name can not be empty!"
409
- msgstr " Názov nemôže byť prázdny!"
410
-
411
- #: ../includes/ure-role-edit.php:105
412
- msgid " Name must contain latin characters and digits only!"
413
- msgstr " Názov musí obsahovať latinku a len číslice!"
414
-
415
- #: ../includes/ure-role-edit.php:110 ../includes/ure-role-edit.php:367
416
- msgid "Delete Role"
417
- msgstr "Odstrániť úlohu"
418
-
419
- #: ../includes/ure-role-edit.php:112
420
- msgid "Change Default Role"
421
- msgstr "Zmena predvoleného úlohu"
422
-
423
- #: ../includes/ure-role-edit.php:114
424
- msgid ""
425
- "Restore Roles from backup copy. Be careful, backup was created when you "
426
- "started URE 1st time. All changes you made after that will be lost"
427
- msgstr ""
428
- "Obnovenie úlohy zo záložnej kópie. Buďte opatrní, keď ste začal 1. URE čas "
429
- "vytvorenia zálohy. Všetky zmeny vykonané po ktoré sa stratia"
430
-
431
- #: ../includes/ure-role-edit.php:116
432
- msgid ""
433
- "Warning! Be careful - removing critical capability could crash some plugin "
434
- "or other custom code"
435
- msgstr ""
436
- "Upozornenie! Pozor - odstránenie kritické schopnosti mohol pád nejaký plugin "
437
- "alebo iné vlastného kódu"
438
-
439
- #: ../includes/ure-role-edit.php:118
440
- msgid "Please confirm to continue"
441
- msgstr "Potvrďte, že chcete pokračovať"
442
-
443
- #: ../includes/ure-role-edit.php:155
444
- #, php-format
445
- msgid "Role \"%s\" update: please confirm to continue"
446
- msgstr "Úlohu \"%s\" aktualizovať: potvrďte, prosím, pokračovať"
447
-
448
- #: ../includes/ure-role-edit.php:163
449
- msgid "Select Role and change its capabilities list"
450
- msgstr "Vyberte úlohu a jej schopnosti zoznam zmien"
451
-
452
- #: ../includes/ure-role-edit.php:165
453
- msgid "Select Role:"
454
- msgstr "Vyberte úlohu:"
455
-
456
- #: ../includes/ure-role-edit.php:175 ../includes/ure-user-edit.php:91
457
- msgid "Show capabilities in human readable form"
458
- msgstr "Zobraziť možnosti formou ľudské čitateľné"
459
-
460
- #: ../includes/ure-role-edit.php:184 ../includes/ure-user-edit.php:100
461
- msgid "Show deprecated capabilities"
462
- msgstr "Zobraziť nahradenú schopnosti"
463
-
464
- #: ../includes/ure-role-edit.php:188
465
- msgid "If checked, then apply action to ALL sites of this Network"
466
- msgstr ""
467
- "Ak kontrolované, potom použite akciu na všetkých lokalitách tejto siete"
468
-
469
- #: ../includes/ure-role-edit.php:198
470
- msgid "Apply to All Sites"
471
- msgstr "Vzťahovať na všetky lokality"
472
-
473
- #: ../includes/ure-role-edit.php:205 ../includes/ure-user-edit.php:105
474
- msgid "Core capabilities:"
475
- msgstr "Základné možnosti:"
476
-
477
- #: ../includes/ure-role-edit.php:268 ../includes/ure-user-edit.php:167
478
- msgid "Custom capabilities:"
479
- msgstr "Vlastné schopnosti:"
480
-
481
- #: ../includes/ure-role-edit.php:319 ../includes/ure-user-edit.php:222
482
- msgid "Update"
483
- msgstr "Aktualizácia"
484
-
485
- #: ../includes/ure-role-edit.php:319 ../includes/ure-user-edit.php:222
486
- msgid "Save Changes"
487
- msgstr "Uložiť zmeny"
488
-
489
- #: ../includes/ure-role-edit.php:320 ../includes/ure-user-edit.php:223
490
- msgid "Cancel"
491
- msgstr "Zrušiť"
492
-
493
- #: ../includes/ure-role-edit.php:320 ../includes/ure-user-edit.php:223
494
- msgid "Cancel not saved changes"
495
- msgstr "Zrušiť uložené zmeny"
496
-
497
- #: ../includes/ure-role-edit.php:323
498
- msgid "Select All"
499
- msgstr "Vybrať všetko"
500
-
501
- #: ../includes/ure-role-edit.php:323
502
- msgid "Select All Capabilities"
503
- msgstr "Vyberte všetky možnosti"
504
-
505
- #: ../includes/ure-role-edit.php:327
506
- msgid "Unselect All"
507
- msgstr "Zrušiť výber"
508
-
509
- #: ../includes/ure-role-edit.php:327
510
- msgid "Unselect All Capabilities"
511
- msgstr "Zrušiť všetky možnosti"
512
-
513
- #: ../includes/ure-role-edit.php:328
514
- msgid "Reverse"
515
- msgstr "Zvrátiť"
516
-
517
- #: ../includes/ure-role-edit.php:328
518
- msgid "Turn checked capabilities off and vise versa"
519
- msgstr "Chcete skontrolovať možnosti vypnúť a zverák versa"
520
-
521
- #: ../includes/ure-role-edit.php:334
522
- msgid "Reset"
523
- msgstr "Reset"
524
-
525
- #: ../includes/ure-role-edit.php:334
526
- msgid "Restore Roles from backup copy"
527
- msgstr "Obnovenie úlohy zo záložnej kópie"
528
-
529
- #: ../includes/ure-role-edit.php:344
530
- msgid "Add New Role"
531
- msgstr "Pridať novú úlohu"
532
-
533
- #: ../includes/ure-role-edit.php:346
534
- msgid "Name: "
535
- msgstr "meno: "
536
-
537
- #: ../includes/ure-role-edit.php:350
538
- msgid "Make copy of: "
539
- msgstr "Vytvoriť kópiu: "
540
-
541
- #: ../includes/ure-role-edit.php:353 ../includes/ure-role-edit.php:382
542
- msgid "Add"
543
- msgstr "Pridať"
544
-
545
- #: ../includes/ure-role-edit.php:353
546
- msgid "Add New User Role"
547
- msgstr "Pridať nové roly používateľov"
548
-
549
- #: ../includes/ure-role-edit.php:357
550
- msgid "Default Role for New User"
551
- msgstr "Štandardné úloha pre nového používateľa"
552
-
553
- #: ../includes/ure-role-edit.php:362
554
- msgid "Change"
555
- msgstr "Zmena"
556
-
557
- #: ../includes/ure-role-edit.php:362
558
- msgid "Set as Default User Role"
559
- msgstr "Nastaviť ako predvolené roly používateľov"
560
-
561
- #: ../includes/ure-role-edit.php:372
562
- msgid "Delete"
563
- msgstr "Odstrániť"
564
-
565
- #: ../includes/ure-role-edit.php:372
566
- msgid "Delete User Role"
567
- msgstr "Odstrániť roly používateľov"
568
-
569
- #: ../includes/ure-role-edit.php:377 ../includes/ure-role-edit.php:382
570
- msgid "Add New Capability"
571
- msgstr "Nepridáva nové"
572
-
573
- #: ../includes/ure-role-edit.php:387
574
- msgid "Remove Capability"
575
- msgstr "Odstránenie schopnosť"
576
-
577
- #: ../includes/ure-role-edit.php:392
578
- msgid "Remove"
579
- msgstr "Odstrániť"
580
-
581
- #: ../includes/ure-role-edit.php:392
582
- msgid "Remove User Capability"
583
- msgstr "Odstrániť používateľa schopnosti"
584
-
585
- #: ../includes/ure-user-edit.php:67
586
- #, php-format
587
- msgid "User \"%s\" update: please confirm to continue"
588
- msgstr "Užívateľ \"%s\" aktualizovať: potvrďte, prosím, pokračovať"
589
-
590
- #: ../includes/ure-user-edit.php:79
591
- msgid "Change capabilities for user"
592
- msgstr "Zmeniť možnosti pre používateľa"
593
-
594
- #: ../includes/ure-user-edit.php:82
595
- msgid "Role:"
596
- msgstr "Úloha:"
597
-
598
- #: ../includes/ure-user-edit.php:104
599
- msgid "Add capabilities to this user:"
600
- msgstr "Pridať možnosti tohto používateľa:"
601
-
602
- #: ../includes/ure-options.php:59
603
- msgid "User Roles are restored from the backup data. "
604
- msgstr "Roly používateľov sú obnovené z zálohovanie dát. "
605
-
606
- #: ../includes/ure-options.php:130
607
- msgid "Error: "
608
- msgstr "Chyba: "
609
-
610
- #: ../includes/ure-options.php:130 ../includes/ure-options.php:146
611
- msgid "Role"
612
- msgstr "Úlohu"
613
-
614
- #: ../includes/ure-options.php:130
615
- msgid "does not exist"
616
- msgstr "neexistuje"
617
-
618
- #: ../includes/ure-options.php:146
619
- msgid "is updated successfully"
620
- msgstr "je úspešne aktualizovaný"
621
-
622
- #: ../includes/ure-options.php:154
623
- msgid "User"
624
- msgstr "Používateľ"
625
-
626
- #: ../includes/ure-options.php:154
627
- msgid "capabilities are updated successfully"
628
- msgstr "schopnosti sú úspešne aktualizovaný"
629
-
630
- #: ../includes/ure-options.php:232
631
- msgid "About this Plugin:"
632
- msgstr "O tento Plugin:"
633
-
634
- #: ../includes/ure-options.php:233
635
- msgid "Author's website"
636
- msgstr "Autora na webovej stránke"
637
-
638
- #: ../includes/ure-options.php:234
639
- msgid "Plugin webpage"
640
- msgstr "Plugin webovej stránky"
641
-
642
- #: ../includes/ure-options.php:236
643
- msgid "FAQ"
644
- msgstr "FAQ"
645
-
646
- #: ../includes/ure-options.php:237
647
- msgid "Greetings"
648
- msgstr "Pozdravy"
649
-
650
- #: ../includes/ure-options.php:259
651
- msgid "Greetings:"
652
- msgstr "Pozdravy:"
653
-
654
- #: ../includes/ure-options.php:260
655
- msgid "It's me, the author"
656
- msgstr "Je to mnou, autor"
657
-
658
- #: ../includes/ure-options.php:261
659
- msgid "For the help with Belorussian translation"
660
- msgstr "Za pomoc s prekladom"
661
-
662
- #: ../includes/ure-options.php:262
663
- msgid "For the help with Brasilian translation"
664
- msgstr "Za pomoc s prekladom Brasilian"
665
-
666
- #: ../includes/ure-options.php:263
667
- msgid "For the help with Brasilian Portuguese translation"
668
- msgstr "Pomocníka pre brazílska portugalčina preklad"
669
-
670
- #: ../includes/ure-options.php:264
671
- msgid "For the help with Chinese translation"
672
- msgstr "Pomocníka pre čínsky preklad"
673
-
674
- #: ../includes/ure-options.php:265
675
- msgid "For the help with Dutch translation"
676
- msgstr "Pomocníka pre preklad do holandštiny"
677
-
678
- #: ../includes/ure-options.php:266
679
- msgid "For the help with Finnish translation"
680
- msgstr "Pomocníka pre fínsky preklad"
681
-
682
- #: ../includes/ure-options.php:267 ../includes/ure-options.php:268
683
- msgid "For the help with French translation"
684
- msgstr "Pomocníka pre francúzsky preklad"
685
-
686
- #: ../includes/ure-options.php:269
687
- msgid "For the help with German translation"
688
- msgstr "Pomocníka pre nemecký preklad"
689
-
690
- #: ../includes/ure-options.php:270 ../includes/ure-options.php:271
691
- msgid "For the help with Hebrew translation"
692
- msgstr "Pomocníka pre hebrejský preklad"
693
-
694
- #: ../includes/ure-options.php:272
695
- msgid "For the help with Hindi translation"
696
- msgstr "Pomocníka pre Hindčina preklad"
697
-
698
- #: ../includes/ure-options.php:273
699
- msgid "For the help with Hungarian translation"
700
- msgstr "Pomocníka pre maďarský preklad"
701
-
702
- #: ../includes/ure-options.php:274 ../includes/ure-options.php:275
703
- msgid "For the help with Italian translation"
704
- msgstr "Pomocníka pre taliansky preklad"
705
-
706
- #: ../includes/ure-options.php:276
707
- msgid "For the help with Japanese translation"
708
- msgstr "Pomocníka pre japonský preklad"
709
-
710
- #: ../includes/ure-options.php:277
711
- msgid "For the help with Lithuanian translation"
712
- msgstr "Pomocníka pre preklad do litovčiny"
713
-
714
- #: ../includes/ure-options.php:278 ../includes/ure-options.php:279
715
- #: ../includes/ure-options.php:280
716
- msgid "For the help with Persian translation"
717
- msgstr "Pomocníka pre perzský preklad"
718
-
719
- #: ../includes/ure-options.php:281 ../includes/ure-options.php:282
720
- msgid "For the help with Polish translation"
721
- msgstr "Pomocníka pre poľský preklad"
722
-
723
- #: ../includes/ure-options.php:283 ../includes/ure-options.php:284
724
- msgid "For the help with Spanish translation"
725
- msgstr "Pomocníka pre španielskeho prekladu"
726
-
727
- #: ../includes/ure-options.php:285
728
- msgid "For the updated Swedish translation"
729
- msgstr "Aktualizované švédsky preklad"
730
-
731
- #: ../includes/ure-options.php:286
732
- msgid "For the help with Swedish translation"
733
- msgstr "Pomocníka pre švédsky preklad"
734
-
735
- #: ../includes/ure-options.php:287
736
- msgid "For the help with Turkish translation"
737
- msgstr "Pomocníka pre tureckého prekladu"
738
-
739
- #: ../includes/ure-options.php:289
740
- msgid "For the code to hide administrator role"
741
- msgstr "Pre kód skryť rolou správcu"
742
-
743
- #: ../includes/ure-options.php:290
744
- msgid "For the code enhancement suggestion"
745
- msgstr "Za návrh vylepšenie kód"
746
-
747
- #: ../includes/ure-options.php:292
748
- msgid ""
749
- "Do you wish to see your name with link to your site here? You are welcome! "
750
- "Your help with translation and new ideas are very appreciated."
751
- msgstr ""
752
- "Želáte si vidieť svoje meno s odkaz na vaše stránky tu? rado sa stalo! Vašu "
753
- "pomoc s prekladom a nové nápady sú veľmi ocenila."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: shinephp
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=vladimir%40shinephp%2ecom&lc=RU&item_name=ShinePHP%2ecom&item_number=User%20Role%20Editor%20WordPress%20plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
4
  Tags: user, role, editor, security, access, permission, capability
5
  Requires at least: 3.2
6
- Tested up to: 3.5
7
  Stable tag: trunk
8
 
9
  User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any standard WordPress user role.
@@ -15,7 +15,8 @@ Just turn on check boxes of capabilities you wish to add to the selected role an
15
  Add new roles and customize its capabilities according to your needs, from scratch of as a copy of other existing role.
16
  Unnecessary self-made role can be deleted if there are no users whom such role is assigned.
17
  Role assigned every new created user by default may be changed too.
18
- Capabilities could be assigned on per user basis. You can add new capabilities and remove unnecessary capabilities which could be left from uninstalled plugins.
 
19
  Multi-site support is provided.
20
 
21
  To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](shinephp.com).
@@ -67,18 +68,13 @@ To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/
67
  * Polish: [TagSite](http://www.tagsite.eu), [Bartosz](www.digitalfactory.pl)
68
  * Russian: [Vladimir Garagulya](http://shinephp.com)
69
  * Serbian: [Diana](http://wpcouponshop.com)
70
- * Slovak: [Branco (WebHostingGeeks.com)](http://webhostinggeeks.com/blog/)
71
  * Spanish: [Victor Ricardo Díaz (INFOMED)](http://www.sld.cu)
72
  * Swedish: [Christer Dahlbacka](www.startlinks.eu), [Andréas Lundgren](http://adevade.com/)
73
  * Traditional Chinese (Jingxin Lai)
74
  * Turkish: [Muhammed YILDIRIM](http://ben.muhammed.im)
75
  * -----------------------------------------------------
76
  * translations below are included to the package, but all of them are outdated and every file needs to be updated. You are welcome!
77
- * Finnish: [Lauri Merisaari](http://www.viidakkorumpu.fi)
78
- * Japanese: Kaz, [Technolog.jp](http://technolog.jp)
79
- * Belorussian: [Marsis G.](http://pc.de) - needs update
80
- * Chinese: [Yackytsu](http://www.jackytsu.com) - needs update
81
- * Hungarian: [István](http://www.blacksnail.hu) - needs update
82
 
83
 
84
  Dear plugin User!
@@ -89,6 +85,12 @@ Share with me new ideas about plugin further development and link to your site w
89
 
90
  == Changelog ==
91
 
 
 
 
 
 
 
92
  = 3.9 =
93
  * 07.01.2013
94
  * Compatibility with bbPress 2.2 new user roles model is provided. More details about the reason of such update at http://shinephp.com/bbpress-user-role-editor-conflict-fix/
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=vladimir%40shinephp%2ecom&lc=RU&item_name=ShinePHP%2ecom&item_number=User%20Role%20Editor%20WordPress%20plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
4
  Tags: user, role, editor, security, access, permission, capability
5
  Requires at least: 3.2
6
+ Tested up to: 3.5.1
7
  Stable tag: trunk
8
 
9
  User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any standard WordPress user role.
15
  Add new roles and customize its capabilities according to your needs, from scratch of as a copy of other existing role.
16
  Unnecessary self-made role can be deleted if there are no users whom such role is assigned.
17
  Role assigned every new created user by default may be changed too.
18
+ Capabilities could be assigned on per user basis. Multiple roles could be assigned to user simultaneously.
19
+ You can add new capabilities and remove unnecessary capabilities which could be left from uninstalled plugins.
20
  Multi-site support is provided.
21
 
22
  To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](shinephp.com).
68
  * Polish: [TagSite](http://www.tagsite.eu), [Bartosz](www.digitalfactory.pl)
69
  * Russian: [Vladimir Garagulya](http://shinephp.com)
70
  * Serbian: [Diana](http://wpcouponshop.com)
 
71
  * Spanish: [Victor Ricardo Díaz (INFOMED)](http://www.sld.cu)
72
  * Swedish: [Christer Dahlbacka](www.startlinks.eu), [Andréas Lundgren](http://adevade.com/)
73
  * Traditional Chinese (Jingxin Lai)
74
  * Turkish: [Muhammed YILDIRIM](http://ben.muhammed.im)
75
  * -----------------------------------------------------
76
  * translations below are included to the package, but all of them are outdated and every file needs to be updated. You are welcome!
77
+ * Finnish, Japanese, Belorussian, Chinese, Hungarian
 
 
 
 
78
 
79
 
80
  Dear plugin User!
85
 
86
  == Changelog ==
87
 
88
+ = 3.10 =
89
+ * 04.02.2013
90
+ * You can assign to user multiple roles simultaneously. Use user level roles and capabilities editor for that. You can click 'Capabilities' link under selected user row at users list or 'Assign Roles and Additional Capabilities' link at user profile.
91
+ * Critical bug fix: hidden deprecated WordPress core capabilities had turned on after any update made to the role. Deprecated capabilities are not currently in use by WordPress itself. But old plugins or themes could still use them. If you use some outdated code I recommend you to check all roles, you modified with User Role Editor, and turn off unneeded deprecated capabilities there.
92
+ * User with Administrator role is secured better from editing, deletion by user with lower capabilities.
93
+
94
  = 3.9 =
95
  * 07.01.2013
96
  * Compatibility with bbPress 2.2 new user roles model is provided. More details about the reason of such update at http://shinephp.com/bbpress-user-role-editor-conflict-fix/
screenshot-4.png CHANGED
Binary file
user-role-editor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: User Role Editor
4
  Plugin URI: http://www.shinephp.com/user-role-editor-wordpress-plugin/
5
  Description: It allows you to change/add/delete any WordPress user role (except administrator) capabilities list with a few clicks.
6
- Version: 3.9
7
  Author: Vladimir Garagulya
8
  Author URI: http://www.shinephp.com
9
  Text Domain: ure
@@ -11,7 +11,7 @@ Domain Path: /lang/
11
  */
12
 
13
  /*
14
- Copyright 2010-2012 Vladimir Garagulya (email: vladimir@shinephp.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
@@ -71,8 +71,9 @@ function ure_load_translation() {
71
 
72
  function ure_optionsPage() {
73
 
74
- global $wpdb, $current_user, $ure_OptionsTable, $ure_roles, $ure_capabilitiesToSave, $ure_toldAboutBackup,
75
- $ure_currentRole, $ure_currentRoleName, $ure_apply_to_all, $ure_fullCapabilities;
 
76
 
77
  if (!empty($current_user)) {
78
  $user_id = $current_user->ID;
@@ -136,7 +137,7 @@ function ure_admin_jquery(){
136
  // 2nd: http://blogdomain.com/wp-admin/users.php?action=delete&user=ID&_wpnonce=ab34225a78
137
  // If put Administrator user ID into such request, user with lower capabilities (if he has 'edit_users')
138
  // can edit, delete admin record
139
- // This function removes 'edit_users' capability from current user capabilities
140
  // if request has admin user ID in it
141
  function ure_not_edit_admin($allcaps, $caps, $name) {
142
 
@@ -160,6 +161,7 @@ function ure_not_edit_admin($allcaps, $caps, $name) {
160
  }
161
  if ($accessDeny) {
162
  unset($allcaps['edit_users']);
 
163
  }
164
  break;
165
  }
@@ -175,6 +177,20 @@ function ure_exclude_administrators($user_query) {
175
 
176
  global $wpdb;
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  // get user_id of users with 'Administrator' role
179
  $tableName = (!is_multisite() && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta;
180
  $meta_key = $wpdb->prefix.'capabilities';
@@ -299,6 +315,85 @@ function ure_user_row($actions, $user) {
299
  // end of ure_user_row()
300
 
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  if (function_exists('is_multisite') && is_multisite()) {
303
 
304
  // every time when new blog created - duplicate to it roles from the main blog (1)
@@ -352,7 +447,7 @@ if (function_exists('is_multisite') && is_multisite()) {
352
 
353
  add_filter( 'all_plugins', 'ure_exclude_from_plugins_list' );
354
 
355
- }
356
 
357
 
358
  if (is_admin()) {
@@ -366,6 +461,10 @@ if (is_admin()) {
366
  add_filter( 'plugin_row_meta', 'ure_plugin_row_meta', 10, 2 );
367
  add_action( 'admin_menu', 'ure_settings_menu' );
368
  add_action( 'user_row_actions', 'ure_user_row', 10, 2 );
 
 
 
 
369
  }
370
 
371
  ?>
3
  Plugin Name: User Role Editor
4
  Plugin URI: http://www.shinephp.com/user-role-editor-wordpress-plugin/
5
  Description: It allows you to change/add/delete any WordPress user role (except administrator) capabilities list with a few clicks.
6
+ Version: 3.10
7
  Author: Vladimir Garagulya
8
  Author URI: http://www.shinephp.com
9
  Text Domain: ure
11
  */
12
 
13
  /*
14
+ Copyright 2010-2013 Vladimir Garagulya (email: vladimir@shinephp.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
71
 
72
  function ure_optionsPage() {
73
 
74
+ global $wpdb, $wp_roles, $current_user, $ure_OptionsTable, $ure_roles, $ure_capabilitiesToSave, $ure_toldAboutBackup,
75
+ $ure_currentRole, $ure_currentRoleName, $ure_apply_to_all, $ure_fullCapabilities,
76
+ $ure_show_deprecated_caps, $ure_caps_readable, $ure_userToEdit;
77
 
78
  if (!empty($current_user)) {
79
  $user_id = $current_user->ID;
137
  // 2nd: http://blogdomain.com/wp-admin/users.php?action=delete&user=ID&_wpnonce=ab34225a78
138
  // If put Administrator user ID into such request, user with lower capabilities (if he has 'edit_users')
139
  // can edit, delete admin record
140
+ // This function removes 'edit_users', 'delete_users' capability from current user capabilities
141
  // if request has admin user ID in it
142
  function ure_not_edit_admin($allcaps, $caps, $name) {
143
 
161
  }
162
  if ($accessDeny) {
163
  unset($allcaps['edit_users']);
164
+ unset($allcaps['delete_users']);
165
  }
166
  break;
167
  }
177
 
178
  global $wpdb;
179
 
180
+ $result = false;
181
+ $links_to_block = array('profile.php', 'users.php');
182
+ foreach ( $links_to_block as $key => $value ) {
183
+ $result = stripos($_SERVER['REQUEST_URI'], $value);
184
+ if ( $result !== false ) {
185
+ break;
186
+ }
187
+ }
188
+
189
+ if ( $result===false ) {
190
+ return;
191
+ }
192
+
193
+
194
  // get user_id of users with 'Administrator' role
195
  $tableName = (!is_multisite() && defined('CUSTOM_USER_META_TABLE')) ? CUSTOM_USER_META_TABLE : $wpdb->usermeta;
196
  $meta_key = $wpdb->prefix.'capabilities';
315
  // end of ure_user_row()
316
 
317
 
318
+
319
+
320
+
321
+ function ure_edit_user_profile($user) {
322
+
323
+ global $current_user, $wp_roles;
324
+
325
+ if (!ure_is_admin($current_user->ID)) {
326
+ return;
327
+ }
328
+
329
+ ?>
330
+ <h3><?php _e('User Role Editor', 'ure'); ?></h3>
331
+ <table class="form-table">
332
+ <tr>
333
+ <th scope="row"><?php _e( 'Other Roles', 'ure' ); ?></th>
334
+ <td>
335
+ <?php
336
+ $output = ure_other_user_roles($user);
337
+ echo $output. '&nbsp;&nbsp;&gt;&gt;&nbsp;<a href="' . wp_nonce_url("users.php?page=user-role-editor.php&object=user&amp;user_id={$user->ID}", "ure_user_{$user->ID}") . '">' . __('Edit', 'ure') . '</a>';
338
+ ?>
339
+ </td>
340
+ </tr>
341
+ </table>
342
+ <?php
343
+ /*
344
+ <script type="text/javascript">
345
+ jQuery('#role').attr('disabled', 'disabled');
346
+ </script>
347
+ */
348
+ ?>
349
+ <?php
350
+
351
+ }
352
+ // end of ure_edit_user_profile()
353
+
354
+
355
+ /**
356
+ * add 'Other Roles' column to WordPress users list table
357
+ *
358
+ * @param array $columns WordPress users list table columns list
359
+ * @return array
360
+ */
361
+ function ure_user_role_column($columns = array()) {
362
+
363
+ $columns['ure_roles'] = __('Other Roles', 'ure');
364
+
365
+ return $columns;
366
+ }
367
+ // end of ure_user_column()
368
+
369
+
370
+ /**
371
+ * Return user's roles list for display in the WordPress Users list table
372
+ *
373
+ * @param string $retval
374
+ * @param string $column_name
375
+ * @param int $user_id
376
+ *
377
+ * @return string all user roles
378
+ */
379
+ function ure_user_role_row($retval = '', $column_name = '', $user_id = 0) {
380
+
381
+ // Only looking for bbPress's user role column
382
+ if ('ure_roles' == $column_name) {
383
+ $user = get_userdata( $user_id );
384
+ // Get the users roles
385
+ $retval = ure_other_user_roles( $user );
386
+
387
+ }
388
+
389
+
390
+ // Pass retval through
391
+ return $retval;
392
+ }
393
+ // end of ure_user_role_row()
394
+
395
+
396
+
397
  if (function_exists('is_multisite') && is_multisite()) {
398
 
399
  // every time when new blog created - duplicate to it roles from the main blog (1)
447
 
448
  add_filter( 'all_plugins', 'ure_exclude_from_plugins_list' );
449
 
450
+ } // if (function_exists('is_multisite')
451
 
452
 
453
  if (is_admin()) {
461
  add_filter( 'plugin_row_meta', 'ure_plugin_row_meta', 10, 2 );
462
  add_action( 'admin_menu', 'ure_settings_menu' );
463
  add_action( 'user_row_actions', 'ure_user_row', 10, 2 );
464
+ add_action( 'edit_user_profile', 'ure_edit_user_profile');
465
+ add_filter( 'manage_users_columns', 'ure_user_role_column', 10, 5 );
466
+ add_filter( 'manage_users_custom_column', 'ure_user_role_row', 10, 3 );
467
+
468
  }
469
 
470
  ?>