Changeset 33262 for trunk/src/wp-includes/post.php
- Timestamp:
- 07/14/2015 12:27:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r33261 r33262 3817 3817 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID ) ); 3818 3818 3819 // Prevent post slugs that could result in URLs that conflict with date archives. 3819 // Prevent new post slugs that could result in URLs that conflict with date archives. 3820 $post = get_post( $post_ID ); 3820 3821 $conflicts_with_date_archive = false; 3821 if ( 'post' === $post_type && preg_match( '/^[0-9]+$/', $slug ) && $slug_num = intval( $slug ) ) {3822 if ( 'post' === $post_type && ( ! $post || $post->post_name !== $slug ) && preg_match( '/^[0-9]+$/', $slug ) && $slug_num = intval( $slug ) ) { 3822 3823 $permastructs = array_values( array_filter( explode( '/', get_option( 'permalink_structure' ) ) ) ); 3823 3824 $postname_index = array_search( '%postname%', $permastructs );
Note: See TracChangeset
for help on using the changeset viewer.