Version Description
- 18.07.2014
- The instance of main plugin class User_Role_Editor is available for other developers now via $GLOBALS['user_role_editor']
- Compatibility issue with the theme "WD TechGoStore" is resolved. This theme loads its JS and CSS stuff for admin backend uncoditionally - for all pages. While the problem is caused just by CSS URE unloads all this theme JS and CSS for optimizaiton purpose for WP admin backend pages where conflict is possible.
Download this release
Release Info
Developer | shinephp |
Plugin | User Role Editor |
Version | 4.14.2 |
Comparing to | |
See all releases |
Code changes from version 4.14.1 to 4.14.2
- includes/class-user-role-editor.php +60 -22
- readme.txt +7 -2
- user-role-editor.php +3 -3
includes/class-user-role-editor.php
CHANGED
@@ -16,11 +16,19 @@ class User_Role_Editor {
|
|
16 |
// URE's key capability
|
17 |
public $key_capability = 'not allowed';
|
18 |
|
|
|
|
|
|
|
19 |
/**
|
20 |
* class constructor
|
21 |
*/
|
22 |
-
function __construct($library)
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
// activation action
|
26 |
register_activation_hook(URE_PLUGIN_FULL_PATH, array($this, 'setup'));
|
@@ -170,6 +178,8 @@ class User_Role_Editor {
|
|
170 |
wp_enqueue_style('ure-admin-css', URE_PLUGIN_URL . 'css/ure-admin.css', array(), false, 'screen');
|
171 |
|
172 |
}
|
|
|
|
|
173 |
|
174 |
public function add_js_to_users_page() {
|
175 |
|
@@ -795,35 +805,62 @@ class User_Role_Editor {
|
|
795 |
|
796 |
}
|
797 |
|
798 |
-
/**
|
799 |
-
|
800 |
-
|
801 |
-
function setup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
802 |
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
|
808 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
|
810 |
-
|
811 |
-
}
|
812 |
-
// end of setup()
|
813 |
|
814 |
-
|
815 |
* Load plugin javascript stuff
|
816 |
*
|
817 |
* @param string $hook_suffix
|
818 |
*/
|
819 |
public function admin_load_js($hook_suffix){
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
} else {
|
824 |
-
$ure_hook_suffixes = array('settings_page_settings-user-role-editor', 'users_page_users-user-role-editor');
|
825 |
-
}
|
826 |
-
if (in_array($hook_suffix, $ure_hook_suffixes)) {
|
827 |
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core','jquery-ui-button', 'jquery') );
|
828 |
wp_enqueue_script('jquery-ui-tabs', false, array('jquery-ui-core', 'jquery') );
|
829 |
wp_register_script( 'ure-js', plugins_url( '/js/ure-js.js', URE_PLUGIN_FULL_PATH ) );
|
@@ -861,6 +898,7 @@ function setup() {
|
|
861 |
) );
|
862 |
// load additional JS stuff for Pro version, if exists
|
863 |
do_action('ure_load_js');
|
|
|
864 |
}
|
865 |
|
866 |
}
|
16 |
// URE's key capability
|
17 |
public $key_capability = 'not allowed';
|
18 |
|
19 |
+
// URE pages hook suffixes
|
20 |
+
protected $ure_hook_suffixes = null;
|
21 |
+
|
22 |
/**
|
23 |
* class constructor
|
24 |
*/
|
25 |
+
function __construct($library) {
|
26 |
+
|
27 |
+
if (class_exists('User_Role_Editor_Pro')) {
|
28 |
+
$this->ure_hook_suffixes = array('settings_page_settings-user-role-editor-pro', 'users_page_users-user-role-editor-pro');
|
29 |
+
} else {
|
30 |
+
$this->ure_hook_suffixes = array('settings_page_settings-user-role-editor', 'users_page_users-user-role-editor');
|
31 |
+
}
|
32 |
|
33 |
// activation action
|
34 |
register_activation_hook(URE_PLUGIN_FULL_PATH, array($this, 'setup'));
|
178 |
wp_enqueue_style('ure-admin-css', URE_PLUGIN_URL . 'css/ure-admin.css', array(), false, 'screen');
|
179 |
|
180 |
}
|
181 |
+
// end of add_css_to_users_page()
|
182 |
+
|
183 |
|
184 |
public function add_js_to_users_page() {
|
185 |
|
805 |
|
806 |
}
|
807 |
|
808 |
+
/**
|
809 |
+
* execute on plugin activation
|
810 |
+
*/
|
811 |
+
function setup() {
|
812 |
+
|
813 |
+
$this->convert_option('ure_caps_readable');
|
814 |
+
$this->convert_option('ure_show_deprecated_caps');
|
815 |
+
$this->convert_option('ure_hide_pro_banner');
|
816 |
+
$this->lib->flush_options();
|
817 |
+
|
818 |
+
$this->lib->make_roles_backup();
|
819 |
|
820 |
+
do_action('ure_activation');
|
821 |
+
|
822 |
+
}
|
823 |
+
// end of setup()
|
824 |
|
825 |
+
|
826 |
+
/**
|
827 |
+
* Unload WP TechGoStore theme JS and CSS to exclude compatibility issues with URE
|
828 |
+
*/
|
829 |
+
protected function unload_techgostore($hook_suffix) {
|
830 |
+
|
831 |
+
if (!defined('THEME_SLUG') || THEME_SLUG!=='techgo_') {
|
832 |
+
return;
|
833 |
+
}
|
834 |
+
|
835 |
+
if ( !in_array($hook_suffix, $this->ure_hook_suffixes) && !in_array($hook_suffix, array('users.php', 'profile.php')) ) {
|
836 |
+
return;
|
837 |
+
}
|
838 |
+
wp_deregister_script('jqueryform');
|
839 |
+
wp_deregister_script('tab');
|
840 |
+
wp_deregister_script('shortcode_js');
|
841 |
+
wp_deregister_script('fancybox_js');
|
842 |
+
wp_deregister_script('bootstrap-colorpicker');
|
843 |
+
wp_deregister_script('logo_upload');
|
844 |
+
wp_deregister_script('js_wd_menu_backend');
|
845 |
+
|
846 |
+
wp_deregister_style('config_css');
|
847 |
+
wp_deregister_style('fancybox_css');
|
848 |
+
wp_deregister_style('colorpicker');
|
849 |
+
wp_deregister_style('font-awesome');
|
850 |
+
wp_deregister_style('css_wd_menu_backend');
|
851 |
+
}
|
852 |
|
853 |
+
// end of unload_techgostore()
|
|
|
|
|
854 |
|
855 |
+
/**
|
856 |
* Load plugin javascript stuff
|
857 |
*
|
858 |
* @param string $hook_suffix
|
859 |
*/
|
860 |
public function admin_load_js($hook_suffix){
|
861 |
+
|
862 |
+
$this->unload_techgostore($hook_suffix);
|
863 |
+
if (in_array($hook_suffix, $this->ure_hook_suffixes)) {
|
|
|
|
|
|
|
|
|
864 |
wp_enqueue_script('jquery-ui-dialog', false, array('jquery-ui-core','jquery-ui-button', 'jquery') );
|
865 |
wp_enqueue_script('jquery-ui-tabs', false, array('jquery-ui-core', 'jquery') );
|
866 |
wp_register_script( 'ure-js', plugins_url( '/js/ure-js.js', URE_PLUGIN_FULL_PATH ) );
|
898 |
) );
|
899 |
// load additional JS stuff for Pro version, if exists
|
900 |
do_action('ure_load_js');
|
901 |
+
|
902 |
}
|
903 |
|
904 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: user, role, editor, security, access, permission, capability
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to:
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -83,8 +83,13 @@ Share with me new ideas about plugin further development and link to your site w
|
|
83 |
|
84 |
|
85 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
86 |
= 4.14.1 =
|
87 |
-
*
|
88 |
* MySQL query optimizing to reduce memory consumption. Thanks to [SebastiaanO](http://wordpress.org/support/topic/allowed-memory-size-exhausted-fixed).
|
89 |
* Extra WordPress nonce field was removed from the post at main role editor page to exclude nonce duplication.
|
90 |
* Minor code enhancements.
|
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¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
Tags: user, role, editor, security, access, permission, capability
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.0
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
83 |
|
84 |
|
85 |
== Changelog ==
|
86 |
+
= 4.14.2 =
|
87 |
+
* 18.07.2014
|
88 |
+
* The instance of main plugin class User_Role_Editor is available for other developers now via $GLOBALS['user_role_editor']
|
89 |
+
* Compatibility issue with the theme ["WD TechGoStore"](http://wpdance.com) is resolved. This theme loads its JS and CSS stuff for admin backend uncoditionally - for all pages. While the problem is caused just by CSS URE unloads all this theme JS and CSS for optimizaiton purpose for WP admin backend pages where conflict is possible.
|
90 |
+
|
91 |
= 4.14.1 =
|
92 |
+
* 13.06.2014
|
93 |
* MySQL query optimizing to reduce memory consumption. Thanks to [SebastiaanO](http://wordpress.org/support/topic/allowed-memory-size-exhausted-fixed).
|
94 |
* Extra WordPress nonce field was removed from the post at main role editor page to exclude nonce duplication.
|
95 |
* Minor code enhancements.
|
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.14.
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: http://www.shinephp.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.14.
|
27 |
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
28 |
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
29 |
define('URE_PLUGIN_FILE', basename(__FILE__));
|
@@ -53,4 +53,4 @@ require_once( URE_PLUGIN_DIR .'includes/class-user-role-editor.php');
|
|
53 |
|
54 |
|
55 |
$ure_lib = new Ure_Lib('user_role_editor');
|
56 |
-
new User_Role_Editor($ure_lib);
|
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.14.2
|
7 |
Author: Vladimir Garagulya
|
8 |
Author URI: http://www.shinephp.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.14.2');
|
27 |
define('URE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
28 |
define('URE_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
29 |
define('URE_PLUGIN_FILE', basename(__FILE__));
|
53 |
|
54 |
|
55 |
$ure_lib = new Ure_Lib('user_role_editor');
|
56 |
+
$GLOBALS['user_role_editor'] = new User_Role_Editor($ure_lib);
|