WordPress.org

Make WordPress Core

Ticket #6312: 6312.2.diff

File 6312.2.diff, 1.1 KB (added by simonwheatley, 13 years ago)

Amended patch to work against trunk (as of right now)

  • Users/simon/Projects/WordPress-Bleeding/site/wordpress/wp-includes/post-template.php

     
    183183                $more_link_text = __( '(more...)' );
    184184
    185185        $output = '';
     186        $hasTeaser = false;
    186187
    187188        // If post password required and it doesn't match the cookie.
    188189        if ( post_password_required($post) ) {
     
    203204                $content = explode($matches[0], $content, 2);
    204205                if ( !empty($matches[1]) && !empty($more_link_text) )
    205206                        $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
     207
     208                $hasTeaser = true;
    206209        } else {
    207210                $content = array($content);
    208211        }
    209212        if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
    210213                $stripteaser = 1;
    211214        $teaser = $content[0];
    212         if ( ($more) && ($stripteaser) )
     215        if ( ($more) && ($stripteaser) && ($hasTeaser) )
    213216                $teaser = '';
    214217        $output .= $teaser;
    215218        if ( count($content) > 1 ) {