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: http://svn.automattic.com/wordpress/trunk@14653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
36af10b6b7
commit
b0910977a9
|
@ -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('%title', $post->post_title, $title);
|
||||||
$title = str_replace('%date', $date, $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 = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
|
||||||
$link .= esc_attr( $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('%title', $post->post_title, $title);
|
||||||
$title = str_replace('%date', $date, $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 = $start ? "<link rel='start' title='" : "<link rel='end' title='";
|
||||||
$link .= esc_attr($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('%title', $post->post_title, $title);
|
||||||
$title = str_replace('%date', $date, $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 = "<link rel='up' title='";
|
||||||
$link .= esc_attr( $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) )
|
if ( empty($post->post_title) )
|
||||||
$title = $previous ? __('Previous Post') : __('Next Post');
|
$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);
|
$date = mysql2date(get_option('date_format'), $post->post_date);
|
||||||
$rel = $previous ? 'prev' : 'next';
|
$rel = $previous ? 'prev' : 'next';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue