Changeset 18540
- Timestamp:
- 08/12/2011 01:41:23 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 deleted
- 3 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 -
trunk/wp-includes/rewrite.php
r18538 r18540 1499 1499 $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array(); 1500 1500 1501 // Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category% 1502 $default_feeds = array( '.*wp-atom.php$' => $this->index . '?feed=atom', 1503 '.*wp-rdf.php$' => $this->index . '?feed=rss2', 1504 '.*wp-rss.php$' => $this->index . '?feed=rss2', 1505 '.*wp-rss2.php$' => $this->index . '?feed=rss2', 1506 '.*wp-feed.php$' => $this->index . '?feed=feed', 1507 '.*wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1'); 1501 // Old feed files 1502 $old_feed_files = array( '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2).php$' => $this->index . '?feed=old' ); 1508 1503 1509 1504 // Registration rules … … 1559 1554 // Put them together. 1560 1555 if ( $this->use_verbose_page_rules ) 1561 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $ default_feeds, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules);1556 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules); 1562 1557 else 1563 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $ default_feeds, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);1558 $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); 1564 1559 1565 1560 do_action_ref_array('generate_rewrite_rules', array(&$this)); -
trunk/wp-includes/version.php
r18400 r18540 12 12 * @global int $wp_db_version 13 13 */ 14 $wp_db_version = 18 226;14 $wp_db_version = 18537; 15 15 16 16 /**
Note: See TracChangeset
for help on using the changeset viewer.