WordPress.org

Make WordPress Core

Ticket #1073: bug1073_noprivateslug.diff

File bug1073_noprivateslug.diff, 782 bytes (added by coffee2code, 16 years ago)
  • wp-admin/post.php

     
    105105        $post_ID = $id_result->Auto_increment;
    106106
    107107        if ( empty($post_name) ) {
    108                 if ( 'draft' != $post_status )
     108                if ( ('draft' != $post_status) && ('private' != $post_status) )
    109109                        $post_name = sanitize_title($post_title, $post_ID);
    110110        } else {
    111111                $post_name = sanitize_title($post_name, $post_ID);
     
    307307                $post_status = 'draft';
    308308
    309309        if ( empty($post_name) ) {
    310                 if ( 'draft' != $post_status )
     310                if ( ('draft' != $post_status) && ('private' != $post_status) )
    311311                        $post_name = sanitize_title($post_title, $post_ID);
    312312        } else {
    313313                $post_name = sanitize_title($post_name, $post_ID);