Div balance across more. Props skeltoac. fixes #2348
git-svn-id: https://develop.svn.wordpress.org/trunk@3751 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aa850594af
commit
d983d337d4
|
@ -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 = '';
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue