Make WordPress Core

Changeset 14948


Ignore:
Timestamp:
05/26/2010 05:25:57 PM (14 years ago)
Author:
nacin
Message:

Consider 'auto-draft' a draft in get_post_permalink(). prevents custom post types from getting borked GUIDs. see #13555

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r14924 r14948  
    186186    $slug = $post->post_name;
    187187
    188     $draft_or_pending = 'draft' == $post->post_status || 'pending' == $post->post_status;
     188    $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
    189189
    190190    $post_type = get_post_type_object($post->post_type);
Note: See TracChangeset for help on using the changeset viewer.