Version Description
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.40.1 |
Comparing to | |
See all releases |
Code changes from version 4.40 to 4.40.1
- includes/classes/bbpress.php +5 -1
- includes/misc-support-stuff.php +23 -0
- readme.txt +10 -6
- user-role-editor.php +3 -3
includes/classes/bbpress.php
CHANGED
@@ -25,7 +25,11 @@ class URE_bbPress {
|
|
25 |
|
26 |
|
27 |
static public function get_instance(URE_Lib $lib) {
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
return null;
|
30 |
}
|
31 |
|
25 |
|
26 |
|
27 |
static public function get_instance(URE_Lib $lib) {
|
28 |
+
|
29 |
+
if (!function_exists('is_plugin_active')) {
|
30 |
+
require_once(ABSPATH .'/wp-admin/includes/plugin.php');
|
31 |
+
}
|
32 |
+
if (!is_plugin_active('bbpress/bbpress.php')) { // bbPress plugin is not active
|
33 |
return null;
|
34 |
}
|
35 |
|
includes/misc-support-stuff.php
CHANGED
@@ -52,3 +52,26 @@ if (!function_exists('ure_hide_admin_bar')) {
|
|
52 |
}
|
53 |
// end of hide_admin_bar()
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
// end of hide_admin_bar()
|
54 |
}
|
55 |
+
|
56 |
+
|
57 |
+
if (!function_exists('wp_roles')) {
|
58 |
+
/**
|
59 |
+
* Included for back compatibility with WP 4.0+
|
60 |
+
* Retrieves the global WP_Roles instance and instantiates it if necessary.
|
61 |
+
*
|
62 |
+
* @since 4.3.0
|
63 |
+
*
|
64 |
+
* @global WP_Roles $wp_roles WP_Roles global instance.
|
65 |
+
*
|
66 |
+
* @return WP_Roles WP_Roles global instance if not already instantiated.
|
67 |
+
*/
|
68 |
+
function wp_roles() {
|
69 |
+
global $wp_roles;
|
70 |
+
|
71 |
+
if (!isset($wp_roles)) {
|
72 |
+
$wp_roles = new WP_Roles();
|
73 |
+
}
|
74 |
+
return $wp_roles;
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
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.
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 4.40
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -80,6 +80,10 @@ https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
|
|
80 |
|
81 |
== Changelog =
|
82 |
|
|
|
|
|
|
|
|
|
83 |
= [4.40] 31.01.2018 =
|
84 |
* Update: use wp_roles() function from WordPress API instead of initializing $wp_roles global variable directly.
|
85 |
* Fix: Bug was introduced by version 4.37 with users recalculation for "All" tab after excluding users with "administrator" role. Code worked incorrectly for Japanese locale.
|
@@ -106,6 +110,6 @@ You can find more information about "User Role Editor" plugin at [this page](htt
|
|
106 |
I am ready to answer on your questions about plugin usage. Use [plugin page comments](http://www.shinephp.com/user-role-editor-wordpress-plugin/) for that.
|
107 |
|
108 |
== Upgrade Notice ==
|
109 |
-
= [4.40]
|
110 |
-
* Update:
|
111 |
-
* Fix:
|
2 |
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.9.4
|
7 |
+
Stable tag: 4.40.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
80 |
|
81 |
== Changelog =
|
82 |
|
83 |
+
= [4.40.1] 09.03.2018 =
|
84 |
+
* Update: wp_roles() function (introduced with WP 4.3) was included conditionally to URE code for backward compatibility with WordPress 4.0+
|
85 |
+
* Fix: WordPress multisite: bbPress plugin detection code was changed from checking bbPress API function existence to checking WordPress active plugins list. bbPress plugin activated for the site was not available yet for the network activated User Role Editor at the point of URE instance creation. URE did not work with bbPress roles as it should by design for that reason. URE (free version) should ignore bbPress roles and capabilities as the special efforts are required for this.
|
86 |
+
|
87 |
= [4.40] 31.01.2018 =
|
88 |
* Update: use wp_roles() function from WordPress API instead of initializing $wp_roles global variable directly.
|
89 |
* Fix: Bug was introduced by version 4.37 with users recalculation for "All" tab after excluding users with "administrator" role. Code worked incorrectly for Japanese locale.
|
110 |
I am ready to answer on your questions about plugin usage. Use [plugin page comments](http://www.shinephp.com/user-role-editor-wordpress-plugin/) for that.
|
111 |
|
112 |
== Upgrade Notice ==
|
113 |
+
= [4.40.1] 09.03.2018 =
|
114 |
+
* Update: wp_roles() function (introduced with WP 4.3) was included conditionally to URE code for backward compatibility with WordPress 4.0+
|
115 |
+
* Fix: WordPress multisite: bbPress plugin detection code was changed from checking bbPress API function existence to checking WordPress active plugins list. bbPress plugin activated for the site was not available yet for the network activated User Role Editor at the point of URE instance creation. URE did not work with bbPress roles as it should by design for that reason. URE (free version) should ignore bbPress roles and capabilities as the special efforts are required for this.
|
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.40
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.com
|
9 |
Text Domain: user-role-editor
|
@@ -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.40');
|
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__));
|
@@ -40,7 +40,7 @@ $exit_msg = sprintf( 'User Role Editor requires PHP %s or newer.', $ure_required
|
|
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.
|
44 |
$exit_msg = sprintf( 'User Role Editor requires WordPress %s or newer.', $ure_required_wp_version ) .
|
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__ );
|
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.40.1
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: https://www.role-editor.com
|
9 |
Text Domain: user-role-editor
|
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.40.1');
|
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__));
|
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.0';
|
44 |
$exit_msg = sprintf( 'User Role Editor requires WordPress %s or newer.', $ure_required_wp_version ) .
|
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__ );
|