Pass $leavename to filters in get_permalink. Fixes #7421.
git-svn-id: https://develop.svn.wordpress.org/trunk@8487 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b56605062
commit
f698dfbb3b
@ -112,10 +112,10 @@ function get_permalink($id = 0, $leavename=false) {
|
|||||||
);
|
);
|
||||||
$permalink = get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink);
|
$permalink = get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink);
|
||||||
$permalink = user_trailingslashit($permalink, 'single');
|
$permalink = user_trailingslashit($permalink, 'single');
|
||||||
return apply_filters('post_link', $permalink, $post);
|
return apply_filters('post_link', $permalink, $post, $leavename);
|
||||||
} else { // if they're not using the fancy permalink option
|
} else { // if they're not using the fancy permalink option
|
||||||
$permalink = get_option('home') . '/?p=' . $post->ID;
|
$permalink = get_option('home') . '/?p=' . $post->ID;
|
||||||
return apply_filters('post_link', $permalink, $post);
|
return apply_filters('post_link', $permalink, $post, $leavename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user