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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
duck_ 2011-10-26 10:15:29 +00:00
parent 7ba5b2f7a3
commit abd0c8c231
1 changed files with 6 additions and 6 deletions

View File

@ -160,9 +160,9 @@ function get_the_guid( $id = 0 ) {
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
* @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
*/
function the_content($more_link_text = null, $stripteaser = 0) {
function the_content($more_link_text = null, $stripteaser = false) {
$content = get_the_content($more_link_text, $stripteaser);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
@ -175,10 +175,10 @@ function the_content($more_link_text = null, $stripteaser = 0) {
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param string $stripteaser Optional. Teaser content before the more text.
* @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
* @return string
*/
function get_the_content($more_link_text = null, $stripteaser = 0) {
function get_the_content($more_link_text = null, $stripteaser = false) {
global $post, $more, $page, $pages, $multipage, $preview;
if ( null === $more_link_text )
@ -207,9 +207,9 @@ function get_the_content($more_link_text = null, $stripteaser = 0) {
$content = array($content);
}
if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
$stripteaser = 1;
$stripteaser = true;
$teaser = $content[0];
if ( ($more) && ($stripteaser) && ($hasTeaser) )
if ( $more && $stripteaser && $hasTeaser )
$teaser = '';
$output .= $teaser;
if ( count($content) > 1 ) {