mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Consider 'auto-draft' a draft in get_post_permalink(). prevents custom post types from getting borked GUIDs. see #13555
git-svn-id: https://develop.svn.wordpress.org/trunk@14948 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user