(More more more) how do you like it, how do you like it. fixes #2991

git-svn-id: http://svn.automattic.com/wordpress/trunk@4070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-08-01 04:54:23 +00:00
parent 4495b15135
commit ca2dcf7d1d
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,11 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$file = $pagenow; //$_SERVER['PHP_SELF']; $file = $pagenow; //$_SERVER['PHP_SELF'];
$content = $pages[$page-1]; $content = $pages[$page-1];
$content = explode('<!--more-->', $content, 2); if ( preg_match('/<!--more(.+?)?-->/', $content, $matches) ) {
$content = explode($matches[0], $content, 2);
if ( !empty($matches[1]) )
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
}
if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) ) if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
$stripteaser = 1; $stripteaser = 1;
$teaser = $content[0]; $teaser = $content[0];