Changeset 18540 for trunk/wp-includes/canonical.php
- Timestamp:
- 08/12/2011 01:41:23 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r18539 r18540 219 219 if ( get_query_var( 'withcomments' ) ) 220 220 $addl_path .= 'comments/'; 221 if ( ( in_array( get_default_feed(), array( 'rss', 'rdf' ) ) && 'feed' == get_query_var('feed')) || in_array( get_query_var('feed'), array( 'rss', 'rdf' ) ) )221 if ( ( in_array( get_default_feed(), array( 'rss', 'rdf' ) ) && 'feed' == get_query_var('feed') ) || in_array( get_query_var('feed'), array( 'rss', 'rdf' ) ) ) 222 222 $addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() == 'rss2' ) ? '' : 'rss2' ), 'feed' ); 223 223 else 224 224 $addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() == get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' ); 225 225 $redirect['query'] = remove_query_arg( 'feed', $redirect['query'] ); 226 } elseif ( is_feed() && 'old' == get_query_var('feed') ) { 227 $old_feed_files = array( 228 'wp-atom.php' => 'atom', 229 'wp-commentsrss2.php' => 'comments_rss2', 230 'wp-feed.php' => get_default_feed(), 231 'wp-rdf.php' => 'rss2', 232 'wp-rss.php' => 'rss2', 233 'wp-rss2.php' => 'rss2', 234 ); 235 if ( isset( $old_feed_files[ basename( $redirect['path'] ) ] ) ) { 236 $redirect_url = get_feed_link( $old_feed_files[ basename( $redirect['path'] ) ] ); 237 wp_redirect( $redirect_url, 301 ); 238 die(); 239 } 226 240 } 227 241
Note: See TracChangeset
for help on using the changeset viewer.