Pass $leavename to filters in get_permalink. Fixes #7421.
git-svn-id: http://svn.automattic.com/wordpress/trunk@8487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
713c82dfd2
commit
91fcf4e904
|
@ -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