WordPress.org

Make WordPress Core

Changeset 19069


Ignore:
Timestamp:
10/26/2011 10:15:29 AM (8 years ago)
Author:
duck_
Message:

Correctly document $stripteaser as a boolean flag. Props GaryJ, fixes #18886.

File:
1 edited

Legend:

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

    r18886 r19069  
    161161 *
    162162 * @param string $more_link_text Optional. Content for when there is more text.
    163  * @param string $stripteaser Optional. Teaser content before the more text.
    164  */
    165 function the_content($more_link_text = null, $stripteaser = 0) {
     163 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
     164 */
     165function the_content($more_link_text = null, $stripteaser = false) {
    166166    $content = get_the_content($more_link_text, $stripteaser);
    167167    $content = apply_filters('the_content', $content);
     
    176176 *
    177177 * @param string $more_link_text Optional. Content for when there is more text.
    178  * @param string $stripteaser Optional. Teaser content before the more text.
     178 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
    179179 * @return string
    180180 */
    181 function get_the_content($more_link_text = null, $stripteaser = 0) {
     181function get_the_content($more_link_text = null, $stripteaser = false) {
    182182    global $post, $more, $page, $pages, $multipage, $preview;
    183183
     
    208208    }
    209209    if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
    210         $stripteaser = 1;
     210        $stripteaser = true;
    211211    $teaser = $content[0];
    212     if ( ($more) && ($stripteaser) && ($hasTeaser) )
     212    if ( $more && $stripteaser && $hasTeaser )
    213213        $teaser = '';
    214214    $output .= $teaser;
Note: See TracChangeset for help on using the changeset viewer.