Ticket #4975: 4975-post-template.php.patch
File 4975-post-template.php.patch, 1.7 KB (added by , 17 years ago) |
---|
-
wp-includes/post-template.php
53 53 return apply_filters('get_the_guid', $post->guid); 54 54 } 55 55 56 function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { 57 $content = get_the_content($more_link_text, $stripteaser, $more_file); 58 $content = apply_filters('the_content', $content); 56 function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '',$more_before = '<p>',$more_after = '</p>') { 57 $content = get_the_content($more_link_text, $stripteaser, $more_file,$more_before,$more_after); 59 58 $content = str_replace(']]>', ']]>', $content); 60 59 echo $content; 61 60 } 62 61 63 62 64 function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '' ) {63 function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '',$more_before = '<p>',$more_after = '</p>') { 65 64 global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages; 66 65 global $preview; 67 66 global $pagenow; … … 96 95 if ( ($more) && ($stripteaser) ) 97 96 $teaser = ''; 98 97 $output .= $teaser; 98 $output = apply_filters('the_content', $output); 99 99 if ( count($content) > 1 ) { 100 100 if ( $more ) { 101 101 $output .= '<span id="more-'.$id.'"></span>'.$content[1]; 102 102 } else { 103 103 $output = balanceTags($output); 104 104 if ( ! empty($more_link_text) ) 105 $output .= ' <a href="' . get_permalink() . '#more-' . $id . '" class="morelink">' . $more_link_text . '</a>';105 $output .= $more_before . '<a href="' . get_permalink() . '#more-' . $id . '" class="morelink">' . $more_link_text . '</a>'.$more_after; 106 106 } 107 107 108 108 }