Make WordPress Core

Changeset 18907


Ignore:
Timestamp:
10/06/2011 09:09:37 PM (15 years ago)
Author:
markjaquith
Message:

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

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r18855 r18907  
    17121712        $excerpt = wp_html_excerpt($excerpt, 252) . '...';
    17131713
    1714         $post_title = apply_filters('the_title', $post->post_title);
     1714        $post_title = apply_filters('the_title', $post->post_title, $post->ID);
    17151715        $post_title = strip_tags($post_title);
    17161716
  • trunk/wp-includes/deprecated.php

    r18827 r18907  
    150150        $string = '<a href="'.get_permalink($post->ID).'">'.$previous;
    151151        if ( 'yes' == $title )
    152                 $string .= apply_filters('the_title', $post->post_title, $post);
     152                $string .= apply_filters('the_title', $post->post_title, $post->ID);
    153153        $string .= '</a>';
    154154        $format = str_replace('%', $string, $format);
    … …  
    186186        $string = '<a href="'.get_permalink($post->ID).'">'.$next;
    187187        if ( 'yes' == $title )
    188                 $string .= apply_filters('the_title', $post->post_title, $nextpost);
     188                $string .= apply_filters('the_title', $post->post_title, $post->ID);
    189189        $string .= '</a>';
    190190        $format = str_replace('%', $string, $format);
  • trunk/wp-includes/general-template.php

    r18723 r18907  
    10131013                        foreach ( (array) $arcresults as $arcresult ) {
    10141014                                if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {
    1015                                         $url  = get_permalink($arcresult);
    1016                                         $arc_title = $arcresult->post_title;
    1017                                         if ( $arc_title )
    1018                                                 $text = strip_tags(apply_filters('the_title', $arc_title));
     1015                                        $url  = get_permalink( $arcresult );
     1016                                        if ( $arcresult->post_title )
     1017                                                $text = strip_tags( apply_filters( 'the_title', $arcresult->post_title, $arcresult->ID ) );
    10191018                                        else
    10201019                                                $text = $arcresult->ID;
Note: See TracChangeset for help on using the changeset viewer.