WordPress at a glance
function is not described

WP_Theme::sort_by_name() public WP 3.4.0

Sorts themes by name.

{} It's a method of the class: WP_Theme{}

No Hooks.

Return

Null. Nothing.

Usage

$result = WP_Theme::sort_by_name( $themes );
$themes(WP_Theme[]) (required) (passed by reference — &)
Array of theme objects to sort (passed by reference).

Changelog

Since 3.4.0 Introduced.

Code of WP_Theme::sort_by_name() WP 5.5.3

<?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' ) );
	}
}