Changeset 42734 for trunk/src/wp-includes/class-wp-theme.php
- Timestamp:
- 02/25/2018 01:17:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r42343 r42734 1560 1560 uasort( $themes, array( 'WP_Theme', '_name_sort' ) ); 1561 1561 } else { 1562 foreach ( $themes as $key => $theme ) { 1563 $theme->translate_header( 'Name', $theme->headers['Name'] ); 1564 } 1562 1565 uasort( $themes, array( 'WP_Theme', '_name_sort_i18n' ) ); 1563 1566 } … … 1584 1587 1585 1588 /** 1586 * Name sort (with translation).1589 * Callback function for usort() to naturally sort themes by translated name. 1587 1590 * 1588 1591 * @since 3.4.0 … … 1596 1599 */ 1597 1600 private static function _name_sort_i18n( $a, $b ) { 1598 // Don't mark up; Do translate. 1599 return strnatcasecmp( $a->display( 'Name', false, true ), $b->display( 'Name', false, true ) ); 1601 return strnatcasecmp( $a->name_translated, $b->name_translated ); 1600 1602 } 1601 1603 }
Note: See TracChangeset
for help on using the changeset viewer.