- fixed #1241 issue;

This commit is contained in:
Mykyta Synelnikov
2023-07-11 17:59:54 +03:00
parent 543e0a803a
commit 6c3b06dff0
8 changed files with 84 additions and 8 deletions
+3 -1
View File
@@ -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 );
}
}
}
+1 -1
View File
@@ -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;
}
+1
View File
@@ -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;
}