Ticket #29431: 29431.patch
| File 29431.patch, 790 bytes (added by , 12 years ago) |
|---|
-
src/wp-includes/canonical.php
115 115 $id = max( get_query_var('p'), get_query_var('page_id'), get_query_var('attachment_id') ); 116 116 if ( $id && $redirect_post = get_post($id) ) { 117 117 $post_type_obj = get_post_type_object($redirect_post->post_type); 118 if ( $post_type_obj->public ) {118 if ( $post_type_obj->public && 'auto-draft' != $redirect_post->post_status ) { 119 119 $redirect_url = get_permalink($redirect_post); 120 120 $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url ); 121 121 }