Ticket #15041: page-auto-draft-fix.diff
File page-auto-draft-fix.diff, 925 bytes (added by , 14 years ago) |
---|
-
wp-includes/link-template.php
271 276 else 272 277 $post = &get_post($id); 273 278 279 $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) ); 280 274 281 $link = $wp_rewrite->get_page_permastruct(); 282 283 if ( !empty($post_link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) { 284 if ( ! $leavename ) { 285 $link = str_replace('%pagename%', get_page_uri($id), $link); 286 } 275 287 276 if ( '' != $link && ( ( isset($post->post_status) && 'draft' != $post->post_status && 'pending' != $post->post_status ) || $sample ) ) {277 if ( ! $leavename )278 $link = str_replace('%pagename%', get_page_uri($id), $link);279 288 $link = home_url($link); 280 289 $link = user_trailingslashit($link, 'page'); 281 290 } else {