Make WordPress Core

Changeset 21571


Ignore:
Timestamp:
08/21/2012 12:53:54 PM (12 years ago)
Author:
westi
Message:

When comment paging is enabled make sure to have canonical links for each of the comment pages so that all the comments are indexed instead of just the ones that are displayed on the permalink itself.
Fixes #21579 props jkudish.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r21504 r21571  
    23392339
    23402340    $link = get_permalink( $id );
     2341
     2342    if ( $page = get_query_var('cpage') )
     2343        $link = get_comments_pagenum_link( $page );
     2344
    23412345    echo "<link rel='canonical' href='$link' />\n";
    23422346}
Note: See TracChangeset for help on using the changeset viewer.