User Role Editor - Version 4.58.1

Version Description

Download this release

Release Info

Developer shinephp
Plugin Icon 128x128 User Role Editor
Version 4.58.1
Comparing to
See all releases

Code changes from version 4.58 to 4.58.1

changelog.txt CHANGED
@@ -1,5 +1,15 @@
1
  CHANGES LOG (full version).
2
  ===========================
 
 
 
 
 
 
 
 
 
 
3
  = [4.57.1] 10.12.2020 =
4
  * Fix: Nextgen Gallery's user capabilities were not shown as granted after current role change via roles selection dropdown list.
5
  * Fix: PHP Warning: The magic method __wakeup() must have public visibility. __wakeup() method was defined as private as a part of the Singleton design partern. Method was redefined as public but with exception inside to prevent its usage.
1
  CHANGES LOG (full version).
2
  ===========================
3
+ = [4.58.1] 11.01.2021 =
4
+ * Fix: User lost assigned role(s) after click "Update" at the user permissions page, opened via "Selected user->Capabilities" or "User Profile->Capabilities->Edit" link.
5
+
6
+ = [4.58] 11.01.2021 =
7
+ * Update: Users->User Role Editor: Update button saves changes via AJAX without full page reload.
8
+ * Fix: New user registered via frontend (wp-login.php?action=register) automatically receives additional (other) default role(s) according to selection made at User Role Editor settings "Other default roles" tab.
9
+ * Fix: "JQMIGRATE: jquery.fn.resize() event shorthand is deprecated" notice was fixed.
10
+ * Fix: "JQMIGRATE: jQuery.fn.click() event shorthand is deprecated" notice was fixed.
11
+ * Fix: "JQMIGRATE: Number-typed values are deprecated for jQuery.fn.css( (property name), value )" notice was fixed.
12
+
13
  = [4.57.1] 10.12.2020 =
14
  * Fix: Nextgen Gallery's user capabilities were not shown as granted after current role change via roles selection dropdown list.
15
  * Fix: PHP Warning: The magic method __wakeup() must have public visibility. __wakeup() method was defined as private as a part of the Singleton design partern. Method was redefined as public but with exception inside to prevent its usage.
includes/classes/editor.php CHANGED
@@ -637,7 +637,7 @@ class URE_Editor {
637
 
638
  $select_primary_role = apply_filters( 'ure_users_select_primary_role', true );
639
  if ( $select_primary_role || $this->lib->is_super_admin()) {
640
- $primary_role = $this->lib->get_request_var('primary_role', 'post');
641
  if ( empty( $primary_role ) || !isset( $wp_roles->roles[$primary_role] ) ) {
642
  $primary_role = '';
643
  }
@@ -676,7 +676,7 @@ class URE_Editor {
676
  }
677
 
678
  // add other roles to user
679
- foreach ($_POST as $key => $value) {
680
  $result = preg_match( '/^wp_role_(.+)/', $key, $match );
681
  if ( $result !== 1 ) {
682
  continue;
637
 
638
  $select_primary_role = apply_filters( 'ure_users_select_primary_role', true );
639
  if ( $select_primary_role || $this->lib->is_super_admin()) {
640
+ $primary_role = isset( $_POST['values']['primary_role'] ) ? filter_var( $_POST['values']['primary_role'], FILTER_SANITIZE_STRING ) : false;
641
  if ( empty( $primary_role ) || !isset( $wp_roles->roles[$primary_role] ) ) {
642
  $primary_role = '';
643
  }
676
  }
677
 
678
  // add other roles to user
679
+ foreach ($_POST['values'] as $key => $value) {
680
  $result = preg_match( '/^wp_role_(.+)/', $key, $match );
681
  if ( $result !== 1 ) {
682
  continue;
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: 4.0
6
  Tested up to: 5.6
7
- Stable tag: 4.58
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -80,6 +80,9 @@ https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
80
 
81
 
82
  == Changelog =
 
 
 
83
  = [4.58] 11.01.2021 =
84
  * Update: Users->User Role Editor: Update button saves changes via AJAX without full page reload.
85
  * Fix: New user registered via frontend (wp-login.php?action=register) automatically receives additional (other) default role(s) according to selection made at User Role Editor settings "Other default roles" tab.
4
  Tags: user, role, editor, security, access, permission, capability
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
+ Stable tag: 4.58.1
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
80
 
81
 
82
  == Changelog =
83
+ = [4.58.1] 11.01.2021 =
84
+ * Fix: User lost assigned role(s) after click "Update" at the user permissions page, opened via "Selected user->Capabilities" or "User Profile->Capabilities->Edit" link.
85
+
86
  = [4.58] 11.01.2021 =
87
  * Update: Users->User Role Editor: Update button saves changes via AJAX without full page reload.
88
  * Fix: New user registered via frontend (wp-login.php?action=register) automatically receives additional (other) default role(s) according to selection made at User Role Editor settings "Other default roles" tab.
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.58
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.58' );
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.58.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.58.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__ ) );