Make WordPress Core


Ignore:
Timestamp:
06/25/2007 05:48:35 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.