diff --git src/wp-includes/link-template.php src/wp-includes/link-template.php
index eb22284ca3..9f51253cc1 100644
|
|
|
function get_permalink( $post = 0, $leavename = false ) { |
| 186 | 186 | |
| 187 | 187 | $category_object = get_term( $category_object, 'category' ); |
| 188 | 188 | $category = $category_object->slug; |
| 189 | | if ( $parent = $category_object->parent ) |
| 190 | | $category = get_category_parents($parent, false, '/', true) . $category; |
| | 189 | if ( $category_object->parent ) { |
| | 190 | $category = get_category_parents( $category_object->parent, false, '/', true ) . $category; |
| | 191 | } |
| 191 | 192 | } |
| 192 | 193 | // show default category in permalinks, without |
| 193 | 194 | // having to assign it explicitly |