WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r5289 r5702  
    7878        if (strpos($permalink, '%category%') !== false) {
    7979            $cats = get_the_category($post->ID);
     80            if ( $cats )
     81                usort($cats, '_get_the_category_usort_by_ID'); // order by ID
    8082            $category = $cats[0]->category_nicename;
    8183            if ( $parent=$cats[0]->category_parent )
     
    481483    if ( $permalink )
    482484        $qstr = user_trailingslashit($qstr, 'paged');
    483     $qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_option('home') ) . $qstr );
    484485
    485486    // showing /page/1/ or ?paged=1 is redundant
     
    489490        $qstr = remove_query_arg('paged', $qstr); // for query style
    490491    }
     492
     493    $qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_option('home') ) . $qstr );
     494
    491495    return $qstr;
    492496}
Note: See TracChangeset for help on using the changeset viewer.