Make WordPress Core

Changeset 14653


Ignore:
Timestamp:
05/15/2010 05:26:25 AM (15 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r14593 r14653  
    10731073    $title = str_replace('%title', $post->post_title, $title);
    10741074    $title = str_replace('%date', $date, $title);
    1075     $title = apply_filters('the_title', $title, $post);
     1075    $title = apply_filters('the_title', $title, $post->ID);
    10761076
    10771077    $link = $previous ? "<link rel='prev' title='" : "<link rel='next' title='";
     
    12111211    $title = str_replace('%title', $post->post_title, $title);
    12121212    $title = str_replace('%date', $date, $title);
    1213     $title = apply_filters('the_title', $title, $post);
     1213    $title = apply_filters('the_title', $title, $post->ID);
    12141214
    12151215    $link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
     
    12741274    $title = str_replace('%title', $post->post_title, $title);
    12751275    $title = str_replace('%date', $date, $title);
    1276     $title = apply_filters('the_title', $title, $post);
     1276    $title = apply_filters('the_title', $title, $post->ID);
    12771277
    12781278    $link = "<link rel='up' title='";
     
    13471347        $title = $previous ? __('Previous Post') : __('Next Post');
    13481348
    1349     $title = apply_filters('the_title', $title, $post);
     1349    $title = apply_filters('the_title', $title, $post->ID);
    13501350    $date = mysql2date(get_option('date_format'), $post->post_date);
    13511351    $rel = $previous ? 'prev' : 'next';
Note: See TracChangeset for help on using the changeset viewer.