WordPress.org

Make WordPress Core

Changeset 14141


Ignore:
Timestamp:
04/18/10 06:51:16 (5 years ago)
Author:
dd32
Message:

Advertise the correct comment feed link for a Page on the Front. Do not canonical redirect the front page comments feeds to home. Fixes #12452

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/canonical.php

    r13866 r14141  
    101101            if ( $redirect_url = get_permalink(get_query_var('page_id')) ) 
    102102                $redirect['query'] = remove_query_arg('page_id', $redirect['query']); 
    103         } elseif ( is_page() && isset($wp_query->queried_object) && 'page' == get_option('show_on_front') && $wp_query->queried_object->ID == get_option('page_on_front')  && ! $redirect_url ) { 
     103        } elseif ( is_page() && !is_feed() && isset($wp_query->queried_object) && 'page' == get_option('show_on_front') && $wp_query->queried_object->ID == get_option('page_on_front')  && ! $redirect_url ) { 
    104104            $redirect_url = home_url('/'); 
    105105        } elseif ( is_home() && !empty($_GET['page_id']) && 'page' == get_option('show_on_front') && get_query_var('page_id') == get_option('page_for_posts')  && ! $redirect_url ) { 
  • trunk/wp-includes/link-template.php

    r14124 r14141  
    472472 
    473473    if ( '' != get_option('permalink_structure') ) { 
    474         $url = trailingslashit( get_permalink($post_id) ) . 'feed'; 
     474        if ( 'page' == get_option('show_on_front') && $post_id == get_option('page_on_front') ) 
     475            $url = _get_page_link( $post_id ); 
     476        else 
     477            $url = get_permalink($post_id); 
     478 
     479        $url = trailingslashit($url) . 'feed'; 
    475480        if ( $feed != get_default_feed() ) 
    476481            $url .= "/$feed"; 
Note: See TracChangeset for help on using the changeset viewer.