Ticket #22189: 22189.diff
File 22189.diff, 680 bytes (added by , 13 years ago) |
---|
-
wp-includes/post.php
2936 2936 $feeds = array(); 2937 2937 2938 2938 $hierarchical_post_types = get_post_types( array('hierarchical' => true) ); 2939 if ( 'attachment' == $post_type ) { 2939 if ( 'nav_menu_item' == $post_type ) { 2940 return $slug; 2941 } elseif ( 'attachment' == $post_type ) { 2940 2942 // Attachment slugs must be unique across all types. 2941 2943 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1"; 2942 2944 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID ) );