Make WordPress Core

Ticket #23665: 23665-post-name.patch

File 23665-post-name.patch, 658 bytes (added by azaozz, 12 years ago)
  • wp-includes/post.php

     
    30163016 * @return string unique slug for the post, based on $post_name (with a -1, -2, etc. suffix)
    30173017 */
    30183018function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_parent ) {
    3019         if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) )
     3019        if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) || ( 'inherit' == $post_status && 'revision' == $post_type ) )
    30203020                return $slug;
    30213021
    30223022        global $wpdb, $wp_rewrite;