summaryrefslogtreecommitdiffstats
path: root/wp-includes/post-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-09-12 15:36:57 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-09-12 15:36:57 +0000
commitf41f35fc323e7aae3f8c9d7e696eb54e306cc679 (patch)
tree6c998f4e79b9e79b823e01215a2b3f7b0a8e5f90 /wp-includes/post-template.php
parent7a2ba28084eb8b23f9109473d7c57f14c3a059a2 (diff)
downloadwordpress-mu-f41f35fc323e7aae3f8c9d7e696eb54e306cc679.tar.gz
wordpress-mu-f41f35fc323e7aae3f8c9d7e696eb54e306cc679.tar.xz
wordpress-mu-f41f35fc323e7aae3f8c9d7e696eb54e306cc679.zip
WP Merge to rev 4185
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@743 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post-template.php')
-rw-r--r--wp-includes/post-template.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index 8207720..f0d1eab 100644
--- a/wp-includes/post-template.php
+++ b/wp-includes/post-template.php
@@ -82,7 +82,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$content = $pages[$page-1];
if ( preg_match('/<!--more(.+?)?-->/', $content, $matches) ) {
$content = explode($matches[0], $content, 2);
- if ( !empty($matches[1]) )
+ if ( !empty($matches[1]) && !empty($more_link_text) )
$more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
} else {
$content = array($content);
@@ -94,10 +94,14 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$teaser = '';
$output .= $teaser;
if ( count($content) > 1 ) {
- if ( $more )
+ if ( $more ) {
$output .= '<a id="more-'.$id.'"></a>'.$content[1];
- else
- $output = balanceTags($output . ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>");
+ } else {
+ $output = balanceTags($output);
+ if ( ! empty($more_link_text) )
+ $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);