Ticket #4477: get-the-title.diff
| File get-the-title.diff, 4.1 KB (added by , 19 years ago) |
|---|
-
E:/EclipseWork/WordPressDev/wp-includes/post-template.php
17 17 18 18 19 19 function the_title($before = '', $after = '', $echo = true) { 20 $title = get_the_title( );20 $title = get_the_title( 0, false ); 21 21 if ( strlen($title) > 0 ) { 22 22 $title = apply_filters('the_title', $before . $title . $after, $before, $after); 23 23 if ( $echo ) … … 28 28 } 29 29 30 30 31 function get_the_title($id = 0 ) {31 function get_the_title($id = 0, $filter = true ) { 32 32 $post = &get_post($id); 33 33 34 34 $title = $post->post_title; … … 37 37 else if ( 'private' == $post->post_status ) 38 38 $title = sprintf(__('Private: %s'), $title); 39 39 40 if( $filter ) 41 $title = apply_filters( 'the_title', $title ); 42 40 43 return $title; 41 44 } 42 45 -
E:/EclipseWork/WordPressDev/wp-includes/feed-rss2-comments.php
29 29 <title><?php 30 30 if ( !is_singular() ) { 31 31 $title = get_the_title($comment_post->ID); 32 $title = apply_filters('the_title', $title);33 32 $title = apply_filters('the_title_rss', $title); 34 33 printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss()); 35 34 } else { -
E:/EclipseWork/WordPressDev/wp-includes/feed.php
22 22 23 23 function get_the_title_rss() { 24 24 $title = get_the_title(); 25 $title = apply_filters('the_title', $title);26 25 $title = apply_filters('the_title_rss', $title); 27 26 return $title; 28 27 } -
E:/EclipseWork/WordPressDev/wp-includes/comment-template.php
364 364 if (!empty($CSSclass)) { 365 365 echo ' class="'.$CSSclass.'"'; 366 366 } 367 $title = attribute_escape( apply_filters('the_title', get_the_title()));367 $title = attribute_escape(get_the_title()); 368 368 echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">'; 369 369 comments_number($zero, $one, $more, $number); 370 370 echo '</a>'; -
E:/EclipseWork/WordPressDev/wp-includes/feed-atom-comments.php
33 33 <title><?php 34 34 if ( !is_singular() ) { 35 35 $title = get_the_title($comment_post->ID); 36 $title = apply_filters('the_title', $title);37 36 $title = apply_filters('the_title_rss', $title); 38 37 printf(__('Comment on %1$s by %2$s'), $title, get_comment_author_rss()); 39 38 } else { -
E:/EclipseWork/WordPressDev/wp-admin/index.php
49 49 <?php 50 50 if ( $comments ) { 51 51 foreach ($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>'); 53 53 edit_comment_link(__("Edit"), ' <small>(', ')</small>'); 54 54 echo '</li>'; 55 55 }