If a category has parents, include those parents when generating the post permalink (if the permalink contains %category%).

git-svn-id: https://develop.svn.wordpress.org/trunk@2148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-01-25 05:01:54 +00:00
parent c151b827a7
commit 323fc1ad10
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,8 @@ function get_permalink($id = false) {
$cats = get_the_category($idpost->ID);
$category = $cats[0]->category_nicename;
if ($parent=$cats[0]->category_parent) $category = get_category_parents($parent, FALSE, '/', TRUE) . $category;
$authordata = get_userdata($idpost->post_author);
$author = $authordata->user_nicename;
$rewritereplace =