WordPress.org

Make WordPress Core

Ticket #6312: 6312.diff

File 6312.diff, 1.1 KB (added by makibo, 14 years ago)

patched post-template.php

  • post-template.php

     
    8686        global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;
    8787
    8888        $output = '';
     89        $hasTeaser = false;
    8990
    9091        if ( !empty($post->post_password) ) { // if there's a password
    9192                if ( !isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) {       // and it doesn't match the cookie
     
    107108                $content = explode($matches[0], $content, 2);
    108109                if ( !empty($matches[1]) && !empty($more_link_text) )
    109110                        $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
     111
     112                $hasTeaser = true;
    110113        } else {
    111114                $content = array($content);
    112115        }
    113116        if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
    114117                $stripteaser = 1;
    115118        $teaser = $content[0];
    116         if ( ($more) && ($stripteaser) )
     119        if ( ($more) && ($stripteaser) && ($hasTeaser) )
    117120                $teaser = '';
    118121        $output .= $teaser;
    119122        if ( count($content) > 1 ) {