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

git-svn-id: https://develop.svn.wordpress.org/trunk@12245 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-11-20 17:47:25 +00:00
parent b4ef4d5fc9
commit 7425349d76
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ function _get_page_link( $id = false, $leavename = false, $sample = false ) {
$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 = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct);
$link = trailingslashit(get_option('home')) . "$link";