Version Description
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.23.1 |
Comparing to | |
See all releases |
Code changes from version 4.23 to 4.23.1
- includes/class-user-role-editor.php +7 -0
- includes/classes/base-lib.php +12 -3
- includes/classes/task-queue.php +3 -5
- includes/classes/ure-lib.php +15 -0
- readme.txt +4 -1
- user-role-editor.php +2 -2
includes/class-user-role-editor.php
CHANGED
@@ -220,6 +220,10 @@ class User_Role_Editor {
|
|
220 |
if ( stripos($_SERVER['REQUEST_URI'], 'wp-admin/users.php')===false ) {
|
221 |
return;
|
222 |
}
|
|
|
|
|
|
|
|
|
223 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
224 |
wp_enqueue_style('ure-admin-css', URE_PLUGIN_URL . 'css/ure-admin.css', array(), false, 'screen');
|
225 |
|
@@ -231,6 +235,9 @@ class User_Role_Editor {
|
|
231 |
|
232 |
if ( stripos($_SERVER['REQUEST_URI'], 'wp-admin/users.php')===false ) {
|
233 |
return;
|
|
|
|
|
|
|
234 |
}
|
235 |
|
236 |
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core','jquery-ui-button', 'jquery') );
|
220 |
if ( stripos($_SERVER['REQUEST_URI'], 'wp-admin/users.php')===false ) {
|
221 |
return;
|
222 |
}
|
223 |
+
if (isset($_GET['page'])) {
|
224 |
+
return;
|
225 |
+
}
|
226 |
+
|
227 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
228 |
wp_enqueue_style('ure-admin-css', URE_PLUGIN_URL . 'css/ure-admin.css', array(), false, 'screen');
|
229 |
|
235 |
|
236 |
if ( stripos($_SERVER['REQUEST_URI'], 'wp-admin/users.php')===false ) {
|
237 |
return;
|
238 |
+
}
|
239 |
+
if (isset($_GET['page'])) {
|
240 |
+
return;
|
241 |
}
|
242 |
|
243 |
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core','jquery-ui-button', 'jquery') );
|
includes/classes/base-lib.php
CHANGED
@@ -9,11 +9,11 @@
|
|
9 |
*/
|
10 |
|
11 |
/**
|
12 |
-
* This class contains general stuff for usage at WordPress plugins
|
13 |
*/
|
14 |
-
class URE_Base_Lib {
|
15 |
|
16 |
-
|
17 |
protected $options_id = ''; // identifire to save/retrieve plugin options to/from wp_option DB table
|
18 |
protected $options = array(); // plugin options data
|
19 |
public $multisite = false;
|
@@ -22,6 +22,13 @@ class URE_Base_Lib {
|
|
22 |
protected $main_blog_id = 0;
|
23 |
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
public static function get_instance($options_id = '') {
|
26 |
|
27 |
$class = get_called_class();
|
@@ -36,6 +43,8 @@ class URE_Base_Lib {
|
|
36 |
return self::$instance;
|
37 |
}
|
38 |
// end of get_instance()
|
|
|
|
|
39 |
|
40 |
|
41 |
/**
|
9 |
*/
|
10 |
|
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
|
18 |
protected $options = array(); // plugin options data
|
19 |
public $multisite = false;
|
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.
|
29 |
+
* We do not use the only get_instance() method at the base class for the compatibility with PHP 5.2,
|
30 |
+
* as get_called_class() function and 'late static binding' is available for PHP 5.3+ only.
|
31 |
+
*
|
32 |
public static function get_instance($options_id = '') {
|
33 |
|
34 |
$class = get_called_class();
|
43 |
return self::$instance;
|
44 |
}
|
45 |
// end of get_instance()
|
46 |
+
|
47 |
+
**/
|
48 |
|
49 |
|
50 |
/**
|
includes/classes/task-queue.php
CHANGED
@@ -26,11 +26,9 @@ class URE_Task_Queue {
|
|
26 |
|
27 |
|
28 |
public static function get_instance() {
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
// new static() will work too
|
33 |
-
self::$instance = new $class();
|
34 |
}
|
35 |
|
36 |
return self::$instance;
|
26 |
|
27 |
|
28 |
public static function get_instance() {
|
29 |
+
|
30 |
+
if (self::$instance===null) {
|
31 |
+
self::$instance = new URE_Task_Queue();
|
|
|
|
|
32 |
}
|
33 |
|
34 |
return self::$instance;
|
includes/classes/ure-lib.php
CHANGED
@@ -63,6 +63,21 @@ class Ure_Lib extends URE_Base_Lib {
|
|
63 |
// end of __construct()
|
64 |
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
protected function upgrade() {
|
67 |
|
68 |
$ure_version = $this->get_option('ure_version', '0');
|
63 |
// end of __construct()
|
64 |
|
65 |
|
66 |
+
public static function get_instance($options_id = '') {
|
67 |
+
|
68 |
+
if (self::$instance === null) {
|
69 |
+
if (empty($options_id)) {
|
70 |
+
throw new Exception('URE_Lib::get_inctance() - Error: plugin options ID string is required');
|
71 |
+
}
|
72 |
+
// new static() will work too
|
73 |
+
self::$instance = new URE_Lib($options_id);
|
74 |
+
}
|
75 |
+
|
76 |
+
return self::$instance;
|
77 |
+
}
|
78 |
+
// end of get_instance()
|
79 |
+
|
80 |
+
|
81 |
protected function upgrade() {
|
82 |
|
83 |
$ure_version = $this->get_option('ure_version', '0');
|
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.1
|
7 |
-
Stable tag: 4.23
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -76,6 +76,9 @@ 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 |
|
80 |
= [4.23] 31.01.2016 =
|
81 |
* Fix: "Users - Without Role" button showed empty roles drop down list on the 1st call.
|
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 |
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 |
|
83 |
= [4.23] 31.01.2016 =
|
84 |
* Fix: "Users - Without Role" button showed empty roles drop down list on the 1st call.
|
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
|
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.23');
|
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.23.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.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__));
|