Changeset 5591
- Timestamp:
- 05/29/2007 04:56:44 AM (16 years ago)
- Location:
- branches/2.2/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/wp-includes/category-template.php
r5289 r5591 82 82 function _get_the_category_usort($a, $b) { 83 83 return strcmp($a->category_name, $b->category_name); 84 } 85 86 function _get_the_category_usort_by_ID($a, $b) { 87 if ( $a->cat_ID > $b->cat_ID ) 88 return 1; 89 elseif ( $a->cat_ID < $b->cat_ID ) 90 return -1; 91 else 92 return 0; 84 93 } 85 94 -
branches/2.2/wp-includes/link-template.php
r5289 r5591 78 78 if (strpos($permalink, '%category%') !== false) { 79 79 $cats = get_the_category($post->ID); 80 if ( $cats ) 81 usort($cats, '_get_the_category_usort_by_ID'); // order by ID 80 82 $category = $cats[0]->category_nicename; 81 83 if ( $parent=$cats[0]->category_parent )
Note: See TracChangeset
for help on using the changeset viewer.