User Role Editor - Version 4.32.1

Version Description

Download this release

Release Info

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

Code changes from version 4.32 to 4.32.1

Files changed (3) hide show
  1. js/users-grant-roles.js +26 -2
  2. readme.txt +3 -1
  3. user-role-editor.php +2 -2
js/users-grant-roles.js CHANGED
@@ -63,6 +63,30 @@ function ure_grant_roles() {
63
  return true;
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  function ure_page_reload(response) {
67
 
68
  if (response.result=='error') {
@@ -71,6 +95,6 @@ function ure_page_reload(response) {
71
  return;
72
  }
73
 
74
- document.location = window.location.href +'&update=promote' ;
75
-
76
  }
63
  return true;
64
  }
65
 
66
+
67
+ function ure_set_url_arg(arg_name, arg_value) {
68
+ var url = window.location.href;
69
+ var hash = location.hash;
70
+ url = url.replace(hash, '');
71
+ if (url.indexOf(arg_name + "=")>=0) {
72
+ var prefix = url.substring(0, url.indexOf(arg_name));
73
+ var suffix = url.substring(url.indexOf(arg_name));
74
+ suffix = suffix.substring(suffix.indexOf("=") + 1);
75
+ suffix = (suffix.indexOf("&") >= 0) ? suffix.substring(suffix.indexOf("&")) : "";
76
+ url = prefix + arg_name + "=" + arg_value + suffix;
77
+ } else {
78
+ if (url.indexOf("?") < 0) {
79
+ url += "?" + arg_name + "=" + arg_value;
80
+ } else {
81
+ url += "&" + arg_name + "=" + arg_value;
82
+ }
83
+ }
84
+ url = url + hash;
85
+
86
+ return url;
87
+ }
88
+
89
+
90
  function ure_page_reload(response) {
91
 
92
  if (response.result=='error') {
95
  return;
96
  }
97
 
98
+ var url = ure_set_url_arg('update', 'promote');
99
+ document.location = url;
100
  }
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: 4.7.3
7
- Stable tag: 4.32
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -78,6 +78,8 @@ https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
78
 
79
 
80
  == Changelog ==
 
 
81
 
82
  = [4.32] 09.03.2017 =
83
  * New: Button "Grant Roles" allows to "Assign multiple roles to the selected users" directly from the "Users" page.
4
  Tags: user, role, editor, security, access, permission, capability
5
  Requires at least: 4.0
6
  Tested up to: 4.7.3
7
+ Stable tag: 4.32.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
78
 
79
 
80
  == Changelog ==
81
+ = [4.32.1] 09.03.2017 =
82
+ * Fix: URL to users.php page was built incorrectly after bulk roles assignment to the users selected at the 1st page of a users list.
83
 
84
  = [4.32] 09.03.2017 =
85
  * New: Button "Grant Roles" allows to "Assign multiple roles to the selected users" directly from the "Users" page.
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.32
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.32');
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.32.1
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.32.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__));