[wp-trac] [WordPress Trac] #18886: $stripteaser documentation incorrect

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 8 09:21:27 UTC 2011


#18886: $stripteaser documentation incorrect
--------------------------+-----------------------------
 Reporter:  GaryJ         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Inline Docs   |    Version:  3.2.1
 Severity:  trivial       |   Keywords:  has-patch
--------------------------+-----------------------------
 For `the_content()` and `get_the_content()` functions, the `@param` tag
 for `$stripteaser` is listed as a string, yet the default value is an
 integer, and the actual usage is as a boolean.

 The deprecated `the_content_rss()` lists it as an `int|bool`.

 {{{
 * @param string $stripteaser Optional. Teaser content before the more
 text.
 }}}
 should be updated in both cases to something like:
 {{{
 * @param bool $stripteaser Optional. Show teaser content before the more
 text. Default is false.
 }}}
 and set the default value from `0`, to `false`, to make it clear that this
 is a boolean flag.

 Within `get_the_content()` the line where `$stripteaser` is set to 1,
 should be changed to being set to true, just as the `$hasTeaser` boolean
 variable above it does. Clearer intention of a variable is worth a few
 extra bytes.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18886>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list