WP_Theme::_name_sort()private staticWP 3.4.0

Accesses the Name header directly from the class for maximum speed. Would choke on HTML but we don't care enough to slow it down with strip_tags().

{} Это метод класса: WP_Theme{}

Хуков нет.

Возвращает

int. Negative if $a falls lower in the natural order than $b. Zero if they fall equally. Greater than 0 if $a falls higher in the natural order than $b. Used with usort().

Использование

$result = WP_Theme::_name_sort( $a, $b );
$a(WP_Theme) (обязательный)
First theme.
$b(WP_Theme) (обязательный)
Second theme.

Список изменений

С версии 3.4.0 Введена.

Код WP_Theme::_name_sort() WP 6.1.1

private static function _name_sort( $a, $b ) {
	return strnatcasecmp( $a->headers['Name'], $b->headers['Name'] );
}