mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
- fixed #1241 issue;
This commit is contained in:
@@ -706,7 +706,9 @@ function um_field_non_utf8_value( $value ) {
|
||||
if ( function_exists( 'mb_detect_encoding' ) ) {
|
||||
$encoding = mb_detect_encoding( $value, 'utf-8, iso-8859-1, ascii', true );
|
||||
if ( strcasecmp( $encoding, 'UTF-8' ) !== 0 ) {
|
||||
$value = iconv( $encoding, 'utf-8', $value );
|
||||
if ( function_exists( 'iconv' ) ) {
|
||||
$value = iconv( $encoding, 'utf-8', $value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ function um_dynamic_user_profile_title( $title, $id = '' ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'utf8_decode' ) ) {
|
||||
if ( ! function_exists( 'mb_convert_encoding' ) ) {
|
||||
return $title;
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@ add_filter( 'um_clean_user_basename_filter', 'um_clean_user_basename_filter', 2,
|
||||
* @return array
|
||||
*/
|
||||
function um_before_update_profile( $changes, $user_id ) {
|
||||
// todo check if this option required and maybe there are some WordPress native ways how to make that without custom unused functions. Maybe fully deprecate 'um_force_utf8_strings' option which doesn't exist in UI.
|
||||
if ( ! UM()->options()->get( 'um_force_utf8_strings' ) ) {
|
||||
return $changes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user