User Role Editor - Version 4.23.2

Version Description

Download this release

Release Info

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

Code changes from version 4.23.1 to 4.23.2

includes/class-user-role-editor.php CHANGED
@@ -28,7 +28,10 @@ class User_Role_Editor {
28
  */
29
  public function __construct() {
30
 
31
- $this->lib = Ure_Lib::get_instance();
 
 
 
32
  $this->user_other_roles = new URE_User_Other_Roles($this->lib);
33
 
34
  if ($this->lib->is_pro()) {
28
  */
29
  public function __construct() {
30
 
31
+ if (empty($this->lib)) {
32
+ $this->lib = URE_Lib::get_instance('user_role_editor');
33
+ }
34
+
35
  $this->user_other_roles = new URE_User_Other_Roles($this->lib);
36
 
37
  if ($this->lib->is_pro()) {
includes/classes/base-lib.php CHANGED
@@ -11,7 +11,7 @@
11
  /**
12
  * This class contains general stuff for usage at WordPress plugins and must be extended by child class
13
  */
14
- abstract class URE_Base_Lib {
15
 
16
  protected static $instance = null; // object exemplar reference
17
  protected $options_id = ''; // identifire to save/retrieve plugin options to/from wp_option DB table
@@ -22,7 +22,14 @@ abstract class URE_Base_Lib {
22
  protected $main_blog_id = 0;
23
 
24
 
25
- abstract public static function get_instance($options_id = '');
 
 
 
 
 
 
 
26
 
27
  /**
28
  * Every child class should override get_instance() method with its own version for compatibility purpose.
11
  /**
12
  * This class contains general stuff for usage at WordPress plugins and must be extended by child class
13
  */
14
+ class URE_Base_Lib {
15
 
16
  protected static $instance = null; // object exemplar reference
17
  protected $options_id = ''; // identifire to save/retrieve plugin options to/from wp_option DB table
22
  protected $main_blog_id = 0;
23
 
24
 
25
+ public static function get_instance($options_id = '') {
26
+ if (self::$instance===null) {
27
+ self::$instance = new URE_Base_Lib($options_id);
28
+ }
29
+
30
+ return self::$instance;
31
+ }
32
+ // end of get_instance()
33
 
34
  /**
35
  * Every child class should override get_instance() method with its own version for compatibility purpose.
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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&currency_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.4.1
7
- Stable tag: 4.23.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -76,7 +76,10 @@ If you wish to check available translations or help with plugin translation to y
76
  https://translate.wordpress.org/projects/wp-plugins/user-role-editor/
77
 
78
  == Changelog ==
79
- = [4.23.1] 02.02.2016 =
 
 
 
80
  * Fix: 'get_called_class()' function call was excluded for the compatibility with PHP 5.2.*
81
  * Fix: ure-users.js was loaded not only to the 'Users' page.
82
 
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&currency_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.4.2
7
+ Stable tag: 4.23.2
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.23.2] 03.02.2016 =
80
+ * Fix: PHP warning "Strict Standards: Static function URE_Base_Lib::get_instance() should not be abstract" was generated
81
+
82
+ = [4.23.1] 01.02.2016 =
83
  * Fix: 'get_called_class()' function call was excluded for the compatibility with PHP 5.2.*
84
  * Fix: ure-users.js was loaded not only to the 'Users' page.
85
 
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.23.1
7
  Author: Vladimir Garagulya
8
  Author URI: https://www.role-editor.com
9
  Text Domain: ure
@@ -11,7 +11,7 @@ Domain Path: /lang/
11
  */
12
 
13
  /*
14
- Copyright 2010-2015 Vladimir Garagulya (email: support@role-editor.com)
15
  */
16
 
17
  if (!function_exists('get_option')) {
@@ -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.23.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__));
@@ -47,5 +47,4 @@ Ure_Lib::check_version(get_bloginfo('version'), $ure_required_wp_version, $exit_
47
 
48
  require_once(URE_PLUGIN_DIR .'includes/loader.php');
49
 
50
- $ure_lib = Ure_Lib::get_instance('user_role_editor');
51
  $GLOBALS['user_role_editor'] = new User_Role_Editor();
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.23.2
7
  Author: Vladimir Garagulya
8
  Author URI: https://www.role-editor.com
9
  Text Domain: ure
11
  */
12
 
13
  /*
14
+ Copyright 2010-2016 Vladimir Garagulya (email: support@role-editor.com)
15
  */
16
 
17
  if (!function_exists('get_option')) {
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.23.2');
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__));
47
 
48
  require_once(URE_PLUGIN_DIR .'includes/loader.php');
49
 
 
50
  $GLOBALS['user_role_editor'] = new User_Role_Editor();