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.
_wp_object_count_sort_cb() WordPress Function
The _wp_object_count_sort_cb() function is a custom sorting callback function used by the Wordpress function wp_object_count() to sort the objects by their count.
_wp_object_count_sort_cb( object $a, object $b ) #
Serves as a callback for comparing objects based on count.
Description
Used with uasort()
.
Parameters
- $a
(object)(Required)The first object to compare.
- $b
(object)(Required)The second object to compare.
Return
(bool) Whether the count value for $a
is greater than the count value for $b
.
Source
File: wp-includes/category-template.php
function _wp_object_count_sort_cb( $a, $b ) { return ( $a->count > $b->count ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |