wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



_wp_object_count_sort_cb › WordPress Function

Depuis3.1.0
Dépréciéen/a
_wp_object_count_sort_cb ( $a, $b )
Accès:
  • private
Paramètres: (2)
  • (object) $a The first object to compare.
    Requis: Oui
  • (object) $b The second object to compare.
    Requis: Oui
Retourne:
  • (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`.
Défini(e) dans:
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 );
}