WordPress.org

Make WordPress Core

Ticket #4975: 4975-post-template.php.patch

File 4975-post-template.php.patch, 1.7 KB (added by pishmishy, 8 years ago)
  • wp-includes/post-template.php

     
    5353        return apply_filters('get_the_guid', $post->guid); 
    5454} 
    5555 
    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); 
     56function 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); 
    5958        $content = str_replace(']]>', ']]&gt;', $content); 
    6059        echo $content; 
    6160} 
    6261 
    6362 
    64 function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { 
     63function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '',$more_before = '<p>',$more_after = '</p>') { 
    6564        global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages; 
    6665        global $preview; 
    6766        global $pagenow; 
     
    9695        if ( ($more) && ($stripteaser) ) 
    9796                $teaser = ''; 
    9897        $output .= $teaser; 
     98        $output = apply_filters('the_content', $output); 
    9999        if ( count($content) > 1 ) { 
    100100                if ( $more ) { 
    101101                        $output .= '<span id="more-'.$id.'"></span>'.$content[1]; 
    102102                } else { 
    103103                        $output = balanceTags($output); 
    104104                        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; 
    106106                } 
    107107 
    108108        }