用作基于计数比较对象的回调。
原型
_wp_object_count_sort_cb( object $a, object $b )
描述
与uasort()一起使用。
参数
$a
(object)
(Required)
第一个要比较的对象。
$b
(object)
(Required)
要比较的第二个对象。
返回值
(bool)
是否为计数值
源文件
路径:wp-includes/category-template.php
<?php
...
function _wp_object_count_sort_cb( $a, $b ) {
return ( $a->count > $b->count );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/_wp_object_count_sort_cb/