summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wp-admin/admin.php3
-rw-r--r--wp-includes/formatting.php2
-rw-r--r--wp-includes/js/autosave.js.php4
-rw-r--r--wp-includes/post-template.php12
-rw-r--r--wp-includes/script-loader.php8
-rw-r--r--wp-rss2.php2
6 files changed, 22 insertions, 9 deletions
diff --git a/wp-admin/admin.php b/wp-admin/admin.php
index 8458440..655ebf1 100644
--- a/wp-admin/admin.php
+++ b/wp-admin/admin.php
@@ -15,7 +15,6 @@ if ( get_option('db_version') != $wp_db_version ) {
}
}
-
require_once(ABSPATH . 'wp-admin/admin-functions.php');
require_once(ABSPATH . 'wp-admin/admin-db.php');
require_once(ABSPATH . WPINC . '/registration.php');
@@ -110,6 +109,8 @@ if (isset($plugin_page)) {
include(ABSPATH . 'wp-admin/admin-footer.php');
exit();
+} else {
+ do_action("load-$pagenow");
}
?>
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index 0f5cc74..6094dcb 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -741,7 +741,7 @@ function human_time_diff( $from, $to = '' ) {
function wp_trim_excerpt($text) { // Fakes an excerpt if needed
global $post;
if ( '' == $text ) {
- $text = $post->post_content;
+ $text = get_the_content('');
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$text = strip_tags($text);
diff --git a/wp-includes/js/autosave.js.php b/wp-includes/js/autosave.js.php
index 4db6ff9..cbd8e57 100644
--- a/wp-includes/js/autosave.js.php
+++ b/wp-includes/js/autosave.js.php
@@ -103,6 +103,10 @@ function autosave() {
autosaveAjax.setVar("post_ID", $("post_ID").value);
autosaveAjax.setVar("post_title", form.post_title.value);
autosaveAjax.setVar("post_type", form.post_type.value);
+ if ( form.comment_status.checked )
+ autosaveAjax.setVar("comment_status", 'open');
+ if ( form.ping_status.checked )
+ autosaveAjax.setVar("ping_status", 'open');
if(form.excerpt)
autosaveAjax.setVar("excerpt", form.excerpt.value);
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);
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index d5a8986..9dd8ffc 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -66,7 +66,8 @@ class WP_Scripts {
if ( isset($this->args[$handle]) )
$ver .= '&amp;' . $this->args[$handle];
$src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src;
- echo "<script type='text/javascript' src='$src?ver=$ver'></script>\n";
+ $src = add_query_arg('ver', $ver, $src);
+ echo "<script type='text/javascript' src='$src'></script>\n";
$this->printed[] = $handle;
}
}
@@ -132,7 +133,10 @@ class WP_Scripts {
foreach ( (array) $handles as $handle ) {
$handle = explode('?', $handle);
if ( !in_array($handle[0], $this->queue) && isset($this->scripts[$handle[0]]) ) {
- $this->queue[] = $handle[0];
+ if ( 'wp_tiny_mce' == $handle[0] ) // HACK: Put tinyMCE first.
+ array_unshift($this->queue, $handle[0]);
+ else
+ $this->queue[] = $handle[0];
if ( isset($handle[1]) )
$this->args[$handle[0]] = $handle[1];
}
diff --git a/wp-rss2.php b/wp-rss2.php
index ecbe721..baec198 100644
--- a/wp-rss2.php
+++ b/wp-rss2.php
@@ -42,7 +42,7 @@ $more = 1;
<?php else : ?>
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php if ( strlen( $post->post_content ) > 0 ) : ?>
- <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
+ <content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded>
<?php else : ?>
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
<?php endif; ?>