Ticket #18674: 18764.patch
File 18764.patch, 1.7 KB (added by , 13 years ago) |
---|
-
wp-includes/link-template.php
1456 1456 else 1457 1457 $post = get_adjacent_post($in_same_cat, $excluded_categories, $previous); 1458 1458 1459 if ( !$post ) 1460 return; 1459 if ( !$post ) { 1460 $output = ''; 1461 } else { 1461 1462 1462 $title = $post->post_title;1463 $title = $post->post_title; 1463 1464 1464 if ( empty($post->post_title) )1465 $title = $previous ? __('Previous Post') : __('Next Post');1465 if ( empty($post->post_title) ) 1466 $title = $previous ? __('Previous Post') : __('Next Post'); 1466 1467 1467 $title = apply_filters('the_title', $title, $post->ID);1468 $date = mysql2date(get_option('date_format'), $post->post_date);1469 $rel = $previous ? 'prev' : 'next';1468 $title = apply_filters('the_title', $title, $post->ID); 1469 $date = mysql2date(get_option('date_format'), $post->post_date); 1470 $rel = $previous ? 'prev' : 'next'; 1470 1471 1471 $string = '<a href="'.get_permalink($post).'" rel="'.$rel.'">';1472 $link = str_replace('%title', $title, $link);1473 $link = str_replace('%date', $date, $link);1474 $link = $string . $link . '</a>';1472 $string = '<a href="'.get_permalink($post).'" rel="'.$rel.'">'; 1473 $inlink = str_replace('%title', $title, $link); 1474 $inlink = str_replace('%date', $date, $inlink); 1475 $inlink = $string . $inlink . '</a>'; 1475 1476 1476 $format = str_replace('%link', $link, $format); 1477 1477 $output = str_replace('%link', $inlink, $format); 1478 } 1479 1478 1480 $adjacent = $previous ? 'previous' : 'next'; 1479 echo apply_filters( "{$adjacent}_post_link", $ format, $link );1481 echo apply_filters( "{$adjacent}_post_link", $output, $format, $link ); 1480 1482 } 1481 1483 1482 1484 /**