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.
_usort_by_first_member() WordPress Function
The usort_by_first_member() WordPress function sorts an array of objects by the value of their first member. This is useful for sorting a list of objects by their ID, name, or any other value.
_usort_by_first_member( array $a, array $b ) #
Sorts a multidimensional array by first member of each top level member
Description
Used by uasort() as a callback, should not be used directly.
Parameters
- $a
(array)(Required)
- $b
(array)(Required)
Return
(int)
Source
File: wp-admin/includes/import.php
function _usort_by_first_member( $a, $b ) { return strnatcasecmp( $a[0], $b[0] ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |