WordPress.org

Make WordPress Core

Changeset 5752


Ignore:
Timestamp:
06/25/07 17:48:35 (8 years ago)
Author:
ryan
Message:

Move the_title filter to get_the_title. Props jhodgdon. fixes #4477

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/index.php

    r5676 r5752  
    5050if ( $comments ) { 
    5151foreach ($comments as $comment) { 
    52     echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . apply_filters('the_title', get_the_title($comment->comment_post_ID)) . '</a>'); 
     52    echo '<li>' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '">' . get_the_title($comment->comment_post_ID) . '</a>'); 
    5353    edit_comment_link(__("Edit"), ' <small>(', ')</small>'); 
    5454    echo '</li>'; 
  • trunk/wp-includes/comment-template.php

    r5708 r5752  
    365365        echo ' class="'.$CSSclass.'"'; 
    366366    } 
    367     $title = attribute_escape(apply_filters('the_title', get_the_title())); 
     367    $title = attribute_escape(get_the_title()); 
    368368    echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">'; 
    369369    comments_number($zero, $one, $more, $number); 
  • trunk/wp-includes/feed-atom-comments.php

    r5617 r5752  
    3434            if ( !is_singular() ) { 
    3535                $title = get_the_title($comment_post->ID); 
    36                 $title = apply_filters('the_title', $title); 
    3736                $title = apply_filters('the_title_rss', $title); 
    3837                printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss()); 
  • trunk/wp-includes/feed-rss2-comments.php

    r5640 r5752  
    3030            if ( !is_singular() ) { 
    3131                $title = get_the_title($comment_post->ID); 
    32                 $title = apply_filters('the_title', $title); 
    3332                $title = apply_filters('the_title_rss', $title); 
    3433                printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss()); 
  • trunk/wp-includes/feed.php

    r5548 r5752  
    2323function get_the_title_rss() { 
    2424    $title = get_the_title(); 
    25     $title = apply_filters('the_title', $title); 
    2625    $title = apply_filters('the_title_rss', $title); 
    2726    return $title; 
  • trunk/wp-includes/post-template.php

    r5708 r5752  
    1919function the_title($before = '', $after = '', $echo = true) { 
    2020    $title = get_the_title(); 
    21     if ( strlen($title) > 0 ) { 
    22         $title = apply_filters('the_title', $before . $title . $after, $before, $after); 
    23         if ( $echo ) 
    24             echo $title; 
    25         else 
    26             return $title; 
    27     } 
    28 } 
    29  
    30  
    31 function get_the_title($id = 0) { 
     21 
     22    if ( strlen($title) <= 0 ) 
     23        return; 
     24 
     25    $title = $before . $title . $after; 
     26 
     27    if ( $echo ) 
     28        echo $title; 
     29    else 
     30        return $title; 
     31} 
     32 
     33 
     34function get_the_title( $id = 0 ) { 
    3235    $post = &get_post($id); 
    3336 
     
    3841        $title = sprintf(__('Private: %s'), $title); 
    3942 
    40     return $title; 
     43    return apply_filters( 'the_title', $title ); 
    4144} 
    4245 
Note: See TracChangeset for help on using the changeset viewer.