_wp_object_count_sort_cb()WP 3.1.0

Serves as a callback for comparing objects based on count.

Used with uasort().

Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.

No Hooks.


Int. Negative number if $a->count is less than $b->count, zero if they are equal, or greater than zero if $a->count is greater than $b->count.


_wp_object_count_sort_cb( $a, $b );
$a(object) (required)
The first object to compare.
$b(object) (required)
The second object to compare.


Since 3.1.0 Introduced.

_wp_object_count_sort_cb() code WP 6.3

function _wp_object_count_sort_cb( $a, $b ) {
	return ( $a->count - $b->count );