WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/29/2007 04:54:45 AM (14 years ago)
Author:
markjaquith
Message:

switch to term_id and name for category sorting. see #4189. sort by term_id for category permalinks, by name for get_the_category(). fixes #4335 for trunk. Props Erik Barzeski for the find.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r5576 r5590  
    7474        if (strpos($permalink, '%category%') !== false) {
    7575            $cats = get_the_category($post->ID);
     76            if ( $cats )
     77                usort($cats, '_usort_terms_by_ID'); // order by ID
    7678            $category = $cats[0]->slug;
    7779            if ( $parent=$cats[0]->parent )
Note: See TracChangeset for help on using the changeset viewer.