Version Description
- 21.01.2012
- You can see/edit "Administrator" role now. Insert this line of code "define('URE_SHOW_ADMIN_ROLE', 1);" into your wp-config.php file and login with administrator account for that. If for some reason your Administrator role missed some capabilities added by plugins or themes, you can fix that. But be careful with changing "Administrator" role, do not turn off accidentally some critical capabilities to not block your admin users.
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 3.4 |
Comparing to | |
See all releases |
Code changes from version 3.3.3 to 3.4
- readme.txt +7 -2
- ure-lib.php +9 -5
- ure-role-edit.php +3 -1
- user-role-editor.php +1 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=vladi
|
|
4 |
Tags: user, role, editor, security, access, permission, capability
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.3.1
|
7 |
-
Stable tag: 3.
|
8 |
|
9 |
User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any standard WordPress user role (except administrator).
|
10 |
|
@@ -80,7 +80,12 @@ Share with me new ideas about plugin further development and link to your site w
|
|
80 |
|
81 |
|
82 |
== Changelog ==
|
83 |
-
= 3.
|
|
|
|
|
|
|
|
|
|
|
84 |
* 11.01.2012
|
85 |
* Spanish (Dario) and Swedish (Andréas) translations update.
|
86 |
|
4 |
Tags: user, role, editor, security, access, permission, capability
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.3.1
|
7 |
+
Stable tag: 3.4
|
8 |
|
9 |
User Role Editor WordPress plugin makes the role capabilities changing easy. You can change any standard WordPress user role (except administrator).
|
10 |
|
80 |
|
81 |
|
82 |
== Changelog ==
|
83 |
+
= 3.4 =
|
84 |
+
* 21.01.2012
|
85 |
+
* You can see/edit "Administrator" role now. Insert this line of code "define('URE_SHOW_ADMIN_ROLE', 1);" into your wp-config.php file and login with administrator account for that.
|
86 |
+
If for some reason your Administrator role missed some capabilities added by plugins or themes, you can fix that. But be careful with changing "Administrator" role, do not turn off accidentally some critical capabilities to not block your admin users.
|
87 |
+
|
88 |
+
= 3.3.3 =
|
89 |
* 11.01.2012
|
90 |
* Spanish (Dario) and Swedish (Andréas) translations update.
|
91 |
|
ure-lib.php
CHANGED
@@ -82,7 +82,7 @@ function ure_is_admin( $user_id = false ) {
|
|
82 |
if (empty($current_user) && function_exists('get_currentuserinfo')) {
|
83 |
get_currentuserinfo();
|
84 |
}
|
85 |
-
$user_id = ! empty($current_user) ? $current_user->
|
86 |
}
|
87 |
|
88 |
if ( ! $user_id )
|
@@ -179,7 +179,7 @@ function restoreUserRoles() {
|
|
179 |
$reload_link = remove_query_arg('action', $reload_link);
|
180 |
$reload_link = add_query_arg('action', 'roles_restore_note', $reload_link);
|
181 |
?>
|
182 |
-
<script
|
183 |
document.location = '<?php echo $reload_link; ?>';
|
184 |
</script>
|
185 |
<?php
|
@@ -813,11 +813,15 @@ function capabilityHelpLink($capability) {
|
|
813 |
switch ($capability) {
|
814 |
case 'activate_plugins':
|
815 |
$url = 'http://www.shinephp.com/activate_plugins-wordpress-capability/';
|
816 |
-
$post_name = 'activate_plugins WordPress capability';
|
817 |
break;
|
818 |
case 'edit_dashboard':
|
819 |
$url = 'http://www.shinephp.com/edit_dashboard-wordpress-capability/';
|
820 |
-
$post_name = '
|
|
|
|
|
|
|
|
|
821 |
break;
|
822 |
default:
|
823 |
$url = '';
|
@@ -825,7 +829,7 @@ function capabilityHelpLink($capability) {
|
|
825 |
}
|
826 |
// end of switch
|
827 |
if (!empty($url)) {
|
828 |
-
$link = '<a href="'.$url.'" title="'.$
|
829 |
} else {
|
830 |
$link = '';
|
831 |
}
|
82 |
if (empty($current_user) && function_exists('get_currentuserinfo')) {
|
83 |
get_currentuserinfo();
|
84 |
}
|
85 |
+
$user_id = ! empty($current_user) ? $current_user->ID : 0;
|
86 |
}
|
87 |
|
88 |
if ( ! $user_id )
|
179 |
$reload_link = remove_query_arg('action', $reload_link);
|
180 |
$reload_link = add_query_arg('action', 'roles_restore_note', $reload_link);
|
181 |
?>
|
182 |
+
<script type="text/javascript" >
|
183 |
document.location = '<?php echo $reload_link; ?>';
|
184 |
</script>
|
185 |
<?php
|
813 |
switch ($capability) {
|
814 |
case 'activate_plugins':
|
815 |
$url = 'http://www.shinephp.com/activate_plugins-wordpress-capability/';
|
816 |
+
$post_name = 'activate_plugins WordPress user capability';
|
817 |
break;
|
818 |
case 'edit_dashboard':
|
819 |
$url = 'http://www.shinephp.com/edit_dashboard-wordpress-capability/';
|
820 |
+
$post_name = 'edit_dashboard WordPress user capability';
|
821 |
+
break;
|
822 |
+
case 'moderate_comments':
|
823 |
+
$url = 'http://www.shinephp.com/moderate_comments-wordpress-user-capability/';
|
824 |
+
$post_name = 'moderate_comments WordPress user capability';
|
825 |
break;
|
826 |
default:
|
827 |
$url = '';
|
829 |
}
|
830 |
// end of switch
|
831 |
if (!empty($url)) {
|
832 |
+
$link = '<a href="'.$url.'" title="read about '.$capability.' user capability" target="new"><img src="'.URE_PLUGIN_URL.'/images/help.png" alt="'.__('Help','ure').'" /></a>';
|
833 |
} else {
|
834 |
$link = '';
|
835 |
}
|
ure-role-edit.php
CHANGED
@@ -22,6 +22,8 @@ if (!isset($ure_currentRole) || !$ure_currentRole) {
|
|
22 |
$ure_currentRoleName = $ure_roles[$ure_currentRole]['name'];
|
23 |
}
|
24 |
|
|
|
|
|
25 |
$roleDefaultHTML = '<select id="default_user_role" name="default_user_role" width="200" style="width: 200px">';
|
26 |
$roleToCopyHTML = '<select id="user_role_copy_from" name="user_role_copy_from" width="200" style="width: 200px">
|
27 |
<option value="none" selected="selected">'.__('None', 'ure').'</option>';
|
@@ -29,7 +31,7 @@ $roleSelectHTML = '<select id="user_role" name="user_role" onchange="ure_Actions
|
|
29 |
foreach ($ure_roles as $key=>$value) {
|
30 |
$selected1 = ure_optionSelected($key, $ure_currentRole);
|
31 |
$selected2 = ure_optionSelected($key, $defaultRole);
|
32 |
-
if ($key!='administrator') {
|
33 |
$roleSelectHTML .= '<option value="'.$key.'" '.$selected1.'>'.__($value['name'], 'ure').'</option>';
|
34 |
$roleDefaultHTML .= '<option value="'.$key.'" '.$selected2.'>'.__($value['name'], 'ure').'</option>';
|
35 |
$roleToCopyHTML .= '<option value="'.$key.'" >'.__($value['name'], 'ure').'</option>';
|
22 |
$ure_currentRoleName = $ure_roles[$ure_currentRole]['name'];
|
23 |
}
|
24 |
|
25 |
+
$youAreAdmin = defined('URE_SHOW_ADMIN_ROLE') && ure_is_admin();
|
26 |
+
|
27 |
$roleDefaultHTML = '<select id="default_user_role" name="default_user_role" width="200" style="width: 200px">';
|
28 |
$roleToCopyHTML = '<select id="user_role_copy_from" name="user_role_copy_from" width="200" style="width: 200px">
|
29 |
<option value="none" selected="selected">'.__('None', 'ure').'</option>';
|
31 |
foreach ($ure_roles as $key=>$value) {
|
32 |
$selected1 = ure_optionSelected($key, $ure_currentRole);
|
33 |
$selected2 = ure_optionSelected($key, $defaultRole);
|
34 |
+
if ($youAreAdmin || $key!='administrator') {
|
35 |
$roleSelectHTML .= '<option value="'.$key.'" '.$selected1.'>'.__($value['name'], 'ure').'</option>';
|
36 |
$roleDefaultHTML .= '<option value="'.$key.'" '.$selected2.'>'.__($value['name'], 'ure').'</option>';
|
37 |
$roleToCopyHTML .= '<option value="'.$key.'" >'.__($value['name'], 'ure').'</option>';
|
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.
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: http://www.shinephp.com
|
9 |
Text Domain: ure
|
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.4
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: http://www.shinephp.com
|
9 |
Text Domain: ure
|