A WordPress-centric search engine for devs and theme authors



_wp_object_count_sort_cb ›

Since3.1.0
Deprecatedn/a
_wp_object_count_sort_cb ( $a, $b )
Access:
  • private
Parameters: (2)
  • (object) $a The first object to compare.
    Required: Yes
  • (object) $b The second object to compare.
    Required: Yes
Returns:
  • (bool) Whether the count value for `$a` is greater than the count value for `$b`.
Defined at:
Codex:

Serves as a callback for comparing objects based on count.

Used with uasort().



Source

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