WP_Theme::sort_by_name()
Sorts themes by name.
Метод класса: WP_Theme{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WP_Theme::sort_by_name( $themes );
- $themes(WP_Theme[]) (обязательный) (передается по ссылке — &)
- Array of theme objects to sort (passed by reference).
Список изменений
С версии 3.4.0 | Введена. |
Код WP_Theme::sort_by_name() WP Theme::sort by name WP 6.7.1
public static function sort_by_name( &$themes ) { if ( str_starts_with( 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' ) ); } }