Always pass post ID, not post object, to the_title filter. Original the_title filter in get_the_title() uses ID only. props filosofo, fixes #12631.

git-svn-id: https://develop.svn.wordpress.org/trunk@14653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-15 05:26:25 +00:00
parent 4d594cc798
commit e6ae8c05e8
1 changed files with 4 additions and 4 deletions

View File

@ -1072,7 +1072,7 @@ function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $ex
$title = str_replace('%title', $post->post_title, $title);
$title = str_replace('%date', $date, $title);
$title = apply_filters('the_title', $title, $post);
$title = apply_filters('the_title', $title, $post->ID);
$link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
$link .= esc_attr( $title );
@ -1210,7 +1210,7 @@ function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $ex
$title = str_replace('%title', $post->post_title, $title);
$title = str_replace('%date', $date, $title);
$title = apply_filters('the_title', $title, $post);
$title = apply_filters('the_title', $title, $post->ID);
$link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
$link .= esc_attr($title);
@ -1273,7 +1273,7 @@ function get_parent_post_rel_link($title = '%title') {
$title = str_replace('%title', $post->post_title, $title);
$title = str_replace('%date', $date, $title);
$title = apply_filters('the_title', $title, $post);
$title = apply_filters('the_title', $title, $post->ID);
$link = "<link rel='up' title='";
$link .= esc_attr( $title );
@ -1346,7 +1346,7 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
if ( empty($post->post_title) )
$title = $previous ? __('Previous Post') : __('Next Post');
$title = apply_filters('the_title', $title, $post);
$title = apply_filters('the_title', $title, $post->ID);
$date = mysql2date(get_option('date_format'), $post->post_date);
$rel = $previous ? 'prev' : 'next';