Fix preview of pending pages with permalinks on. Props dj-wp. fixes #11199

git-svn-id: http://svn.automattic.com/wordpress/trunk@12245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-11-20 17:47:25 +00:00
parent 247449a148
commit 9ee40acb93

View File

@ -222,7 +222,7 @@ function _get_page_link( $id = false, $leavename = false, $sample = false ) {
$pagestruct = $wp_rewrite->get_page_permastruct(); $pagestruct = $wp_rewrite->get_page_permastruct();
if ( '' != $pagestruct && ( ( isset($post->post_status) && 'draft' != $post->post_status ) || $sample ) ) { if ( '' != $pagestruct && ( ( isset($post->post_status) && 'draft' != $post->post_status && 'pending' != $post->post_status ) || $sample ) ) {
$link = get_page_uri($id); $link = get_page_uri($id);
$link = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct); $link = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct);
$link = trailingslashit(get_option('home')) . "$link"; $link = trailingslashit(get_option('home')) . "$link";