Changeset 7364
- Timestamp:
- 11/17/2025 05:00:49 AM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/common/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/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_check_encoding' ) && ! mb_check_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_fallback( $display_name ); 816 817 // Fallback to mbstring library if extension is loaded 818 } elseif ( function_exists( 'mb_check_encoding' ) && ! mb_check_encoding( $display_name, 'UTF-8' ) ) { 815 819 $retval = mb_convert_encoding( $display_name, 'UTF-8', 'ISO-8859-1' ); 816 820 817 // Fallback to function that (deprecated in PHP8.2)821 // Fallback to deprecated WordPress & PHP functions 818 822 } elseif ( seems_utf8( $display_name ) === false ) { 819 823 $retval = utf8_encode( $display_name ); // phpcs:ignore
Note: See TracChangeset
for help on using the changeset viewer.