_usort_terms_by_name
Sort categories by name.
Description
Used by usort(…) as a callback, should not be used directly. Can actually be used to sort any term object.
Returns (int)
Parameters (2)
- 0. $a (object)
- The a.
- 1. $b (object)
- The b.
Usage
if ( !function_exists( '_usort_terms_by_name' ) ) { require_once ABSPATH . WPINC . '/deprecated.php'; } // The a. $a = null; // The b. $b = null; // NOTICE! Understand what this does before running. $result = _usort_terms_by_name($a, $b);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/deprecated.php
- function _usort_terms_by_name( $a, $b ) {
- _deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort' );
- return strcmp( $a->name, $b->name );
- }