_sort_uname_callback()
Declares a 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
. Return 0 or 1 based on two string comparison.
Usage
_sort_uname_callback( $a, $b );
- $a(array) (required)
- array with 'Name' key.
- $b(array) (required)
- array with 'Name' key.
Changelog
Since 3.1.0 | Introduced. |
_sort_uname_callback() sort uname callback code WP 6.8
function _sort_uname_callback( $a, $b ) { return strnatcasecmp( $a['Name'], $b['Name'] ); }