mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 15:14:37 +00:00
Replace usages of basename() with wp_basename() in order to support multibyte filenames
This is focused on the pieces of code that touch media files and the tests that support them. `basename` isn't multibyte compatible out of the box. See http://php.net/basename and https://bugs.php.net/bug.php?id=62119. See #43170. Props Viper007Bond. git-svn-id: https://develop.svn.wordpress.org/trunk@44785 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -362,7 +362,7 @@ function wp_print_theme_file_tree( $tree, $level = 2, $size = 1, $index = 1 ) {
|
||||
aria-posinset="<?php echo esc_attr( $index ); ?>">
|
||||
<?php
|
||||
$file_description = esc_html( get_file_description( $filename ) );
|
||||
if ( $file_description !== $filename && basename( $filename ) !== $file_description ) {
|
||||
if ( $file_description !== $filename && wp_basename( $filename ) !== $file_description ) {
|
||||
$file_description .= '<br /><span class="nonessential">(' . esc_html( $filename ) . ')</span>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user