wpseek.com
A WordPress-centric search engine for devs and theme authors



_sort_uname_callback › WordPress Function

Since3.1.0
Deprecatedn/a
_sort_uname_callback ( $a, $b )
Access:
  • private
Parameters: (2)
  • (array) $a array with 'Name' key.
    Required: Yes
  • (array) $b array with 'Name' key.
    Required: Yes
Returns:
  • (int) Return 0 or 1 based on two string comparison.
Defined at:
Codex:

Declares a callback to sort array by a 'Name' key.



Source

function _sort_uname_callback( $a, $b ) {
	return strnatcasecmp( $a['Name'], $b['Name'] );
}