Display the correct Slug in the permalink preview. Props duck_. Fixes #12870

git-svn-id: https://develop.svn.wordpress.org/trunk@14124 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-04-18 01:46:28 +00:00
parent 04bdc64bc9
commit fb623ae0c6
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -271,11 +271,11 @@ function _get_page_link( $id = false, $leavename = false, $sample = false ) {
else
$post = &get_post($id);
$pagestruct = $wp_rewrite->get_page_permastruct();
$link = $wp_rewrite->get_page_permastruct();
if ( '' != $pagestruct && ( ( isset($post->post_status) && 'draft' != $post->post_status && 'pending' != $post->post_status ) || $sample ) ) {
$link = get_page_uri($id);
$link = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct);
if ( '' != $link && ( ( isset($post->post_status) && 'draft' != $post->post_status && 'pending' != $post->post_status ) || $sample ) ) {
if ( ! $leavename )
$link = str_replace('%pagename%', get_page_uri($id), $link);
$link = home_url($link);
$link = user_trailingslashit($link, 'page');
} else {