Version Description
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.30 |
Comparing to | |
See all releases |
Code changes from version 4.29 to 4.30
- includes/classes/view.php +3 -1
- js/ure-js.js +32 -51
- readme.txt +7 -2
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- user-role-editor.php +2 -2
includes/classes/view.php
CHANGED
@@ -265,7 +265,9 @@ class URE_View {
|
|
265 |
</div>
|
266 |
<div class="ure-table-cell ure-caps-option nowrap">
|
267 |
<?php esc_html_e('Quick filter:', 'user-role-editor'); ?>
|
268 |
-
<input type="text" id="quick_filter" name="quick_filter" value="" size="
|
|
|
|
|
269 |
</div>
|
270 |
<div class="ure-table-cell ure-caps-option nowrap">
|
271 |
<?php esc_html_e('Columns:', 'user-role-editor');?>
|
265 |
</div>
|
266 |
<div class="ure-table-cell ure-caps-option nowrap">
|
267 |
<?php esc_html_e('Quick filter:', 'user-role-editor'); ?>
|
268 |
+
<input type="text" id="quick_filter" name="quick_filter" value="" size="10" onkeyup="ure_filter_capabilities(this.value);" />
|
269 |
+
<input type="checkbox" id="granted_only" name="granted_only" />
|
270 |
+
<label for="granted_only"><?php esc_html_e('Granted Only', 'user-role-editor'); ?></label>
|
271 |
</div>
|
272 |
<div class="ure-table-cell ure-caps-option nowrap">
|
273 |
<?php esc_html_e('Columns:', 'user-role-editor');?>
|
js/ure-js.js
CHANGED
@@ -45,6 +45,7 @@ jQuery(function ($) {
|
|
45 |
ure_count_caps_in_groups();
|
46 |
ure_sizes_update();
|
47 |
$('#ure_select_all_caps').click(ure_auto_select_caps);
|
|
|
48 |
$('#ure_caps_groups_list').selectable({
|
49 |
selected: function( event, ui ) {
|
50 |
// do not allow multiple selection
|
@@ -54,22 +55,6 @@ jQuery(function ($) {
|
|
54 |
});
|
55 |
ure_select_selectable_element($('#ure_caps_groups_list'), $('#ure_caps_group_all'));
|
56 |
|
57 |
-
if (typeof ure_current_role === 'undefined' || 'administrator' !== ure_current_role) {
|
58 |
-
$('#ure_unselect_all').button({
|
59 |
-
label: ure_data.unselect_all
|
60 |
-
}).click(function (event) {
|
61 |
-
event.preventDefault();
|
62 |
-
ure_select_all(0);
|
63 |
-
});
|
64 |
-
|
65 |
-
$('#ure_reverse_selection').button({
|
66 |
-
label: ure_data.reverse
|
67 |
-
}).click(function (event) {
|
68 |
-
event.preventDefault();
|
69 |
-
ure_select_all(-1);
|
70 |
-
});
|
71 |
-
}
|
72 |
-
|
73 |
$('#ure_update_role').button({
|
74 |
label: ure_data.update
|
75 |
}).click(function () {
|
@@ -427,40 +412,6 @@ function ure_turn_it_back(control) {
|
|
427 |
// end of ure_turn_it_back()
|
428 |
|
429 |
|
430 |
-
/**
|
431 |
-
* Manipulate mass capability checkboxes selection
|
432 |
-
* @param {bool} selected
|
433 |
-
* @returns {none}
|
434 |
-
*/
|
435 |
-
function ure_select_all(selected) {
|
436 |
-
|
437 |
-
var qfilter = jQuery('#quick_filter').val();
|
438 |
-
var form = document.getElementById('ure_form');
|
439 |
-
for (i = 0; i < form.elements.length; i++) {
|
440 |
-
el = form.elements[i];
|
441 |
-
if (el.type !== 'checkbox') {
|
442 |
-
continue;
|
443 |
-
}
|
444 |
-
if (el.name === 'ure_caps_readable' || el.name === 'ure_show_deprecated_caps' ||
|
445 |
-
el.name === 'ure_apply_to_all' || el.disabled ||
|
446 |
-
el.name.substr(0, 8) === 'wp_role_') {
|
447 |
-
continue;
|
448 |
-
}
|
449 |
-
if (qfilter !== '' && !form.elements[i].parentNode.ure_tag) {
|
450 |
-
continue;
|
451 |
-
}
|
452 |
-
if (selected >= 0) {
|
453 |
-
form.elements[i].checked = selected;
|
454 |
-
} else {
|
455 |
-
form.elements[i].checked = !form.elements[i].checked;
|
456 |
-
}
|
457 |
-
|
458 |
-
}
|
459 |
-
|
460 |
-
}
|
461 |
-
// end of ure_select_all()
|
462 |
-
|
463 |
-
|
464 |
function ure_apply_selection(cb_id) {
|
465 |
var qfilter = jQuery('#quick_filter').val();
|
466 |
var parent_div = jQuery('#ure_cap_div_'+ cb_id);
|
@@ -601,6 +552,7 @@ function ure_caps_refresh(group) {
|
|
601 |
ure_caps_refresh_for_group(group_id);
|
602 |
}
|
603 |
ure_change_caps_columns_quant();
|
|
|
604 |
}
|
605 |
|
606 |
|
@@ -679,4 +631,33 @@ function ure_sizes_update() {
|
|
679 |
|
680 |
jQuery(window).resize(function() {
|
681 |
ure_sizes_update();
|
682 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
ure_count_caps_in_groups();
|
46 |
ure_sizes_update();
|
47 |
$('#ure_select_all_caps').click(ure_auto_select_caps);
|
48 |
+
$('#granted_only').click(ure_show_granted_caps_only);
|
49 |
$('#ure_caps_groups_list').selectable({
|
50 |
selected: function( event, ui ) {
|
51 |
// do not allow multiple selection
|
55 |
});
|
56 |
ure_select_selectable_element($('#ure_caps_groups_list'), $('#ure_caps_group_all'));
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
$('#ure_update_role').button({
|
59 |
label: ure_data.update
|
60 |
}).click(function () {
|
412 |
// end of ure_turn_it_back()
|
413 |
|
414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
function ure_apply_selection(cb_id) {
|
416 |
var qfilter = jQuery('#quick_filter').val();
|
417 |
var parent_div = jQuery('#ure_cap_div_'+ cb_id);
|
552 |
ure_caps_refresh_for_group(group_id);
|
553 |
}
|
554 |
ure_change_caps_columns_quant();
|
555 |
+
jQuery('#granted_only').attr('checked', false);
|
556 |
}
|
557 |
|
558 |
|
631 |
|
632 |
jQuery(window).resize(function() {
|
633 |
ure_sizes_update();
|
634 |
+
});
|
635 |
+
|
636 |
+
|
637 |
+
function ure_show_granted_caps_only() {
|
638 |
+
var show_deprecated = jQuery('#ure_show_deprecated_caps').attr('checked');
|
639 |
+
var hide_flag = jQuery('#granted_only').attr('checked');
|
640 |
+
jQuery('.ure-cap-div').each(function () {
|
641 |
+
var cap_div = jQuery(this);
|
642 |
+
if (!cap_div.hasClass(ure_obj.selected_group)) { // apply to the currently selected group only
|
643 |
+
return;
|
644 |
+
}
|
645 |
+
var cap_id = cap_div.attr('id').substr(12);
|
646 |
+
var granted = jQuery('#'+ cap_id).attr('checked');
|
647 |
+
if (granted) {
|
648 |
+
return;
|
649 |
+
}
|
650 |
+
if (hide_flag) {
|
651 |
+
if (!cap_div.hasClass('hidden')) {
|
652 |
+
cap_div.addClass('hidden');
|
653 |
+
}
|
654 |
+
} else {
|
655 |
+
if (cap_div.hasClass('deprecated') && !show_deprecated) {
|
656 |
+
return;
|
657 |
+
}
|
658 |
+
if (cap_div.hasClass('hidden')) {
|
659 |
+
cap_div.removeClass('hidden');
|
660 |
+
}
|
661 |
+
}
|
662 |
+
});
|
663 |
+
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: user, role, editor, security, access, permission, capability
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,6 +29,7 @@ Do you need more functionality with quality support in the real time? Do you wis
|
|
29 |
[User Role Editor Pro](https://www.role-editor.com) includes extra modules:
|
30 |
<ul>
|
31 |
<li>Block selected admin menu items for role.</li>
|
|
|
32 |
<li>Block selected widgets under "Appearance" menu for role.</li>
|
33 |
<li>Show widgets at front-end for selected roles.</li>
|
34 |
<li>Block selected meta boxes (dashboard, posts, pages, custom post types) for role.</li>
|
@@ -75,6 +76,10 @@ If you wish to check available translations or help with plugin translation to y
|
|
75 |
https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
|
76 |
|
77 |
== Changelog ==
|
|
|
|
|
|
|
|
|
78 |
= [4.29] 10.11.2016 =
|
79 |
* New: User Role Editor own user capabilities are grouped separately under Custom capabilities.
|
80 |
* Update: URE_Lib::is_super_admin() uses WordPress core is_super_admin() for multisite setup only. Superadmin is a user with 'administrator' role in the case of single site WordPress installation.
|
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¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: user, role, editor, security, access, permission, capability
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.7
|
7 |
+
Stable tag: 4.30
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
[User Role Editor Pro](https://www.role-editor.com) includes extra modules:
|
30 |
<ul>
|
31 |
<li>Block selected admin menu items for role.</li>
|
32 |
+
<li>Hide selected front-end menu items for no logged-in visitors, logged-in users, roles.</li>
|
33 |
<li>Block selected widgets under "Appearance" menu for role.</li>
|
34 |
<li>Show widgets at front-end for selected roles.</li>
|
35 |
<li>Block selected meta boxes (dashboard, posts, pages, custom post types) for role.</li>
|
76 |
https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
|
77 |
|
78 |
== Changelog ==
|
79 |
+
= [4.30] 01.12.2016 =
|
80 |
+
* Update: compatible with WordPress 4.7
|
81 |
+
* New: "Granted Only" checkbox to the right from the "Quick Filter" input control allows to show only granted capabilities for the selected role or user.
|
82 |
+
|
83 |
= [4.29] 10.11.2016 =
|
84 |
* New: User Role Editor own user capabilities are grouped separately under Custom capabilities.
|
85 |
* Update: URE_Lib::is_super_admin() uses WordPress core is_super_admin() for multisite setup only. Superadmin is a user with 'administrator' role in the case of single site WordPress installation.
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
user-role-editor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: User Role Editor
|
4 |
Plugin URI: https://www.role-editor.com
|
5 |
Description: Change/add/delete WordPress user roles and capabilities.
|
6 |
-
Version: 4.
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.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_BASE_NAME', plugin_basename(__FILE__));
|
3 |
Plugin Name: User Role Editor
|
4 |
Plugin URI: https://www.role-editor.com
|
5 |
Description: Change/add/delete WordPress user roles and capabilities.
|
6 |
+
Version: 4.30
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.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.30');
|
27 |
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
28 |
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
29 |
define('URE_PLUGIN_BASE_NAME', plugin_basename(__FILE__));
|