_usort_terms_by_name() - WordPress 函数参考中文文档

返回介绍

_usort_terms_by_name()

发布于 2017-09-11 字数 1518 浏览 897 评论 0

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( object $a,  object $b )

Sort categories by name.


描述

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


参数

$a

(object)
(Required)

$b

(object)
(Required)


返回值

(int)


源代码

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 );
}

更新日志

Version 描述
4.7.0 Use wp_list_sort()
2.3.0 Introduced.

相关函数

Uses

  • wp-includes/functions.php:
    _deprecated_function()

User Contributed Notes

上一篇:_usort_terms_by_ID()

下一篇:_walk_bookmarks()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!