wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



_wp_object_name_sort_cb › WordPress Function

Od3.1.0
Przestarzałyn/a
_wp_object_name_sort_cb ( $a, $b )
Dostęp:
  • private
Parametry: (2)
  • (object) $a The first object to compare.
    Wymagane: Tak
  • (object) $b The second object to compare.
    Wymagane: Tak
Powrót:
  • (int) Negative number if `$a->name` is less than `$b->name`, zero if they are equal, or greater than zero if `$a->name` is greater than `$b->name`.
Zdefiniowane na:
Codex:

Serves as a callback for comparing objects based on name.

Used with uasort().


Źródło

function _wp_object_name_sort_cb( $a, $b ) {
	return strnatcasecmp( $a->name, $b->name );
}