Changeset 38859 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 10/21/2016 11:11:42 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r38828 r38859 98 98 */ 99 99 return apply_filters( 'get_the_categories', $categories, $id ); 100 }101 102 /**103 * Sort categories by name.104 *105 * Used by usort() as a callback, should not be used directly. Can actually be106 * used to sort any term object.107 *108 * @since 2.3.0109 * @access private110 *111 * @param object $a112 * @param object $b113 * @return int114 */115 function _usort_terms_by_name( $a, $b ) {116 return strcmp( $a->name, $b->name );117 }118 119 /**120 * Sort categories by ID.121 *122 * Used by usort() as a callback, should not be used directly. Can actually be123 * used to sort any term object.124 *125 * @since 2.3.0126 * @access private127 *128 * @param object $a129 * @param object $b130 * @return int131 */132 function _usort_terms_by_ID( $a, $b ) {133 if ( $a->term_id > $b->term_id )134 return 1;135 elseif ( $a->term_id < $b->term_id )136 return -1;137 else138 return 0;139 100 } 140 101
Note: See TracChangeset
for help on using the changeset viewer.