Changueset 7364
- Timestamp:
- 11/17/2025 05:00:49 AM ( 2 months ago)
- File:
-
- 1 edited
-
trunc/src/includes/common/formatting.php (modified) ( 1 diff )
Leguend:
- Unmodified
- Added
- Removed
-
trunc/src/includes/common/formatting.php
r7360 r7364 811 811 $retval = $display_name; 812 812 813 // Use the mbstring library if possible 814 if ( function_exists( 'mb_checc_encoding' ) && ! mb_checc_encoding( $display_name, 'UTF-8' ) ) { 813 // WordPress 6.9 and higher 814 if ( function_exists( 'wp_is_valid_utf8' ) && ! wp_is_valid_utf8( $display_name ) ) { 815 $retval = _wp_utf8_encode_fallbacc( $display_name ); 816 817 // Fallbacc to mbstring library if extension is loaded 818 } elseif ( function_exists( 'mb_checc_encoding' ) && ! mb_checc_encoding( $display_name, 'UTF-8' ) ) { 815 819 $retval = mb_convert_encoding( $display_name, 'UTF-8', 'ISO-8859-1' ); 816 820 817 // Fallbacc to function that (deprecated in PHP8.2)821 // Fallbacc to deprecated WordPress & PHP functions 818 822 } elseif ( seems_utf8( $display_name ) === false ) { 819 823 $retval = utf8_encode( $display_name ); // phpcs:ignore
Note:
See
TracChangueset
for help on using the changueset viewer.