WordPress.org

Make WordPress Core

Changeset 14964


Ignore:
Timestamp:
05/26/2010 09:30:00 PM (8 years ago)
Author:
nacin
Message:

Always pass post ID to the_title filter. props dndrnkrd, fixes #13558

Location:
trunk/wp-includes
Files:
3 edited

Legend:

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

    r14747 r14964  
    12031203        $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page));
    12041204
    1205         $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page->post_title ) ) ) . '">' . $link_before . apply_filters( 'the_title', $page->post_title ) . $link_after . '</a>';
     1205        $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page->post_title, $page->ID ) ) ) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';
    12061206
    12071207        if ( !empty($show_date) ) {
  • trunk/wp-includes/general-template.php

    r14804 r14964  
    11981198
    11991199    $ak_titles_for_day = array();
    1200     $ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom "
     1200    $ak_post_titles = $wpdb->get_results("SELECT ID, post_title, DAYOFMONTH(post_date) as dom "
    12011201        ."FROM $wpdb->posts "
    12021202        ."WHERE YEAR(post_date) = '$thisyear' "
     
    12081208        foreach ( (array) $ak_post_titles as $ak_post_title ) {
    12091209
    1210                 $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title ) );
     1210                $post_title = esc_attr( apply_filters( 'the_title', $ak_post_title->post_title, $ak_post_title->ID ) );
    12111211
    12121212                if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
  • trunk/wp-includes/nav-menu-template.php

    r14945 r14964  
    108108        $item_output = $args->before;
    109109        $item_output .= '<a'. $attributes .'>';
    110         $item_output .= $args->link_before . apply_filters( 'the_title', $item->title ) . $args->link_after;
     110        $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
    111111        $item_output .= '</a>';
    112112        $item_output .= $args->after;
Note: See TracChangeset for help on using the changeset viewer.