Changeset 38863 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 10/21/2016 05:00:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r38859 r38863 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 be 106 * used to sort any term object. 107 * 108 * @since 2.3.0 109 * @access private 110 * 111 * @param object $a 112 * @param object $b 113 * @return int 114 */ 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 be 123 * used to sort any term object. 124 * 125 * @since 2.3.0 126 * @access private 127 * 128 * @param object $a 129 * @param object $b 130 * @return int 131 */ 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 else 138 return 0; 100 139 } 101 140
Note: See TracChangeset
for help on using the changeset viewer.