- fixed add/edit user/profile UM section at backend;

- fixed submit of profile/registration page at frontend with user roles;
- fixed notifications about change role;
This commit is contained in:
nikitozzzzzzz
2017-11-06 15:28:07 +02:00
parent 90c2063dbf
commit 1be33b1c4a
6 changed files with 128 additions and 62 deletions
+7 -1
View File
@@ -542,7 +542,13 @@ if ( ! class_exists( 'Builtin' ) ) {
***/
function set_predefined_fields() {
$um_roles = UM()->roles()->get_roles( false, array( 'admin' ) );
global $wp_roles;
$role_keys = array_map( function( $item ) {
return 'um_' . $item;
}, get_option( 'um_roles' ) );
$exclude_roles = array_diff( array_keys( $wp_roles->roles ), array_merge( $role_keys, array( 'subscriber' ) ) );
$um_roles = UM()->roles()->get_roles( false, $exclude_roles );
$profile_privacy = apply_filters('um_profile_privacy_options', array( __('Everyone','ultimate-member'), __('Only me','ultimate-member') ) );