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.
_sort_name_callback() WordPress Function
The sort_name_callback() function is used to sort an array of objects by their name property. This function is used by the usort() function.
_sort_name_callback( $a, $b ) #
Callback to sort array by a ‘name’ key.
Return
(int)
Source
File: wp-admin/includes/widgets.php
function _sort_name_callback( $a, $b ) { return strnatcasecmp( $a['name'], $b['name'] ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |