Changeset 9987 for trunk/wp-includes/link-template.php
- Timestamp:
- 11/30/2008 07:29:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r9838 r9987 110 110 if ( strpos($permalink, '%category%') !== false ) { 111 111 $cats = get_the_category($post->ID); 112 if ( $cats ) 112 if ( $cats ) { 113 113 usort($cats, '_usort_terms_by_ID'); // order by ID 114 $category = $cats[0]->slug;115 if ( $parent=$cats[0]->parent )116 $category = get_category_parents($parent, false, '/', true) . $category;117 114 $category = $cats[0]->slug; 115 if ( $parent = $cats[0]->parent ) 116 $category = get_category_parents($parent, false, '/', true) . $category; 117 } 118 118 // show default category in permalinks, without 119 119 // having to assign it explicitly
Note: See TracChangeset
for help on using the changeset viewer.