WordPress.org

Make WordPress Core

Ticket #11028: get_the_content-dead_code.11028.diff

File get_the_content-dead_code.11028.diff, 2.6 KB (added by filosofo, 4 years ago)
  • wp-includes/post-template.php

     
    160160 * 
    161161 * @param string $more_link_text Optional. Content for when there is more text. 
    162162 * @param string $stripteaser Optional. Teaser content before the more text. 
    163  * @param string $more_file Optional. Not used. 
    164163 */ 
    165 function the_content($more_link_text = null, $stripteaser = 0, $more_file = '') { 
    166         $content = get_the_content($more_link_text, $stripteaser, $more_file); 
     164function the_content($more_link_text = null, $stripteaser = 0) { 
     165        $content = get_the_content($more_link_text, $stripteaser); 
    167166        $content = apply_filters('the_content', $content); 
    168167        $content = str_replace(']]>', ']]>', $content); 
    169168        echo $content; 
     
    176175 * 
    177176 * @param string $more_link_text Optional. Content for when there is more text. 
    178177 * @param string $stripteaser Optional. Teaser content before the more text. 
    179  * @param string $more_file Optional. Not used. 
    180178 * @return string 
    181179 */ 
    182 function get_the_content($more_link_text = null, $stripteaser = 0, $more_file = '') { 
     180function get_the_content($more_link_text = null, $stripteaser = 0) { 
    183181        global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow; 
    184182 
    185183        if ( null === $more_link_text ) 
     
    194192                return $output; 
    195193        } 
    196194 
    197         if ( $more_file != '' ) 
    198                 $file = $more_file; 
    199         else 
    200                 $file = $pagenow; //$_SERVER['PHP_SELF']; 
    201  
    202195        if ( $page > count($pages) ) // if the requested page doesn't exist 
    203196                $page = count($pages); // give them the highest numbered page that DOES exist 
    204197 
     
    549542 *      each bookmarks. 
    550543 * 'after' - Default is '</p>' (string). The html or text to append to each 
    551544 *      bookmarks. 
    552  * 'more_file' - Default is '' (string) Page the links should point to. Defaults 
    553  *      to the current page. 
    554545 * 'link_before' - Default is '' (string). The html or text to prepend to each 
    555546 *      Pages link inside the <a> tag. 
    556547 * 'link_after' - Default is '' (string). The html or text to append to each 
     
    568559                'link_before' => '', 'link_after' => '', 
    569560                'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 
    570561                'previouspagelink' => __('Previous page'), 'pagelink' => '%', 
    571                 'more_file' => '', 'echo' => 1 
     562                'echo' => 1 
    572563        ); 
    573564 
    574565        $r = wp_parse_args( $args, $defaults ); 
    575566        extract( $r, EXTR_SKIP ); 
    576567 
    577568        global $post, $page, $numpages, $multipage, $more, $pagenow; 
    578         if ( $more_file != '' ) 
    579                 $file = $more_file; 
    580         else 
    581                 $file = $pagenow; 
    582569 
    583570        $output = ''; 
    584571        if ( $multipage ) {