WordPress.org

Make WordPress Core

Ticket #30910: 30910.diff

File 30910.diff, 677 bytes (added by DrewAPicture, 6 years ago)
  • src/wp-admin/includes/post.php

     
    11521152        $original_name = $post->post_name;
    11531153
    11541154        // 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' ) ) ) {
    11561156                $post->post_status = 'publish';
    11571157                $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID);
    11581158        }