mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fix privacy update on the account page
This commit is contained in:
@@ -71,7 +71,11 @@ add_filter( "um_get_field__last_name","um_account_disable_name_fields", 10 ,1 );
|
||||
*/
|
||||
function um_account_sanitize_data( $data ) {
|
||||
foreach ( $data as $key => $value ) {
|
||||
$data[ $key ] = trim( esc_html( strip_tags( $value ) ) );
|
||||
if ( is_array( $value ) ) {
|
||||
$data[ $key ] = array_filter($value, 'um_strip_tags_array');
|
||||
} else {
|
||||
$data[ $key ] = trim( esc_html( strip_tags( $value ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
@@ -2712,4 +2712,12 @@ if ( ! function_exists( 'um_is_profile_owner' ) ) {
|
||||
|
||||
return ( $user_id == um_profile_id() );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip tags if array
|
||||
*/
|
||||
function um_strip_tags_array( $var ) {
|
||||
$var = trim( esc_html( strip_tags( $var ) ) );
|
||||
return $var;
|
||||
}
|
||||
Reference in New Issue
Block a user