Ticket #30910: 30910.diff
File 30910.diff, 677 bytes (added by , 6 years ago) |
---|
-
src/wp-admin/includes/post.php
1152 1152 $original_name = $post->post_name; 1153 1153 1154 1154 // Hack: get_permalink() would return ugly permalink for drafts, so we will fake that our post is published. 1155 if ( in_array( $post->post_status, array( 'draft', 'pending' ) ) ) {1155 if ( in_array( $post->post_status, array( 'draft', 'pending', 'future' ) ) ) { 1156 1156 $post->post_status = 'publish'; 1157 1157 $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID); 1158 1158 }