mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
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:
parent
2f40f0c6fc
commit
9e80bec002
@ -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 ) {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user