| @@ 108-109 (lines=2) @@ | ||
| 105 | if ( 'revision' == $vars->post_type && $vars->post_parent > 0 ) |
|
| 106 | $id = $vars->post_parent; |
|
| 107 | ||
| 108 | if ( $redirect_url = get_permalink($id) ) |
|
| 109 | $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url ); |
|
| 110 | } |
|
| 111 | } |
|
| 112 | ||
| @@ 141-143 (lines=3) @@ | ||
| 138 | } |
|
| 139 | ||
| 140 | if ( ! $redirect_url ) { |
|
| 141 | if ( $redirect_url = redirect_guess_404_permalink() ) { |
|
| 142 | $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'page', 'feed', 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url ); |
|
| 143 | } |
|
| 144 | } |
|
| 145 | ||
| 146 | if ( get_query_var( 'page' ) && $wp_query->post && |
|