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



_wp_object_name_sort_cb ›

Since3.1.0
已弃用n/a
_wp_object_name_sort_cb ( $a, $b )
访问:
  • private
参数: (2)
  • (object) $a The first object to compare.
    Required: Yes
  • (object) $b The second object to compare.
    Required: Yes
返回:
  • (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`.
定义在:
文档:

Serves as a callback for comparing objects based on name.

Used with uasort().



源码

function _wp_object_name_sort_cb( $a, $b ) {
	return strnatcasecmp( $a->name, $b->name );
}