Div balance across more. Props skeltoac. fixes #2348

git-svn-id: http://svn.automattic.com/wordpress/trunk@3751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-04-25 08:46:19 +00:00
parent a785678283
commit 45302e1c22
2 changed files with 4 additions and 4 deletions

View File

@ -404,9 +404,9 @@ function funky_javascript_fix($text) {
Added Cleaning Hooks
1.0 First Version
*/
function balanceTags($text, $is_comment = 0) {
function balanceTags($text, $is_comment = 0, $force = false) {
if ( get_option('use_balanceTags') == 0)
if ( !$force && get_option('use_balanceTags') == 0 )
return $text;
$tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';

View File

@ -83,7 +83,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$content = $pages[$page-1];
$content = explode('<!--more-->', $content, 2);
if ( (preg_match('/<!--noteaser-->/', $post->post_content) && ((!$multipage) || ($page==1))) )
if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) )
$stripteaser = 1;
$teaser = $content[0];
if ( ($more) && ($stripteaser) )
@ -93,7 +93,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
if ( $more )
$output .= '<a id="more-'.$id.'"></a>'.$content[1];
else
$output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>";
$output = balanceTags($output . ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>");
}
if ( $preview ) // preview fix for javascript bug with foreign languages
$output = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output);