User Role Editor - Version 4.20.1

Version Description

Download this release

Release Info

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

Code changes from version 4.20 to 4.20.1

includes/class-ure-lib.php CHANGED
@@ -2588,10 +2588,11 @@ if ($this->multisite && !is_network_admin()) {
2588
  // end of show_admin_role()
2589
 
2590
 
2591
- private function role_default_prepare_html($select_width=200) {
2592
-
2593
- if (!$this->multisite || is_network_admin()) {
2594
- return;
 
2595
  }
2596
 
2597
  $caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0);
@@ -2664,7 +2665,9 @@ if ($this->multisite && !is_network_admin()) {
2664
  public function role_edit_prepare_html($select_width=200) {
2665
 
2666
  $this->role_select_copy_prepare_html($select_width);
2667
- $this->role_default_prepare_html($select_width);
 
 
2668
  $this->role_delete_prepare_html();
2669
  $this->caps_to_remove_prepare_html();
2670
  }
2588
  // end of show_admin_role()
2589
 
2590
 
2591
+ public function role_default_prepare_html($select_width=200) {
2592
+
2593
+ if (!isset($this->roles) || !$this->roles) {
2594
+ // get roles data from database
2595
+ $this->roles = $this->get_user_roles();
2596
  }
2597
 
2598
  $caps_access_restrict_for_simple_admin = $this->get_option('caps_access_restrict_for_simple_admin', 0);
2665
  public function role_edit_prepare_html($select_width=200) {
2666
 
2667
  $this->role_select_copy_prepare_html($select_width);
2668
+ if ($this->multisite && !is_network_admin()) {
2669
+ $this->role_default_prepare_html($select_width);
2670
+ }
2671
  $this->role_delete_prepare_html();
2672
  $this->caps_to_remove_prepare_html();
2673
  }
includes/class-user-role-editor.php CHANGED
@@ -673,8 +673,8 @@ class User_Role_Editor {
673
  }
674
 
675
  $this->lib->get_default_role();
676
- $this->lib->editor_init1();
677
- $this->lib->role_edit_prepare_html(0);
678
 
679
  $ure_tab_idx = $this->lib->get_request_var('ure_tab_idx', 'int');
680
 
673
  }
674
 
675
  $this->lib->get_default_role();
676
+ //$this->lib->editor_init1();
677
+ $this->lib->role_default_prepare_html(0);
678
 
679
  $ure_tab_idx = $this->lib->get_request_var('ure_tab_idx', 'int');
680
 
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.4
7
- Stable tag: 4.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -76,9 +76,11 @@ If you wish to check available translations or help with translation visit this
76
  https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
77
 
78
  == Changelog ==
 
 
79
 
80
- = [4.20] 16.11.2015 =
81
- * "Additional options" section was added to the user role editor page. Currently it contains the only "Hide admin bar". The list of options may be customized/extended by developers via [ure_role_additonal_options](https://www.role-editor.com/documentation/ure-role-additional-options/) filter.
82
  * "Default Role" button is hidden to not duplicate functionality. Use "Settings - User Role Editor - Default Roles" tab instead. This button is available only for the single sites of WP multisite now.
83
  * Code restructure, optimization: administrator protection parts extracted to the separate class.
84
 
4
  Tags: user, role, editor, security, access, permission, capability
5
  Requires at least: 4.0
6
  Tested up to: 4.4
7
+ Stable tag: 4.20.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
76
  https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
77
 
78
  == Changelog ==
79
+ = [4.20.1] 15.11.2015 =
80
+ * Fix: "Primary default role" drop-down menu was not shown at "Settings - User Role Editor - Default Roles" tab for WordPress single site installation.
81
 
82
+ = [4.20] 15.11.2015 =
83
+ * "Additional options" section was added to the user role editor page. Currently it contains the only "Hide admin bar". The list of options may be customized/extended by developers via "ure_role_additonal_options" filter.
84
  * "Default Role" button is hidden to not duplicate functionality. Use "Settings - User Role Editor - Default Roles" tab instead. This button is available only for the single sites of WP multisite now.
85
  * Code restructure, optimization: administrator protection parts extracted to the separate class.
86
 
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.20
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.20.b2');
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.20.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.20.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__));