Version Description
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.61.1 |
Comparing to | |
See all releases |
Code changes from version 4.61 to 4.61.1
- changelog.txt +12 -0
- includes/classes/admin-notice.php +37 -0
- includes/classes/base-lib.php +4 -3
- readme.txt +12 -9
- user-role-editor.php +22 -9
changelog.txt
CHANGED
@@ -1,6 +1,18 @@
|
|
1 |
CHANGES LOG (full version).
|
2 |
===========================
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= [4.60.2] 20.09.2021 =
|
5 |
* Update: Marked as compatible with WordPress 5.8.1
|
6 |
* Fix: Multisite: URE_Editor::is_full_network_sync() returned FALSE, instead TRUE for the AJAX call, while call was made from the Network Admin (wp-admin/network/).
|
1 |
CHANGES LOG (full version).
|
2 |
===========================
|
3 |
|
4 |
+
= [4.61.1] 25.01.2022 =
|
5 |
+
* Update: Marked as compatible with WordPress 5.9.
|
6 |
+
* Update: PHP 7.3 is marked as required.
|
7 |
+
* Update: If installed PHP/WordPress version is lower than required one, script termination ( wp_die() ) was replaced with notice-warning admin notice output.
|
8 |
+
|
9 |
+
= [4.61] 28.12.2021 =
|
10 |
+
* Update: WordPress 4.4 is marked as required.
|
11 |
+
* Update: PHP 7.4 is marked as required.
|
12 |
+
* Update: "Settings->User Role Editor->Tools->Reset" button is additionally protected from the unintended/accidental usage by text input field. Manual input of "Permanently delete all custom user roles and capabilities" text is required to enable the "Reset" button.
|
13 |
+
* Update: Partial code review and refactoring according with WordPress & PHP coding standards.
|
14 |
+
* Fix: "Users->selected user->Capabilities" page: 'select all' checkbox did not work.
|
15 |
+
|
16 |
= [4.60.2] 20.09.2021 =
|
17 |
* Update: Marked as compatible with WordPress 5.8.1
|
18 |
* Fix: Multisite: URE_Editor::is_full_network_sync() returned FALSE, instead TRUE for the AJAX call, while call was made from the Network Admin (wp-admin/network/).
|
includes/classes/admin-notice.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* admin_notices action support for User Role Editor plugin
|
5 |
+
*
|
6 |
+
* Author: Vladimir Garagulya
|
7 |
+
* Author email: support@role-editor.com
|
8 |
+
* Author URI: https://role-editor.com
|
9 |
+
*/
|
10 |
+
|
11 |
+
class URE_Admin_Notice {
|
12 |
+
|
13 |
+
// Message class: update, success, warning
|
14 |
+
private $message_class;
|
15 |
+
|
16 |
+
private $message;
|
17 |
+
|
18 |
+
|
19 |
+
function __construct( $message_class, $message ) {
|
20 |
+
|
21 |
+
$this->message = $message;
|
22 |
+
$this->message_class = $message_class;
|
23 |
+
|
24 |
+
add_action('admin_notices', array($this, 'render') );
|
25 |
+
}
|
26 |
+
// end of __construct()
|
27 |
+
|
28 |
+
|
29 |
+
public function render() {
|
30 |
+
|
31 |
+
printf('<div class="notice notice-%s is-dismissible"><p>%s</p></div>', $this->message_class, $this->message );
|
32 |
+
|
33 |
+
}
|
34 |
+
// end of render()
|
35 |
+
|
36 |
+
}
|
37 |
+
// end of class URE_Admin_Notice
|
includes/classes/base-lib.php
CHANGED
@@ -236,11 +236,12 @@ class URE_Base_Lib {
|
|
236 |
if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
|
237 |
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
238 |
deactivate_plugins( $plugin_file_name );
|
239 |
-
|
240 |
-
|
241 |
-
return;
|
242 |
}
|
243 |
}
|
|
|
|
|
244 |
}
|
245 |
// end of check_version()
|
246 |
|
236 |
if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
|
237 |
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
238 |
deactivate_plugins( $plugin_file_name );
|
239 |
+
new URE_Admin_Notice('warning', $error_message );
|
240 |
+
return false;
|
|
|
241 |
}
|
242 |
}
|
243 |
+
|
244 |
+
return true;
|
245 |
}
|
246 |
// end of check_version()
|
247 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ 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.4
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 4.61
|
8 |
-
Requires PHP: 7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -81,6 +81,11 @@ https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
|
|
81 |
|
82 |
== Changelog =
|
83 |
|
|
|
|
|
|
|
|
|
|
|
84 |
= [4.61] 28.12.2021 =
|
85 |
* Update: WordPress 4.4 is marked as required.
|
86 |
* Update: PHP 7.4 is marked as required.
|
@@ -111,10 +116,8 @@ I am ready to answer on your questions about plugin usage. Use [plugin page comm
|
|
111 |
|
112 |
== Upgrade Notice ==
|
113 |
|
114 |
-
= [4.61]
|
115 |
-
* Update:
|
116 |
-
* Update: PHP 7.
|
117 |
-
* Update:
|
118 |
-
* Update: Partial code review and refactoring according with WordPress & PHP coding standards.
|
119 |
-
* Fix: "Users->selected user->Capabilities" page: 'select all' checkbox did not work.
|
120 |
|
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.4
|
6 |
+
Tested up to: 5.9
|
7 |
+
Stable tag: 4.61.1
|
8 |
+
Requires PHP: 7.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
81 |
|
82 |
== Changelog =
|
83 |
|
84 |
+
= [4.61.1] 25.01.2022 =
|
85 |
+
* Update: Marked as compatible with WordPress 5.9.
|
86 |
+
* Update: PHP 7.3 is marked as required.
|
87 |
+
* Update: If installed PHP/WordPress version is lower than required one, script termination ( wp_die() ) was replaced with notice-warning admin notice output.
|
88 |
+
|
89 |
= [4.61] 28.12.2021 =
|
90 |
* Update: WordPress 4.4 is marked as required.
|
91 |
* Update: PHP 7.4 is marked as required.
|
116 |
|
117 |
== Upgrade Notice ==
|
118 |
|
119 |
+
= [4.61.1] 25.01.2022 =
|
120 |
+
* Update: Marked as compatible with WordPress 5.9.
|
121 |
+
* Update: PHP 7.3 is marked as required.
|
122 |
+
* Update: If installed PHP/WordPress version is lower than required one, script termination ( wp_die() ) was replaced with notice-warning admin notice output.
|
|
|
|
|
123 |
|
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.61
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.com
|
9 |
Text Domain: user-role-editor
|
@@ -11,7 +11,7 @@ Domain Path: /lang/
|
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
-
Copyright 2010-
|
15 |
*/
|
16 |
|
17 |
if ( ! function_exists( 'get_option' ) ) {
|
@@ -19,31 +19,44 @@ if ( ! function_exists( 'get_option' ) ) {
|
|
19 |
die; // Silence is golden, direct call is prohibited
|
20 |
}
|
21 |
|
22 |
-
if ( defined( '
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
-
define( 'URE_VERSION', '4.61' );
|
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__ ) );
|
30 |
define( 'URE_PLUGIN_FILE', basename( __FILE__ ) );
|
31 |
define( 'URE_PLUGIN_FULL_PATH', __FILE__ );
|
32 |
|
|
|
33 |
require_once( URE_PLUGIN_DIR.'includes/classes/base-lib.php' );
|
34 |
require_once( URE_PLUGIN_DIR.'includes/classes/lib.php' );
|
35 |
|
36 |
// check PHP version
|
37 |
-
$ure_required_php_version = '7.
|
38 |
$exit_msg = 'User Role Editor requires PHP '. $ure_required_php_version .' or newer. '.
|
39 |
-
'<a href="
|
40 |
-
URE_Lib::check_version( PHP_VERSION, $ure_required_php_version, $exit_msg, __FILE__ )
|
|
|
|
|
41 |
|
42 |
// check WP version
|
43 |
$ure_required_wp_version = '4.4';
|
44 |
$exit_msg = 'User Role Editor requires WordPress '. $ure_required_wp_version .' or newer. '.
|
45 |
'<a href="http://codex.wordpress.org/Upgrading_WordPress">Please update!</a>';
|
46 |
-
URE_Lib::check_version( get_bloginfo( 'version' ), $ure_required_wp_version, $exit_msg, __FILE__ )
|
|
|
|
|
47 |
|
48 |
require_once( URE_PLUGIN_DIR .'includes/loader.php' );
|
49 |
|
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.61.1
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.com
|
9 |
Text Domain: user-role-editor
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
+
Copyright 2010-2022 Vladimir Garagulya (email: support@role-editor.com)
|
15 |
*/
|
16 |
|
17 |
if ( ! function_exists( 'get_option' ) ) {
|
19 |
die; // Silence is golden, direct call is prohibited
|
20 |
}
|
21 |
|
22 |
+
if ( defined( 'URE_VERSION' ) ) {
|
23 |
+
if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
|
24 |
+
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
25 |
+
deactivate_plugins( __FILE__ );
|
26 |
+
if ( !class_exists('URE_Admin_Notice') ) {
|
27 |
+
require_once( plugin_dir_path( __FILE__ ) .'includes/classes/admin-notice.php' );
|
28 |
+
}
|
29 |
+
new URE_Admin_Notice('warning', "It seems that other copy of User Role Editor is active. Check if it's deactivated before activate this one.");
|
30 |
+
}
|
31 |
+
return;
|
32 |
}
|
33 |
|
34 |
+
define( 'URE_VERSION', '4.61.1' );
|
35 |
define( 'URE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
36 |
define( 'URE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
37 |
define( 'URE_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
38 |
define( 'URE_PLUGIN_FILE', basename( __FILE__ ) );
|
39 |
define( 'URE_PLUGIN_FULL_PATH', __FILE__ );
|
40 |
|
41 |
+
require_once( URE_PLUGIN_DIR .'includes/classes/admin-notice.php' );
|
42 |
require_once( URE_PLUGIN_DIR.'includes/classes/base-lib.php' );
|
43 |
require_once( URE_PLUGIN_DIR.'includes/classes/lib.php' );
|
44 |
|
45 |
// check PHP version
|
46 |
+
$ure_required_php_version = '7.3';
|
47 |
$exit_msg = 'User Role Editor requires PHP '. $ure_required_php_version .' or newer. '.
|
48 |
+
'<a href="https://www.php.net/supported-versions.php">Please update!</a>';
|
49 |
+
if ( !URE_Lib::check_version( PHP_VERSION, $ure_required_php_version, $exit_msg, __FILE__ ) ) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
|
53 |
// check WP version
|
54 |
$ure_required_wp_version = '4.4';
|
55 |
$exit_msg = 'User Role Editor requires WordPress '. $ure_required_wp_version .' or newer. '.
|
56 |
'<a href="http://codex.wordpress.org/Upgrading_WordPress">Please update!</a>';
|
57 |
+
if ( !URE_Lib::check_version( get_bloginfo( 'version' ), $ure_required_wp_version, $exit_msg, __FILE__ ) ) {
|
58 |
+
return;
|
59 |
+
}
|
60 |
|
61 |
require_once( URE_PLUGIN_DIR .'includes/loader.php' );
|
62 |
|