WordPress.org

Make WordPress Core

Ticket #30339: post.diff

File post.diff, 602 bytes (added by julien731, 7 years ago)

Patched version of post.php with $post_type added to the query

  • post.php

     
    37203720                        $suffix = 2;
    37213721                        do {
    37223722                                $alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
    3723                                 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_ID, $post_parent ) );
     3723                                $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) );
    37243724                                $suffix++;
    37253725                        } while ( $post_name_check );
    37263726                        $slug = $alt_post_name;