User Role Editor - Version 4.4

Version Description

  • 15.08.2013 *
  • Pro version only: Users of "Gravity Forms" plugin may restrict users access to the Forms on per form basis. Activate this option at URE Settings page and input at user's profile the list of Gravity Forms IDs, to which you allow access for this user. User should have at least 'gravityforms_edit_forms' capability in order you see GF access control option at his profile.
  • Pro version: User Role Editor license key is not shown now on the Setting page. User sees just word "Installed" after he saved it.
  • Bug fixed which prevented creation of current roles backup record during User Role Editor plugin installation and produced unexpected output (PHP notices).
Download this release

Release Info

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

Code changes from version 4.3 to 4.4

includes/class-ure-lib.php CHANGED
@@ -744,8 +744,12 @@ class Ure_Lib extends Garvs_WP_Lib {
744
  return false;
745
  }
746
  if (!$option_id) {
747
- // create user roles record backup
748
- $serialized_roles = mysql_real_escape_string(serialize($this->lib->roles));
 
 
 
 
749
  $query = "insert into $wpdb->options
750
  (option_name, option_value, autoload)
751
  values ('$backup_option_name', '$serialized_roles', 'no')";
744
  return false;
745
  }
746
  if (!$option_id) {
747
+ $roles_option_name = $wpdb->prefix.'user_roles';
748
+ $query = "select option_value
749
+ from $wpdb->options
750
+ where option_name like '$roles_option_name' limit 0,1";
751
+ $serialized_roles = $wpdb->get_var($query);
752
+ // create user roles record backup
753
  $query = "insert into $wpdb->options
754
  (option_name, option_value, autoload)
755
  values ('$backup_option_name', '$serialized_roles', 'no')";
includes/class-user-role-editor.php CHANGED
@@ -719,6 +719,7 @@ class User_Role_Editor {
719
  }
720
  }
721
  }
 
722
  }
723
  // update_user_profile()
724
 
719
  }
720
  }
721
  }
722
+
723
  }
724
  // update_user_profile()
725
 
includes/misc-support-stuff.php CHANGED
@@ -10,12 +10,12 @@
10
  *
11
  */
12
 
13
- // Support for Gravity Form capabilities
 
14
  // As Gravity Form has integrated support for the Members plugin - let's imitate its presense,
15
  // so GF code, like
16
  // self::has_members_plugin())
