Changeset 16960
- Timestamp:
- 12/15/2010 05:56:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r16900 r16960 2773 2773 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID ) ); 2774 2774 2775 if ( $post_name_check || in_array( $slug, $feeds ) ) {2775 if ( $post_name_check || in_array( $slug, $feeds ) || apply_filters( 'wp_unique_post_slug_is_bad_attachment_slug', false, $slug ) ) { 2776 2776 $suffix = 2; 2777 2777 do { … … 2788 2788 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID, $post_parent ) ); 2789 2789 2790 if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( "@^($wp_rewrite->pagination_base)?\d+$@", $slug ) ) {2790 if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( "@^($wp_rewrite->pagination_base)?\d+$@", $slug ) || apply_filters( 'wp_unique_post_slug_is_bad_hierarchical_slug', false, $slug, $post_type, $post_parent ) ) { 2791 2791 $suffix = 2; 2792 2792 do { … … 2802 2802 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID ) ); 2803 2803 2804 if ( $post_name_check || in_array( $slug, $feeds ) ) {2804 if ( $post_name_check || in_array( $slug, $feeds ) || apply_filters( 'wp_unique_post_slug_is_bad_flat_slug', false, $slug, $post_type ) ) { 2805 2805 $suffix = 2; 2806 2806 do {
Note: See TracChangeset
for help on using the changeset viewer.