- hotfix: if roles localized as object in some installations;

- changed readme;
This commit is contained in:
nikitasinelnikov
2019-08-21 16:05:57 +03:00
parent e46e1d3d6e
commit ce0324707d
4 changed files with 15 additions and 5 deletions
@@ -1,6 +1,11 @@
jQuery( document ).ready( function() {
jQuery( '#role' ).change( function() {
if ( typeof um_roles == 'object' ) {
um_roles = Object.keys( um_roles ).map(function( key ) { return um_roles[ key ]; });
}
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
jQuery( '#um_role_selector_wrapper' ).hide();
jQuery( '#um-role' ).val('');
@@ -10,6 +15,10 @@ jQuery( document ).ready( function() {
}).trigger('change');
jQuery( '#adduser-role' ).change( function() {
if ( typeof um_roles == 'object' ) {
um_roles = Object.keys( um_roles ).map(function( key ) { return um_roles[ key ]; });
}
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
jQuery( '#um_role_existing_selector_wrapper' ).hide();
jQuery( '#um-role' ).val('');
+2 -2
View File
@@ -164,8 +164,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
*/
function load_role_wrapper() {
wp_register_script( 'um_admin_role_wrapper', $this->js_url . 'um-admin-role-wrapper.js', array( 'jquery' ), ultimatemember_version, true );
$localize_roles_data = get_option( 'um_roles' );
wp_localize_script( 'um_admin_role_wrapper', 'um_roles', $localize_roles_data );
$localize_roles_data = get_option( 'um_roles' );
wp_localize_script( 'um_admin_role_wrapper', 'um_roles', (array) $localize_roles_data );
wp_enqueue_script( 'um_admin_role_wrapper' );
}
+2 -2
View File
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Ultimate Member\n"
"POT-Creation-Date: 2019-08-20 16:27+0300\n"
"PO-Revision-Date: 2019-08-20 16:27+0300\n"
"POT-Creation-Date: 2019-08-21 16:04+0300\n"
"PO-Revision-Date: 2019-08-21 16:04+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
+2 -1
View File
@@ -140,7 +140,7 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
= 2.0.56: August 20, 2019 =
= 2.0.56: August 21, 2019 =
* Enhancements:
- Added security fixes (XSS)
@@ -160,6 +160,7 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
- Fixed is_selected method for some cases
- Fixed form settings fields for default button labels in wp-admin metaboxes
- Fixed generate metakeys for the form's custom fields
- Fixed issue when UM Roles localized as object on Add/Edit User screen
- Fixed PHP notices
= 2.0.55: August 16, 2019 =