From 06b50ae8f529bf600fa361aa5acaa084f19b3991 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 10 Mar 2005 03:01:45 +0000 Subject: [PATCH] Don't make post slug sticky until the post is published. http://mosquito.wordpress.org/view.php?id=531 git-svn-id: https://develop.svn.wordpress.org/trunk@2426 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 66cdb452d3..934f5ea5bb 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -104,7 +104,7 @@ case 'post': $id_result = $wpdb->get_row("SHOW TABLE STATUS LIKE '$wpdb->posts'"); $post_ID = $id_result->Auto_increment; - if ( empty($post_name) ) { + if ( empty($post_name) || 'draft' == $post_status ) { $post_name = sanitize_title($post_title, $post_ID); } else { $post_name = sanitize_title($post_name, $post_ID); @@ -308,7 +308,7 @@ case 'editpost': if ( 'publish' == $post_status && (!user_can_create_post($user_ID)) && 2 != get_option('new_users_can_blog') ) $post_status = 'draft'; - if (empty($post_name)) { + if (empty($post_name) || 'draft' == $post_status ) { $post_name = sanitize_title($post_title, $post_ID); } else { $post_name = sanitize_title($post_name, $post_ID);