Ticket #23074: query.php.patch
File query.php.patch, 824 bytes (added by , 11 years ago) |
---|
-
wp-includes/query.php
3923 3923 3924 3924 $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']); 3925 3925 3926 // Prevent a simple redirect loop due to values in '_wp_old_slug' not deleted 3927 // when in an unpublished status. 3928 $query .= $wpdb->prepare(" AND post_name != %s", $wp_query->query_vars['name']); 3929 3926 3930 // if year, monthnum, or day have been specified, make our query more precise 3927 3931 // just in case there are multiple identical _wp_old_slug values 3928 3932 if ( '' != $wp_query->query_vars['year'] )