WP_Theme::sort_by_name( WP_Theme[] $themes )
Sorts themes by name.
Description Description
Parameters Parameters
- $themes
-
(WP_Theme[]) (Required) Array of theme objects to sort (passed by reference).
Source Source
File: wp-includes/class-wp-theme.php
public static function sort_by_name( &$themes ) { if ( 0 === strpos( get_user_locale(), 'en_' ) ) { uasort( $themes, array( 'WP_Theme', '_name_sort' ) ); } else { foreach ( $themes as $key => $theme ) { $theme->translate_header( 'Name', $theme->headers['Name'] ); } uasort( $themes, array( 'WP_Theme', '_name_sort_i18n' ) ); } }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |