If a category has parents, include those parents when generating the post permalink (if the permalink contains %category%).
git-svn-id: http://svn.automattic.com/wordpress/trunk@2148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3166eee481
commit
38a0c65a59
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue