Version Description
- 22.04.2014
- Bug was fixed. It had prevented bulk move users without role (--No role for this site--) to the selected role in case such users were shown more than at one WordPress Users page.
- Korean translation was added. Thanks to Taek Yoon.
- Pro version update notes:
- Use new "Admin Menu" button to block selected admin menu items for role. You need to activate this module at the "Additional Modules". This feature is useful when some of submenu items are restricted by the same user capability, e.g. "Settings" submenu, but you wish allow to user work just with part of it. You may use "Admin Menu" dialog as the reference for your work with roles and capabilities as "Admin Menu" shows what user capability restrict access to what admin menu item.
- Posts/Pages edit restriction feature does not prohibit to add new post/page now. Now it should be managed via 'create_posts' or 'create_pages' user capabilities.
- If you use Posts/Pages edit restriction by author IDs, there is no need to add user ID to allow him edit his own posts or page. Current user is added to the allowed authors list automatically.
- New tab "Additional Modules" was added to the User Role Editor options page. As per name all options related to additional modules were moved there.
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.12 |
Comparing to | |
See all releases |
Code changes from version 4.11 to 4.12
- includes/class-ajax-processor.php +19 -10
- includes/class-ure-lib.php +16 -3
- includes/class-user-role-editor.php +28 -11
- includes/settings-template.php +42 -22
- js/ure-users.js +1 -1
- readme.txt +16 -1
- user-role-editor.php +2 -2
includes/class-ajax-processor.php
CHANGED
@@ -28,7 +28,7 @@ class URE_Ajax_Processor {
|
|
28 |
|
29 |
protected function ajax_check_permissions() {
|
30 |
|
31 |
-
if (!wp_verify_nonce($_REQUEST['wp_nonce'], 'user-role-editor
|
32 |
echo json_encode(array('result'=>'error', 'message'=>'URE: Wrong or expired request'));
|
33 |
die;
|
34 |
}
|
@@ -63,31 +63,40 @@ class URE_Ajax_Processor {
|
|
63 |
}
|
64 |
|
65 |
$users = $this->lib->get_users_without_role();
|
66 |
-
$answer = array('result'=>'success', 'users'=>$users, 'new_role'=>$new_role);
|
67 |
|
68 |
return $answer;
|
69 |
}
|
70 |
// end of get_users_without_role()
|
71 |
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
/**
|
74 |
* AJAX requests dispatcher
|
75 |
*/
|
76 |
public function dispatch() {
|
77 |
|
78 |
-
|
79 |
|
80 |
$action = filter_input(INPUT_POST, 'sub_action', FILTER_SANITIZE_STRING);
|
81 |
if (empty($action)) {
|
82 |
$action = filter_input(INPUT_GET, 'sub_action', FILTER_SANITIZE_STRING);
|
83 |
}
|
84 |
-
|
85 |
-
|
86 |
-
$answer = self::get_users_without_role();
|
87 |
-
break;
|
88 |
-
default:
|
89 |
-
$answer = array('result'=>'error', 'message'=>'unknown action "'. $action .'"');
|
90 |
-
}
|
91 |
|
92 |
$json_answer = json_encode($answer);
|
93 |
echo $json_answer;
|
28 |
|
29 |
protected function ajax_check_permissions() {
|
30 |
|
31 |
+
if (!wp_verify_nonce($_REQUEST['wp_nonce'], 'user-role-editor')) {
|
32 |
echo json_encode(array('result'=>'error', 'message'=>'URE: Wrong or expired request'));
|
33 |
die;
|
34 |
}
|
63 |
}
|
64 |
|
65 |
$users = $this->lib->get_users_without_role();
|
66 |
+
$answer = array('result'=>'success', 'users'=>$users, 'new_role'=>$new_role, 'message'=>'success');
|
67 |
|
68 |
return $answer;
|
69 |
}
|
70 |
// end of get_users_without_role()
|
71 |
|
72 |
|
73 |
+
protected function _dispatch($action) {
|
74 |
+
switch ($action) {
|
75 |
+
case 'get_users_without_role':
|
76 |
+
$answer = $this->get_users_without_role();
|
77 |
+
break;
|
78 |
+
default:
|
79 |
+
$answer = array('result' => 'error', 'message' => 'unknown action "' . $action . '"');
|
80 |
+
}
|
81 |
+
|
82 |
+
return $answer;
|
83 |
+
}
|
84 |
+
// end of _dispatch()
|
85 |
+
|
86 |
+
|
87 |
/**
|
88 |
* AJAX requests dispatcher
|
89 |
*/
|
90 |
public function dispatch() {
|
91 |
|
92 |
+
$this->ajax_check_permissions();
|
93 |
|
94 |
$action = filter_input(INPUT_POST, 'sub_action', FILTER_SANITIZE_STRING);
|
95 |
if (empty($action)) {
|
96 |
$action = filter_input(INPUT_GET, 'sub_action', FILTER_SANITIZE_STRING);
|
97 |
}
|
98 |
+
|
99 |
+
$answer = $this->_dispatch($action);
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
$json_answer = json_encode($answer);
|
102 |
echo $json_answer;
|
includes/class-ure-lib.php
CHANGED
@@ -2340,7 +2340,7 @@ class Ure_Lib extends Garvs_WP_Lib {
|
|
2340 |
// end of user_primary_role_dropdown_list()
|
2341 |
|
2342 |
|
2343 |
-
// returns true if
|
2344 |
// returns true if user has role with name equal $capability
|
2345 |
protected function user_can($capability) {
|
2346 |
|
@@ -2361,12 +2361,16 @@ class Ure_Lib extends Garvs_WP_Lib {
|
|
2361 |
// end of user_can()
|
2362 |
|
2363 |
|
2364 |
-
// returns true if
|
2365 |
-
// returns true if
|
2366 |
public function user_has_capability($user, $cap) {
|
2367 |
|
2368 |
global $wp_roles;
|
2369 |
|
|
|
|
|
|
|
|
|
2370 |
if (is_multisite() && is_super_admin($user->ID)) {
|
2371 |
return true;
|
2372 |
}
|
@@ -2443,5 +2447,14 @@ class Ure_Lib extends Garvs_WP_Lib {
|
|
2443 |
|
2444 |
}
|
2445 |
// end of get_users_without_role()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2446 |
}
|
2447 |
// end of URE_Lib class
|
2340 |
// end of user_primary_role_dropdown_list()
|
2341 |
|
2342 |
|
2343 |
+
// returns true if user opened to edit has $capability assigned through the roles or directly
|
2344 |
// returns true if user has role with name equal $capability
|
2345 |
protected function user_can($capability) {
|
2346 |
|
2361 |
// end of user_can()
|
2362 |
|
2363 |
|
2364 |
+
// returns true if user $user has $capability assigned through the roles or directly
|
2365 |
+
// returns true if user $user has role with name equal $capability
|
2366 |
public function user_has_capability($user, $cap) {
|
2367 |
|
2368 |
global $wp_roles;
|
2369 |
|
2370 |
+
if (empty($user) || !is_object($user)) {
|
2371 |
+
return false;
|
2372 |
+
}
|
2373 |
+
|
2374 |
if (is_multisite() && is_super_admin($user->ID)) {
|
2375 |
return true;
|
2376 |
}
|
2447 |
|
2448 |
}
|
2449 |
// end of get_users_without_role()
|
2450 |
+
|
2451 |
+
|
2452 |
+
public function get_current_role() {
|
2453 |
+
|
2454 |
+
return $this->current_role;
|
2455 |
+
|
2456 |
+
}
|
2457 |
+
// end of get_current_role()
|
2458 |
+
|
2459 |
}
|
2460 |
// end of URE_Lib class
|
includes/class-user-role-editor.php
CHANGED
@@ -181,7 +181,7 @@ class User_Role_Editor {
|
|
181 |
wp_register_script( 'ure-users-js', plugins_url( '/js/ure-users.js', URE_PLUGIN_FULL_PATH ) );
|
182 |
wp_enqueue_script ( 'ure-users-js' );
|
183 |
wp_localize_script( 'ure-users-js', 'ure_users_data', array(
|
184 |
-
'wp_nonce' => wp_create_nonce('user-role-editor
|
185 |
'move_from_no_role_title' => esc_html__('Change role for users without role', 'ure'),
|
186 |
'no_rights_caption' => esc_html__('No rights', 'ure'),
|
187 |
'provide_new_role_caption' => esc_html__('Provide new role', 'ure')
|
@@ -596,7 +596,7 @@ class User_Role_Editor {
|
|
596 |
protected function get_settings_action() {
|
597 |
|
598 |
$action = 'show';
|
599 |
-
$update_buttons = array('ure_settings_update', 'ure_settings_ms_update', 'ure_default_roles_update');
|
600 |
foreach($update_buttons as $update_button) {
|
601 |
if (!isset($_POST[$update_button])) {
|
602 |
continue;
|
@@ -613,7 +613,9 @@ class User_Role_Editor {
|
|
613 |
}
|
614 |
// end of get_settings_action()
|
615 |
|
616 |
-
|
|
|
|
|
617 |
protected function update_general_options() {
|
618 |
if (defined('URE_SHOW_ADMIN_ROLE') && (URE_SHOW_ADMIN_ROLE == 1)) {
|
619 |
$show_admin_role = 1;
|
@@ -626,21 +628,33 @@ class User_Role_Editor {
|
|
626 |
$this->lib->put_option('ure_caps_readable', $caps_readable);
|
627 |
|
628 |
$show_deprecated_caps = $this->lib->get_request_var('show_deprecated_caps', 'checkbox');
|
629 |
-
$this->lib->put_option('ure_show_deprecated_caps', $show_deprecated_caps);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
if (!$this->lib->multisite) {
|
632 |
$count_users_without_role = $this->lib->get_request_var('count_users_without_role', 'checkbox');
|
633 |
$this->lib->put_option('count_users_without_role', $count_users_without_role);
|
634 |
}
|
|
|
635 |
|
636 |
-
do_action('ure_settings_update');
|
637 |
-
|
638 |
$this->lib->flush_options();
|
639 |
$this->lib->show_message(esc_html__('User Role Editor options are updated', 'ure'));
|
640 |
-
|
641 |
}
|
642 |
-
// end of
|
643 |
-
|
644 |
|
645 |
protected function update_default_roles() {
|
646 |
global $wp_roles;
|
@@ -696,6 +710,9 @@ class User_Role_Editor {
|
|
696 |
case 'ure_settings_update':
|
697 |
$this->update_general_options();
|
698 |
break;
|
|
|
|
|
|
|
699 |
case 'ure_settings_ms_update':
|
700 |
$this->update_multisite_options();
|
701 |
break;
|
@@ -812,7 +829,7 @@ class User_Role_Editor {
|
|
812 |
wp_register_script( 'ure-js', plugins_url( '/js/ure-js.js', URE_PLUGIN_FULL_PATH ) );
|
813 |
wp_enqueue_script ( 'ure-js' );
|
814 |
wp_localize_script( 'ure-js', 'ure_data', array(
|
815 |
-
'wp_nonce' => wp_create_nonce('user-role-editor'),
|
816 |
'page_url' => URE_WP_ADMIN_URL . URE_PARENT .'?page=users-'.URE_PLUGIN_FILE,
|
817 |
'is_multisite' => is_multisite() ? 1 : 0,
|
818 |
'select_all' => esc_html__('Select All', 'ure'),
|
@@ -969,7 +986,7 @@ class User_Role_Editor {
|
|
969 |
$ajax_processor->dispatch();
|
970 |
|
971 |
}
|
972 |
-
// end of
|
973 |
|
974 |
|
975 |
// execute on plugin deactivation
|
181 |
wp_register_script( 'ure-users-js', plugins_url( '/js/ure-users.js', URE_PLUGIN_FULL_PATH ) );
|
182 |
wp_enqueue_script ( 'ure-users-js' );
|
183 |
wp_localize_script( 'ure-users-js', 'ure_users_data', array(
|
184 |
+
'wp_nonce' => wp_create_nonce('user-role-editor'),
|
185 |
'move_from_no_role_title' => esc_html__('Change role for users without role', 'ure'),
|
186 |
'no_rights_caption' => esc_html__('No rights', 'ure'),
|
187 |
'provide_new_role_caption' => esc_html__('Provide new role', 'ure')
|
596 |
protected function get_settings_action() {
|
597 |
|
598 |
$action = 'show';
|
599 |
+
$update_buttons = array('ure_settings_update', 'ure_addons_settings_update', 'ure_settings_ms_update', 'ure_default_roles_update');
|
600 |
foreach($update_buttons as $update_button) {
|
601 |
if (!isset($_POST[$update_button])) {
|
602 |
continue;
|
613 |
}
|
614 |
// end of get_settings_action()
|
615 |
|
616 |
+
/**
|
617 |
+
* Update General Options tab
|
618 |
+
*/
|
619 |
protected function update_general_options() {
|
620 |
if (defined('URE_SHOW_ADMIN_ROLE') && (URE_SHOW_ADMIN_ROLE == 1)) {
|
621 |
$show_admin_role = 1;
|
628 |
$this->lib->put_option('ure_caps_readable', $caps_readable);
|
629 |
|
630 |
$show_deprecated_caps = $this->lib->get_request_var('show_deprecated_caps', 'checkbox');
|
631 |
+
$this->lib->put_option('ure_show_deprecated_caps', $show_deprecated_caps);
|
632 |
+
|
633 |
+
do_action('ure_settings_update1');
|
634 |
+
|
635 |
+
$this->lib->flush_options();
|
636 |
+
$this->lib->show_message(esc_html__('User Role Editor options are updated', 'ure'));
|
637 |
+
|
638 |
+
}
|
639 |
+
// end of update_general_options()
|
640 |
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Update Additional Modules Options tab
|
644 |
+
*/
|
645 |
+
protected function update_addons_options() {
|
646 |
+
|
647 |
if (!$this->lib->multisite) {
|
648 |
$count_users_without_role = $this->lib->get_request_var('count_users_without_role', 'checkbox');
|
649 |
$this->lib->put_option('count_users_without_role', $count_users_without_role);
|
650 |
}
|
651 |
+
do_action('ure_settings_update2');
|
652 |
|
|
|
|
|
653 |
$this->lib->flush_options();
|
654 |
$this->lib->show_message(esc_html__('User Role Editor options are updated', 'ure'));
|
|
|
655 |
}
|
656 |
+
// end of update_addons_options()
|
657 |
+
|
658 |
|
659 |
protected function update_default_roles() {
|
660 |
global $wp_roles;
|
710 |
case 'ure_settings_update':
|
711 |
$this->update_general_options();
|
712 |
break;
|
713 |
+
case 'ure_addons_settings_update':
|
714 |
+
$this->update_addons_options();
|
715 |
+
break;
|
716 |
case 'ure_settings_ms_update':
|
717 |
$this->update_multisite_options();
|
718 |
break;
|
829 |
wp_register_script( 'ure-js', plugins_url( '/js/ure-js.js', URE_PLUGIN_FULL_PATH ) );
|
830 |
wp_enqueue_script ( 'ure-js' );
|
831 |
wp_localize_script( 'ure-js', 'ure_data', array(
|
832 |
+
'wp_nonce' => wp_create_nonce('user-role-editor'),
|
833 |
'page_url' => URE_WP_ADMIN_URL . URE_PARENT .'?page=users-'.URE_PLUGIN_FILE,
|
834 |
'is_multisite' => is_multisite() ? 1 : 0,
|
835 |
'select_all' => esc_html__('Select All', 'ure'),
|
986 |
$ajax_processor->dispatch();
|
987 |
|
988 |
}
|
989 |
+
// end of ure_ajax()
|
990 |
|
991 |
|
992 |
// execute on plugin deactivation
|
includes/settings-template.php
CHANGED
@@ -19,15 +19,16 @@
|
|
19 |
<div id="ure_tabs" style="clear: left;">
|
20 |
<ul>
|
21 |
<li><a href="#ure_tabs-1"><?php esc_html_e('General', 'ure');?></a></li>
|
22 |
-
<li><a href="#ure_tabs-2"><?php esc_html_e('
|
|
|
23 |
<?php
|
24 |
if ($this->lib->multisite) {
|
25 |
?>
|
26 |
-
<li><a href="#ure_tabs-
|
27 |
<?php
|
28 |
}
|
29 |
?>
|
30 |
-
<li><a href="#ure_tabs-
|
31 |
</ul>
|
32 |
<div id="ure_tabs-1">
|
33 |
<div id="ure-settings-form">
|
@@ -58,6 +59,23 @@
|
|
58 |
<td>
|
59 |
</td>
|
60 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
<?php
|
62 |
if (!$this->lib->multisite) {
|
63 |
?>
|
@@ -71,21 +89,23 @@ if (!$this->lib->multisite) {
|
|
71 |
</tr>
|
72 |
<?php
|
73 |
}
|
74 |
-
do_action('ure_settings_show');
|
75 |
?>
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
79 |
<p class="submit">
|
80 |
-
<input type="submit" class="button-primary" name="
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
</div>
|
85 |
-
</div> <!-- ure_tabs-1 -->
|
86 |
|
87 |
-
|
88 |
-
|
|
|
89 |
<?php
|
90 |
if (!$this->lib->multisite) {
|
91 |
esc_html_e('Primary default role: ', 'ure');
|
@@ -106,17 +126,17 @@ if (!$this->lib->multisite) {
|
|
106 |
?>
|
107 |
<hr>
|
108 |
<?php wp_nonce_field('user-role-editor'); ?>
|
109 |
-
<input type="hidden" name="ure_tab_idx" value="
|
110 |
<p class="submit">
|
111 |
<input type="submit" class="button-primary" name="ure_default_roles_update" value="<?php _e('Save', 'ure') ?>" />
|
112 |
</p>
|
113 |
</form>
|
114 |
-
</div> <!-- ure_tabs-
|
115 |
|
116 |
<?php
|
117 |
if ($this->lib->multisite) {
|
118 |
?>
|
119 |
-
<div id="ure_tabs-
|
120 |
<div id="ure-settings-form-ms">
|
121 |
<form name="ure_settings_ms" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
122 |
<table id="ure_settings_ms">
|
@@ -135,19 +155,19 @@ if (!$this->lib->multisite) {
|
|
135 |
?>
|
136 |
</table>
|
137 |
<?php wp_nonce_field('user-role-editor'); ?>
|
138 |
-
<input type="hidden" name="ure_tab_idx" value="
|
139 |
<p class="submit">
|
140 |
<input type="submit" class="button-primary" name="ure_settings_ms_update" value="<?php _e('Save', 'ure') ?>" />
|
141 |
</p>
|
142 |
</form>
|
143 |
</div> <!-- ure-settings-form-ms -->
|
144 |
-
</div> <!-- ure_tabs-
|
145 |
<?php
|
146 |
}
|
147 |
?>
|
148 |
-
<div id="ure_tabs-
|
149 |
<?php $this->lib->about(); ?>
|
150 |
-
</div> <!-- ure_tabs-
|
151 |
</div> <!-- ure_tabs -->
|
152 |
</div>
|
153 |
<script>
|
19 |
<div id="ure_tabs" style="clear: left;">
|
20 |
<ul>
|
21 |
<li><a href="#ure_tabs-1"><?php esc_html_e('General', 'ure');?></a></li>
|
22 |
+
<li><a href="#ure_tabs-2"><?php esc_html_e('Additional Modules', 'ure');?></a></li>
|
23 |
+
<li><a href="#ure_tabs-3"><?php esc_html_e('Default Roles', 'ure');?></a></li>
|
24 |
<?php
|
25 |
if ($this->lib->multisite) {
|
26 |
?>
|
27 |
+
<li><a href="#ure_tabs-4"><?php esc_html_e('Multisite', 'ure');?></a></li>
|
28 |
<?php
|
29 |
}
|
30 |
?>
|
31 |
+
<li><a href="#ure_tabs-5"><?php esc_html_e('About', 'ure');?></a></li>
|
32 |
</ul>
|
33 |
<div id="ure_tabs-1">
|
34 |
<div id="ure-settings-form">
|
59 |
<td>
|
60 |
</td>
|
61 |
</tr>
|
62 |
+
<?php
|
63 |
+
do_action('ure_settings_show1');
|
64 |
+
?>
|
65 |
+
</table>
|
66 |
+
<?php wp_nonce_field('user-role-editor'); ?>
|
67 |
+
<input type="hidden" name="ure_tab_idx" value="0" />
|
68 |
+
<p class="submit">
|
69 |
+
<input type="submit" class="button-primary" name="ure_settings_update" value="<?php _e('Save', 'ure') ?>" />
|
70 |
+
</p>
|
71 |
+
|
72 |
+
</form>
|
73 |
+
</div>
|
74 |
+
</div> <!-- ure_tabs-1 -->
|
75 |
+
|
76 |
+
<div id="ure_tabs-2">
|
77 |
+
<form name="ure_additional_modules" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
78 |
+
<table id="ure_addons">
|
79 |
<?php
|
80 |
if (!$this->lib->multisite) {
|
81 |
?>
|
89 |
</tr>
|
90 |
<?php
|
91 |
}
|
|
|
92 |
?>
|
93 |
+
|
94 |
+
<?php
|
95 |
+
do_action('ure_settings_show2');
|
96 |
+
?>
|
97 |
+
</table>
|
98 |
+
<?php wp_nonce_field('user-role-editor'); ?>
|
99 |
+
<input type="hidden" name="ure_tab_idx" value="1" />
|
100 |
<p class="submit">
|
101 |
+
<input type="submit" class="button-primary" name="ure_addons_settings_update" value="<?php _e('Save', 'ure') ?>" />
|
102 |
+
|
103 |
+
</form>
|
104 |
+
</div>
|
|
|
|
|
105 |
|
106 |
+
|
107 |
+
<div id="ure_tabs-3">
|
108 |
+
<form name="ure_default_roles" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
109 |
<?php
|
110 |
if (!$this->lib->multisite) {
|
111 |
esc_html_e('Primary default role: ', 'ure');
|
126 |
?>
|
127 |
<hr>
|
128 |
<?php wp_nonce_field('user-role-editor'); ?>
|
129 |
+
<input type="hidden" name="ure_tab_idx" value="2" />
|
130 |
<p class="submit">
|
131 |
<input type="submit" class="button-primary" name="ure_default_roles_update" value="<?php _e('Save', 'ure') ?>" />
|
132 |
</p>
|
133 |
</form>
|
134 |
+
</div> <!-- ure_tabs-3 -->
|
135 |
|
136 |
<?php
|
137 |
if ($this->lib->multisite) {
|
138 |
?>
|
139 |
+
<div id="ure_tabs-4">
|
140 |
<div id="ure-settings-form-ms">
|
141 |
<form name="ure_settings_ms" method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE; ?>" >
|
142 |
<table id="ure_settings_ms">
|
155 |
?>
|
156 |
</table>
|
157 |
<?php wp_nonce_field('user-role-editor'); ?>
|
158 |
+
<input type="hidden" name="ure_tab_idx" value="3" />
|
159 |
<p class="submit">
|
160 |
<input type="submit" class="button-primary" name="ure_settings_ms_update" value="<?php _e('Save', 'ure') ?>" />
|
161 |
</p>
|
162 |
</form>
|
163 |
</div> <!-- ure-settings-form-ms -->
|
164 |
+
</div> <!-- ure_tabs-4 -->
|
165 |
<?php
|
166 |
}
|
167 |
?>
|
168 |
+
<div id="ure_tabs-5">
|
169 |
<?php $this->lib->about(); ?>
|
170 |
+
</div> <!-- ure_tabs-5 -->
|
171 |
</div> <!-- ure_tabs -->
|
172 |
</div>
|
173 |
<script>
|
js/ure-users.js
CHANGED
@@ -85,7 +85,7 @@ function ure_post_move_users_command(data) {
|
|
85 |
if (jQuery('#user_'+ data.users[i]).length>0) {
|
86 |
jQuery('#user_'+ data.users[i]).prop('checked', true);
|
87 |
} else {
|
88 |
-
var html = '<input type="checkbox" name="users[]" id="user_'+ data.users[i] +'" value="
|
89 |
el.append(html);
|
90 |
}
|
91 |
}
|
85 |
if (jQuery('#user_'+ data.users[i]).length>0) {
|
86 |
jQuery('#user_'+ data.users[i]).prop('checked', true);
|
87 |
} else {
|
88 |
+
var html = '<input type="checkbox" name="users[]" id="user_'+ data.users[i] +'" value="'+ data.users[i] +'" checked="checked" style="display: none;">';
|
89 |
el.append(html);
|
90 |
}
|
91 |
}
|
readme.txt
CHANGED
@@ -28,6 +28,7 @@ Do you need more functionality with quality support in real time? Do you wish re
|
|
28 |
Buy [Pro version](htpp://role-editor.com).
|
29 |
Pro version includes extra modules:
|
30 |
<ul>
|
|
|
31 |
<li>"Export/Import" module. You can export user roles to the local file and import them then to any WordPress site or other sites of the multi-site WordPress network.</li>
|
32 |
<li>Roles and Users permissions management via Network Admin for multisite configuration. One click Synchronization to the whole network.</li>
|
33 |
<li>Per posts/pages users access management to post/page editing functionality.</li>
|
@@ -66,9 +67,11 @@ To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/
|
|
66 |
|
67 |
= Translations =
|
68 |
* Catalan: [Efraim Bayarri](http://replicantsfactory.com/);
|
|
|
|
|
69 |
* Spanish: [Dario Ferrer](http://darioferrer.com/);
|
70 |
* Turkish: [Muhammed YILDIRIM](http://ben.muhammed.im);
|
71 |
-
|
72 |
|
73 |
Information for translators: All translations are outdated a little and need update.
|
74 |
|
@@ -79,6 +82,18 @@ Share with me new ideas about plugin further development and link to your site w
|
|
79 |
|
80 |
|
81 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
= 4.11 =
|
83 |
* 06.04.2014
|
84 |
* Single-site: It is possible to bulk move users without role (--No role for this site--) to the selected role or automatically created role "No rights" without any capabilities. Get more details at http://role-editor.com/no-role-for-this-site/
|
28 |
Buy [Pro version](htpp://role-editor.com).
|
29 |
Pro version includes extra modules:
|
30 |
<ul>
|
31 |
+
<li>Block selected admin menu items for role.</li>
|
32 |
<li>"Export/Import" module. You can export user roles to the local file and import them then to any WordPress site or other sites of the multi-site WordPress network.</li>
|
33 |
<li>Roles and Users permissions management via Network Admin for multisite configuration. One click Synchronization to the whole network.</li>
|
34 |
<li>Per posts/pages users access management to post/page editing functionality.</li>
|
67 |
|
68 |
= Translations =
|
69 |
* Catalan: [Efraim Bayarri](http://replicantsfactory.com/);
|
70 |
+
* Hebrew: [atar4u](http://atar4u.com)
|
71 |
+
* Korean: [Taek Yoon](http://www.ajinsys.com)
|
72 |
* Spanish: [Dario Ferrer](http://darioferrer.com/);
|
73 |
* Turkish: [Muhammed YILDIRIM](http://ben.muhammed.im);
|
74 |
+
|
75 |
|
76 |
Information for translators: All translations are outdated a little and need update.
|
77 |
|
82 |
|
83 |
|
84 |
== Changelog ==
|
85 |
+
= 4.12 =
|
86 |
+
* 22.04.2014
|
87 |
+
* Bug was fixed. It had prevented bulk move users without role (--No role for this site--) to the selected role in case such users were shown more than at one WordPress Users page.
|
88 |
+
* Korean translation was added. Thanks to [Taek Yoon](http://www.ajinsys.com).
|
89 |
+
* Pro version update notes:
|
90 |
+
* Use new "Admin Menu" button to block selected admin menu items for role. You need to activate this module at the "Additional Modules". This feature is useful when some of submenu items are restricted by the same user capability,
|
91 |
+
e.g. "Settings" submenu, but you wish allow to user work just with part of it. You may use "Admin Menu" dialog as the reference for your work with roles and capabilities as "Admin Menu" shows
|
92 |
+
what user capability restrict access to what admin menu item.
|
93 |
+
* Posts/Pages edit restriction feature does not prohibit to add new post/page now. Now it should be managed via 'create_posts' or 'create_pages' user capabilities.
|
94 |
+
* If you use Posts/Pages edit restriction by author IDs, there is no need to add user ID to allow him edit his own posts or page. Current user is added to the allowed authors list automatically.
|
95 |
+
* New tab "Additional Modules" was added to the User Role Editor options page. As per name all options related to additional modules were moved there.
|
96 |
+
|
97 |
= 4.11 =
|
98 |
* 06.04.2014
|
99 |
* Single-site: It is possible to bulk move users without role (--No role for this site--) to the selected role or automatically created role "No rights" without any capabilities. Get more details at http://role-editor.com/no-role-for-this-site/
|
user-role-editor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: User Role Editor
|
4 |
Plugin URI: http://role-editor.com
|
5 |
Description: Change/add/delete WordPress user roles and capabilities.
|
6 |
-
Version: 4.
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: http://www.shinephp.com
|
9 |
Text Domain: ure
|
@@ -23,7 +23,7 @@ if (defined('URE_PLUGIN_URL')) {
|
|
23 |
wp_die('It seems that other version of User Role Editor is active. Please deactivate it before use this version');
|
24 |
}
|
25 |
|
26 |
-
define('URE_VERSION', '4.
|
27 |
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
28 |
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
29 |
define('URE_PLUGIN_FILE', basename(__FILE__));
|
3 |
Plugin Name: User Role Editor
|
4 |
Plugin URI: http://role-editor.com
|
5 |
Description: Change/add/delete WordPress user roles and capabilities.
|
6 |
+
Version: 4.12
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: http://www.shinephp.com
|
9 |
Text Domain: ure
|
23 |
wp_die('It seems that other version of User Role Editor is active. Please deactivate it before use this version');
|
24 |
}
|
25 |
|
26 |
+
define('URE_VERSION', '4.12');
|
27 |
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
28 |
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
29 |
define('URE_PLUGIN_FILE', basename(__FILE__));
|