WordPress.org

Make WordPress Core

Changeset 10954


Ignore:
Timestamp:
04/16/09 19:43:01 (5 years ago)
Author:
ryan
Message:

Fix teaser stripping when no teaser. Props makibo, simonwheatley. fixes #6312

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r10950 r10954  
    184184 
    185185    $output = ''; 
     186    $hasTeaser = false; 
    186187 
    187188    // If post password required and it doesn't match the cookie. 
     
    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); 
     
    210213        $stripteaser = 1; 
    211214    $teaser = $content[0]; 
    212     if ( ($more) && ($stripteaser) ) 
     215    if ( ($more) && ($stripteaser) && ($hasTeaser) ) 
    213216        $teaser = ''; 
    214217    $output .= $teaser; 
Note: See TracChangeset for help on using the changeset viewer.