WordPress开发者和主题制作者的搜索引擎



_usort_terms_by_name ›

Since2.3.0
已弃用4.7.0
_usort_terms_by_name ( $a, $b )
访问:
  • private
参数: (2)
  • (object) $a
    Required: Yes
  • (object) $b
    Required: Yes
返回:
  • (int)
定义在:
文档:

Sort categories by name.

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



源码

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

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