mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 22:54:03 +09:00
Fix select fields with options pair
This commit is contained in:
@@ -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
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user