Make WordPress Core

Changeset 11866


Ignore:
Timestamp:
08/21/2009 05:12:25 PM (15 years ago)
Author:
westi
Message:

Add rel attribute to next/previous post links. Fixes #4209 props vladimir_kolesnikov

File:
1 edited

Legend:

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

    r11795 r11866  
    12071207    $title = apply_filters('the_title', $title, $post);
    12081208    $date = mysql2date(get_option('date_format'), $post->post_date);
    1209 
    1210     $string = '<a href="'.get_permalink($post).'">';
     1209    $rel = $previous ? 'prev' : 'next';
     1210
     1211    $string = '<a href="'.get_permalink($post).'" rel="'.$rel.'">';
    12111212    $link = str_replace('%title', $title, $link);
    12121213    $link = str_replace('%date', $date, $link);
Note: See TracChangeset for help on using the changeset viewer.