Ticket #4328: 4328.patch
File 4328.patch, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/post.php
4023 4023 if ( $post->post_name == $post_before->post_name ) 4024 4024 return; 4025 4025 4026 // we're only concerned with published , non-hierarchicalobjects4027 if ( $post->post_status != 'publish' || is_post_type_hierarchical( $post->post_type ))4026 // we're only concerned with published objects 4027 if ( $post->post_status != 'publish' ) 4028 4028 return; 4029 4029 4030 4030 $old_slugs = (array) get_post_meta($post_id, '_wp_old_slug'); -
wp-includes/query.php
3447 3447 else 3448 3448 $post_type = 'post'; 3449 3449 3450 // Do not attempt redirect for hierarchical post types3451 if ( is_post_type_hierarchical( $post_type ) )3452 return;3453 3454 3450 $query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta, $wpdb->posts WHERE ID = post_id AND post_type = %s AND meta_key = '_wp_old_slug' AND meta_value = %s", $post_type, $wp_query->query_vars['name']); 3455 3451 3456 3452 // if year, monthnum, or day have been specified, make our query more precise