WordPress.org

Make WordPress Core

Changeset 14162


Ignore:
Timestamp:
04/19/10 12:03:01 (4 years ago)
Author:
dd32
Message:

Canonical redirect to correct location if rss2 is not default feed. wp-feed.php redirection to default feed type instad of rss2. Props solarissmoke. Fixes #13047

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-feed.php

    r9158 r14162  
    11<?php 
    22/** 
    3  * Redirects to the RSS2 feed 
     3 * Redirects to the default feed 
    44 * This file is deprecated and only exists for backwards compatibility 
    55 * 
     
    88 
    99require( './wp-load.php' ); 
    10 wp_redirect( get_bloginfo( 'rss2_url' ), 301 ); 
     10wp_redirect( get_bloginfo( get_default_feed() . '_url' ), 301 ); 
    1111 
    1212?> 
  • trunk/wp-includes/canonical.php

    r14141 r14162  
    191191                if ( get_query_var( 'withcomments' ) ) 
    192192                    $addl_path .= 'comments/'; 
    193                 $addl_path .= user_trailingslashit( 'feed/' . ( ( 'rss2' ==  get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' ); 
     193                $addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() ==  get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' ); 
    194194                $redirect['query'] = remove_query_arg( 'feed', $redirect['query'] ); 
    195195            } 
Note: See TracChangeset for help on using the changeset viewer.