Ticket #34565: 34565.2.patch
File 34565.2.patch, 975 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/class-wp-theme.php
1275 1275 if ( 0 === strpos( get_locale(), 'en_' ) ) { 1276 1276 uasort( $themes, array( 'WP_Theme', '_name_sort' ) ); 1277 1277 } else { 1278 foreach ( $themes as $key => $theme ) { 1279 $theme->display( "Name", false, true ); 1280 } 1278 1281 uasort( $themes, array( 'WP_Theme', '_name_sort_i18n' ) ); 1279 1282 } 1280 1283 } … … 1297 1300 } 1298 1301 1299 1302 /** 1300 * Name sort (with translation).1303 * Sort of pre-translated names. 1301 1304 * 1302 1305 * @since 3.4.0 1303 1306 * … … 1307 1310 * @return int 1308 1311 */ 1309 1312 private static function _name_sort_i18n( $a, $b ) { 1310 // Don't mark up; Do translate. 1311 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1313 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1312 1314 } 1313 1315 }