wpseek.com
A WordPress-centric search engine for devs and theme authors



_usort_terms_by_name › WordPress Function

Since2.3.0
Deprecated4.7.0
_usort_terms_by_name ( $a, $b )
Access:
  • private
Parameters: (2)
  • (object) $a
    Required: Yes
  • (object) $b
    Required: Yes
Returns:
  • (int)
Defined at:
Codex:

Sort categories by name.

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


Source

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

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