Changeset 20396
- Timestamp:
- 04/07/2012 05:02:45 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r20395 r20396 66 66 if ( !isset($redirect['query']) ) 67 67 $redirect['query'] = ''; 68 69 if ( is_feed() && ( $id = get_query_var( 'p' ) ) ) { 70 if ( $redirect_url = get_post_comments_feed_link( $id, get_query_var( 'feed' ) ) ) { 71 $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type', 'feed'), $redirect_url ); 72 $redirect['path'] = parse_url( $redirect_url, PHP_URL_PATH ); 73 } 74 } 68 75 69 76 if ( is_singular() && 1 > $wp_query->post_count && ($id = get_query_var('p')) ) { … … 220 227 if ( is_feed() && in_array( get_query_var('feed'), $wp_rewrite->feeds ) ) { 221 228 $addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : ''; 222 if ( get_query_var( 'withcomments' ) )229 if ( !is_singular() && get_query_var( 'withcomments' ) ) 223 230 $addl_path .= 'comments/'; 224 231 if ( ( 'rss' == get_default_feed() && 'feed' == get_query_var('feed') ) || 'rss' == get_query_var('feed') )
Note: See TracChangeset
for help on using the changeset viewer.