diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 013136b8b8..4ead5961ca 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -131,6 +131,8 @@ function get_the_excerpt($fakeit = true) { function wp_link_pages($args = '') { + global $post; + if ( is_array($args) ) $r = &$args; else @@ -158,7 +160,7 @@ function wp_link_pages($args = '') { if ( 1 == $i ) { $output .= ''; } else { - if ( '' == get_option('permalink_structure') ) + if ( '' == get_option('permalink_structure') || 'draft' == $post->post_status ) $output .= ''; else $output .= ''; @@ -177,7 +179,7 @@ function wp_link_pages($args = '') { if ( 1 == $i ) { $output .= '' . $previouspagelink . ''; } else { - if ( '' == get_option('permalink_structure') ) + if ( '' == get_option('permalink_structure') || 'draft' == $post->post_status ) $output .= '' . $previouspagelink . ''; else $output .= '' . $previouspagelink . ''; @@ -188,7 +190,7 @@ function wp_link_pages($args = '') { if ( 1 == $i ) { $output .= '' . $nextpagelink . ''; } else { - if ( '' == get_option('permalink_structure') ) + if ( '' == get_option('permalink_structure') || 'draft' == $post->post_status ) $output .= '' . $nextpagelink . ''; else $output .= '' . $nextpagelink . '';