_sort_name_callback()WP 3.1.0

Callback to sort array by a 'name' key.

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

Int.

Usage

_sort_name_callback( $a, $b );
$a(array) (required)
First array.
$b(array) (required)
Second array.

Changelog

Since 3.1.0 Introduced.

_sort_name_callback() code WP 6.5.2

function _sort_name_callback( $a, $b ) {
	return strnatcasecmp( $a['name'], $b['name'] );
}