Ticket #2348: div-balance.diff
File div-balance.diff, 1.7 KB (added by , 19 years ago) |
---|
-
wp-includes/template-functions-post.php
79 79 80 80 $content = $pages[$page-1]; 81 81 $content = explode('<!--more-->', $content, 2); 82 if ( ( preg_match('/<!--noteaser-->/', $post->post_content) && ((!$multipage) || ($page==1))) )82 if ( (false !== strpos($post->post_content, '<!--noteaser-->') && ((!$multipage) || ($page==1))) ) 83 83 $stripteaser = 1; 84 84 $teaser = $content[0]; 85 85 if ( ($more) && ($stripteaser) ) … … 89 89 if ( $more ) 90 90 $output .= '<a id="more-'.$id.'"></a>'.$content[1]; 91 91 else 92 $output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>";92 $output = balanceTags($output . ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>"); 93 93 } 94 94 if ( $preview ) // preview fix for javascript bug with foreign languages 95 95 $output = preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output); -
wp-includes/functions-formatting.php
400 400 Added Cleaning Hooks 401 401 1.0 First Version 402 402 */ 403 function balanceTags($text, $is_comment = 0 ) {403 function balanceTags($text, $is_comment = 0, $force = false) { 404 404 405 if ( get_option('use_balanceTags') == 0)405 if ( !$force && get_option('use_balanceTags') == 0 ) 406 406 return $text; 407 407 408 408 $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = '';