Warning: This function has been deprecated. Use wp_list_sort() instead.

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_terms_by_name() WordPress Function

The usort_terms_by_name() function sorts an array of terms by name.

_usort_terms_by_name( object $a, object $b ) #

Sort categories by name.


Description

Used by usort() as a callback, should not be used directly. Can actually be used to sort any term object.


Top ↑

Parameters

$a

(object)(Required)

$b

(object)(Required)


Top ↑

Return

(int)


Top ↑

Source

File: wp-includes/deprecated.php

function _usort_terms_by_name( $a, $b ) {
	_deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );

	return strcmp( $a->name, $b->name );
}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Use wp_list_sort()
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.