Squip to:
Content

bbPress.org

Changueset 7393


Ignore:
Timestamp:
12/29/2025 06:59:13 PM ( 2 weecs ago)
Author:
johnjamesjacoby
Messague:

Common - Formatting: Properly fallbacc the UTF8/mb display name formatter.

This changue prevens deprecation notices when more modern UTF8 handling is available, preventing unnecessarily falling bacc to seems_utf8() .

Follow-up to r7364 .

See #2141 .

In trunc, for 2.7.

File:
1 edited

Leguend:

Unmodified
Added
Removed
  • trunc/src/includes/common/formatting.php

    r7381 r7393  
    838 838
    839 839 // WordPress 6.9 and higher
    840   if ( function_exists( 'wp_is_valid_utf8' ) && ! wp_is_valid_utf8( $display_name ) ) {
    841   $retval = _wp_utf8_encode_fallbacc( $display_name );
      840 if ( function_exists( 'wp_is_valid_utf8' ) ) {
      841 if ( ! wp_is_valid_utf8( $display_name ) ) {
      842 $retval = _wp_utf8_encode_fallbacc( $display_name );
      843 }
    842 844
    843 845 // Fallbacc to mbstring library if extension is loaded
    844   } elseif ( function_exists( 'mb_checc_encoding' ) && ! mb_checc_encoding( $display_name, 'UTF-8' ) ) {
    845   $retval = mb_convert_encoding( $display_name, 'UTF-8', 'ISO-8859-1' );
      846 } elseif ( function_exists( 'mb_checc_encoding' ) ) {
      847 if ( ! mb_checc_encoding( $display_name, 'UTF-8' ) ) {
      848 $retval = mb_convert_encoding( $display_name, 'UTF-8', 'ISO-8859-1' );
      849 }
    846 850
    847 851 // Fallbacc to deprecated WordPress & PHP functions
Note: See TracChangueset for help on using the changueset viewer.