17
- // considers that is has members_plugin()
18
- if (class_exists('GFForms') ) { // if Gravity Forms is installed
19
  if (!function_exists('members_get_capabilities')) {
20
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
21
  if (!is_plugin_active('members/members.php')) {
10
  *
11
  */
12
 
13
+ if (class_exists('GFForms') ) { // if Gravity Forms is installed
14
+ // Support for Gravity Forms capabilities
15
  // As Gravity Form has integrated support for the Members plugin - let's imitate its presense,
16
  // so GF code, like
17
  // self::has_members_plugin())
18
+ // considers that it is has_members_plugin()
 
19
  if (!function_exists('members_get_capabilities')) {
20
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
21
  if (!is_plugin_active('members/members.php')) {
includes/settings-template.php CHANGED
@@ -16,7 +16,7 @@
16
  <hr/>
17
 
18
  <form method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE;?>" >
19
- <table>
20
  <tr>
21
  <td><label for="show_admin_role"><?php esc_html_e('Show Administrator role at User Role Editor:', 'ure'); ?></label></td>
22
  <td><input type="checkbox" name="show_admin_role" id="show_admin_role" value="1"
16
  <hr/>
17
 
18
  <form method="post" action="<?php echo $link; ?>?page=settings-<?php echo URE_PLUGIN_FILE;?>" >
19
+ <table id="ure_settings">
20
  <tr>
21
  <td><label for="show_admin_role"><?php esc_html_e('Show Administrator role at User Role Editor:', 'ure'); ?></label></td>
22
  <td><input type="checkbox" name="show_admin_role" id="show_admin_role" value="1"
readme.txt CHANGED
@@ -21,8 +21,13 @@ Multi-site support is provided.
21
 
22
  Do you need more functionality with quality support in real time? Do you not like advertisement at User Role Editor pages?
23
  Buy [Pro version](htpp://role-editor.com).
24
- Pro version is advertisement free. Pro version includes the "Export/Import" module. You can export user roles to the local file and import them then
25
- to any WordPress site or other sites of the multi-site WordPress network. More functionality modules will follow for Pro version.
 
 
 
 
 
26
  Premium support is included. Premium support is provided by User Role Editor plugin author Vladimir Garagulya. You will get an answer on your question not once a week or never, but in 24 hours.
27
 
28
  To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](http://shinephp.com)
@@ -43,6 +48,7 @@ Installation procedure:
43
  - Does it work with WordPress in multi-site environment?
44
  Yes, it works with WordPress multi-site. By default plugin works for every blog from your multi-site network as for locally installed blog.
45
  To update selected role globally for the Network you should turn on the "Apply to All Sites" checkbox. You should have superadmin privileges to use User Role Editor under WordPress multi-site.
 
46
 
47
  To read full FAQ section visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/#faq) at [shinephp.com](shinephp.com).
48
 
@@ -68,6 +74,12 @@ Share with me new ideas about plugin further development and link to your site w
68
 
69
  == Changelog ==
70
 
 
 
 
 
 
 
71
  = 4.3 =
72
  * 12.08.2013
73
  * Pro version only: "User Role Editor" is available under the "Users" submenu of "Network Admin" for multisite installation.
21
 
22
  Do you need more functionality with quality support in real time? Do you not like advertisement at User Role Editor pages?
23
  Buy [Pro version](htpp://role-editor.com).
24
+ Pro version is advertisement free. Pro version includes extra modules:
25
+ <ul>
26
+ <li>"Export/Import" module. You can export user roles to the local file and import them then</li>
27
+ to any WordPress site or other sites of the multi-site WordPress network.
28
+ <li>Roles management via Network Admin for multisite configuration.</li>
29
+ <li>Per form users access management for Gravity Forms plugin.</li>
30
+ </ul>
31
  Premium support is included. Premium support is provided by User Role Editor plugin author Vladimir Garagulya. You will get an answer on your question not once a week or never, but in 24 hours.
32
 
33
  To read more about 'User Role Editor' visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/) at [shinephp.com](http://shinephp.com)
48
  - Does it work with WordPress in multi-site environment?
49
  Yes, it works with WordPress multi-site. By default plugin works for every blog from your multi-site network as for locally installed blog.
50
  To update selected role globally for the Network you should turn on the "Apply to All Sites" checkbox. You should have superadmin privileges to use User Role Editor under WordPress multi-site.
51
+ Pro version allows to manage roles of the whole network from the Netwok Admin.
52
 
53
  To read full FAQ section visit [this page](http://www.shinephp.com/user-role-editor-wordpress-plugin/#faq) at [shinephp.com](shinephp.com).
54
 
74
 
75
  == Changelog ==
76
 
77
+ = 4.4 =
78
+ * 15.08.2013 *
79
+ * [Pro version](http://role-editor.com) only: Users of "Gravity Forms" plugin may restrict users access to the Forms on per form basis. Activate this option at URE Settings page and input at user's profile the list of Gravity Forms IDs, to which you allow access for this user. User should have at least 'gravityforms_edit_forms' capability in order you see GF access control option at his profile.
80
+ * Pro version: User Role Editor license key is not shown now on the Setting page. User sees just word "Installed" after he saved it.
81
+ * Bug fixed which prevented creation of current roles backup record during User Role Editor plugin installation and produced unexpected output (PHP notices).
82
+
83
  = 4.3 =
84
  * 12.08.2013
85
  * Pro version only: "User Role Editor" is available under the "Users" submenu of "Network Admin" for multisite installation.
user-role-editor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: User Role Editor
4
  Plugin URI: http://role-editor.com
5
  Description: Change/add/delete WordPress user roles and capabilities.
6
- Version: 4.3
7
  Author: Vladimir Garagulya
8
  Author URI: http://www.shinephp.com
9
  Text Domain: ure
@@ -41,12 +41,8 @@ Ure_Lib::check_version(get_bloginfo('version'), $ure_required_wp_version, $exit_
41
 
42
  require_once(URE_PLUGIN_DIR .'includes/define-constants.php');
43
  require_once(URE_PLUGIN_DIR .'includes/misc-support-stuff.php');
 
44
 
45
- if (!class_exists('User_Role_Editor')) {
46
- require_once( URE_PLUGIN_DIR .'includes/class-user-role-editor.php');
47
- }
48
 
49
  $ure_lib = new Ure_Lib('user-role-editor');
50
  new User_Role_Editor($ure_lib);
51
-
52
-
3
  Plugin Name: User Role Editor
4
  Plugin URI: http://role-editor.com
5
  Description: Change/add/delete WordPress user roles and capabilities.
6
+ Version: 4.4
7
  Author: Vladimir Garagulya
8
  Author URI: http://www.shinephp.com
9
  Text Domain: ure
41
 
42
  require_once(URE_PLUGIN_DIR .'includes/define-constants.php');
43
  require_once(URE_PLUGIN_DIR .'includes/misc-support-stuff.php');
44
+ require_once( URE_PLUGIN_DIR .'includes/class-user-role-editor.php');
45
 
 
 
 
46
 
47
  $ure_lib = new Ure_Lib('user-role-editor');
48
  new User_Role_Editor($ure_lib);