From a82aa0c15fd2a28dcbcff375fad4953ac077de02 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Wed, 27 Jul 2016 19:36:59 +0800 Subject: [PATCH] Fix html support in biography field --- core/um-user.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/core/um-user.php b/core/um-user.php index aa0eb638..f1fef1c4 100644 --- a/core/um-user.php +++ b/core/um-user.php @@ -873,15 +873,16 @@ class UM_User { global $ultimatemember; $args['ID'] = $this->id; - $changes = apply_filters('um_before_update_profile', $changes, $this->id); + // hook for name changes + do_action('um_update_profile_full_name', $changes ); + // save or update profile meta foreach( $changes as $key => $value ) { - - if ( !in_array( $key, $this->update_user_keys ) ) { - - update_user_meta( $this->id, $key, $value ); + if ( !in_array( $key, $this->update_user_keys ) ) { + + update_user_meta( $this->id, $key, $value ); } else { @@ -890,10 +891,8 @@ class UM_User { } } - - // hook for name changes - do_action('um_update_profile_full_name', $changes ); - + + // update user if ( count( $args ) > 1 ) { wp_update_user( $args );