WordPress.org

Make WordPress Core

Ticket #4209: 4209.1.diff

File 4209.1.diff, 637 bytes (added by vladimir_kolesnikov, 6 years ago)

Patch #1 (plugins have to check if rel is already there)

  • wp-includes/link-template.php

     
    12071207 
    12081208        $title = apply_filters('the_title', $title, $post); 
    12091209        $date = mysql2date(get_option('date_format'), $post->post_date); 
     1210        $rel = $previous ? 'prev' : 'next'; 
    12101211 
    1211         $string = '<a href="'.get_permalink($post).'">'; 
     1212        $string = '<a href="'.get_permalink($post).'" rel="'.$rel.'">'; 
    12121213        $link = str_replace('%title', $title, $link); 
    12131214        $link = str_replace('%date', $date, $link); 
    12141215        $link = $string . $link . '</a>';