Always pass the post ID as the second argument to the the_title filter. props GaryJ. fixes #16688

git-svn-id: http://svn.automattic.com/wordpress/trunk@18907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2011-10-06 21:09:37 +00:00
parent 2f40f0c6fc
commit 9e80bec002
3 changed files with 6 additions and 7 deletions

View File

@ -1711,7 +1711,7 @@ function do_trackbacks($post_id) {
$excerpt = str_replace(']]>', ']]>', $excerpt);
$excerpt = wp_html_excerpt($excerpt, 252) . '...';
$post_title = apply_filters('the_title', $post->post_title);
$post_title = apply_filters('the_title', $post->post_title, $post->ID);
$post_title = strip_tags($post_title);
if ( $to_ping ) {

View File

@ -149,7 +149,7 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $
$string = '<a href="'.get_permalink($post->ID).'">'.$previous;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $post);
$string .= apply_filters('the_title', $post->post_title, $post->ID);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;
@ -185,7 +185,7 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
$string = '<a href="'.get_permalink($post->ID).'">'.$next;
if ( 'yes' == $title )
$string .= apply_filters('the_title', $post->post_title, $nextpost);
$string .= apply_filters('the_title', $post->post_title, $post->ID);
$string .= '</a>';
$format = str_replace('%', $string, $format);
echo $format;

View File

@ -1012,10 +1012,9 @@ function wp_get_archives($args = '') {
if ( $arcresults ) {
foreach ( (array) $arcresults as $arcresult ) {
if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {
$url = get_permalink($arcresult);
$arc_title = $arcresult->post_title;
if ( $arc_title )
$text = strip_tags(apply_filters('the_title', $arc_title));
$url = get_permalink( $arcresult );
if ( $arcresult->post_title )
$text = strip_tags( apply_filters( 'the_title', $arcresult->post_title, $arcresult->ID ) );
else
$text = $arcresult->ID;
$output .= get_archives_link($url, $text, $format, $before, $after);