Fix select fields with options pair

This commit is contained in:
champsupertramp
2016-07-17 11:22:09 +08:00
parent 828b7bde1f
commit 9f8acc8377
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -30,8 +30,8 @@
}
}
}
$changes = array();
$changes = array();
foreach( $_POST as $k => $v ) {
if ( !strstr( $k, 'password' ) && !strstr( $k, 'um_account' ) && in_array( $k, $arr_fields ) ) {
$changes[ $k ] = $v;
@@ -42,8 +42,8 @@
delete_user_meta( um_user('ID'), 'hide_in_members' );
unset( $changes['hide_in_members'] );
}
// fired on account page, just before updating profile
// fired on account page, just before updating profile
do_action('um_account_pre_update_profile', $changes, um_user('ID') );
$ultimatemember->user->update_profile( $changes );
+1 -1
View File
@@ -1603,7 +1603,7 @@ class UM_Fields {
$output .= '<option value="' . $option_value . '" ';
if ( $this->is_selected( $form_key, $option_value, $data ) || $this->is_selected( $form_key, $v, $data ) ) {
if ( $this->is_selected( $form_key, $option_value, $data ) || ( ! isset( $options_pair ) && $this->is_selected( $form_key, $v, $data ) ) ) {
$output.= 'selected';
}