Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_Theme::_name_sort_i18n( WP_Theme $a, WP_Theme $b ): int

Callback function for usort() to naturally sort themes by translated name.


$a WP_Theme Required
First theme.
$b WP_Theme Required
Second theme.

Top ↑


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().

Top ↑


File: wp-includes/class-wp-theme.php. View all references

private static function _name_sort_i18n( $a, $b ) {
	return strnatcasecmp( $a->name_translated, $b->name_translated );

Top ↑


Version Description
3.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.