_wp_object_name_sort_cb

The timeline below displays how wordpress function _wp_object_name_sort_cb has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.5

/**
 * Serves as a callback for comparing objects based on name.
 *
 * Used with `uasort()`.
 *
 * @since 3.1.0
 * @access private
 *
 * @param object $a The first object to compare.
 * @param object $b The second object to compare.
 * @return int Negative number if `$a->name` is less than `$b->name`, zero if they are equal,
 *             or greater than zero if `$a->name` is greater than `$b->name`.
 */
function _wp_object_name_sort_cb($a, $b)
{
    return strnatcasecmp($a->name, $b->name);
}

WordPress Version: 4.3

/**
 * Callback for comparing objects based on name
 *
 * @since 3.1.0
 * @access private
 * @return int
 */
function _wp_object_name_sort_cb($a, $b)
{
    return strnatcasecmp($a->name, $b->name);
}

WordPress Version: 3.7

/**
 * Callback for comparing objects based on name
 *
 * @since 3.1.0
 * @access private
 */
function _wp_object_name_sort_cb($a, $b)
{
    return strnatcasecmp($a->name, $b->name);
}