Ticket #4209: 4209.2.diff
| File 4209.2.diff, 887 bytes (added by vladimir_kolesnikov, 4 years ago) |
|---|
-
wp-includes/link-template.php
1207 1207 1208 1208 $title = apply_filters('the_title', $title, $post); 1209 1209 $date = mysql2date(get_option('date_format'), $post->post_date); 1210 $rel = $previous ? 'prev' : 'next'; 1210 1211 1211 1212 $string = '<a href="'.get_permalink($post).'">'; 1212 1213 $link = str_replace('%title', $title, $link); … … 1216 1217 $format = str_replace('%link', $link, $format); 1217 1218 1218 1219 $adjacent = $previous ? 'previous' : 'next'; 1219 echo apply_filters( "{$adjacent}_post_link", $format, $link ); 1220 $result = apply_filters( "{$adjacent}_post_link", $format, $link ); 1221 if ( !preg_match('/\\brel=/', $result) ) { 1222 $result = str_replace('<a ', '<a rel="'.$rel.'" ', $result); 1223 } 1224 1225 echo $result; 1220 1226 } 1221 1227 1222 1228 /**
