From dd9d57ec6a38bc4d6f9ac5397d2dadb7e4a0d150 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 26 May 2010 17:25:57 +0000 Subject: [PATCH] Consider 'auto-draft' a draft in get_post_permalink(). prevents custom post types from getting borked GUIDs. see #13555 git-svn-id: http://svn.automattic.com/wordpress/trunk@14948 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 5554028c5..9700950f7 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -185,7 +185,7 @@ function get_post_permalink( $id = 0, $leavename = false, $sample = false ) { $slug = $post->post_name; - $draft_or_pending = 'draft' == $post->post_status || 'pending' == $post->post_status; + $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) ); $post_type = get_post_type_object($post->post_type);