summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-16 21:27:04 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-16 21:27:04 +0000
commit72e9496bfc2f7a962cf4f428ccab25c7a0175aaa (patch)
treeaf3e2ca7136c77140d9e9201e3f495a4b8e7a6da
parent04b67169db33e30f5ca63dbbafe551fdc6fb2164 (diff)
downloadwordpress-mu-72e9496bfc2f7a962cf4f428ccab25c7a0175aaa.tar.gz
wordpress-mu-72e9496bfc2f7a962cf4f428ccab25c7a0175aaa.tar.xz
wordpress-mu-72e9496bfc2f7a962cf4f428ccab25c7a0175aaa.zip
WP Merge to rev 4753
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@849 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-admin/admin-db.php7
-rw-r--r--wp-admin/admin-functions.php10
-rw-r--r--wp-admin/link-import.php2
-rw-r--r--wp-admin/options-discussion.php2
-rw-r--r--wp-admin/upgrade-functions.php13
-rw-r--r--wp-admin/upload-js.php12
-rw-r--r--wp-includes/category.php4
-rw-r--r--wp-includes/classes.php6
-rw-r--r--wp-includes/deprecated.php15
-rw-r--r--wp-includes/functions.php18
-rw-r--r--wp-includes/gettext.php6
-rw-r--r--wp-includes/js/tinymce/plugins/autosave/langs/cs.js0
-rw-r--r--wp-includes/js/tinymce/plugins/autosave/langs/sv.js0
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js0
-rw-r--r--wp-includes/js/tinymce/plugins/inlinepopups/readme.txt0
-rw-r--r--wp-includes/js/tinymce/plugins/paste/editor_plugin.js1
-rw-r--r--wp-includes/js/tinymce/tiny_mce_config.php4
-rw-r--r--wp-includes/js/tinymce/wp-mce-help.php2
-rw-r--r--wp-includes/post-template.php5
-rw-r--r--wp-includes/post.php4
-rw-r--r--wp-includes/registration-functions.php4
-rw-r--r--wp-includes/rss-functions.php4
-rw-r--r--wp-includes/script-loader.php7
23 files changed, 85 insertions, 41 deletions
diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php
index 40b4556..eab830e 100644
--- a/wp-admin/admin-db.php
+++ b/wp-admin/admin-db.php
@@ -141,9 +141,6 @@ function wp_insert_category($catarr) {
// Keep in mind when using this filter and altering the cat_ID that the two queries above
// have already taken place with the OLD cat_ID
// Also note that you may have post2cat entries with the old cat_ID if this is an update
- $cat_ID = apply_filters('cat_id_filter', $cat_ID, $update);
-
- clean_category_cache($cat_ID);
if ($update) {
do_action('edit_category', $cat_ID);
@@ -152,6 +149,10 @@ function wp_insert_category($catarr) {
do_action('add_category', $cat_ID);
}
+ $cat_ID = apply_filters('cat_id_filter', $cat_ID, $update);
+
+ clean_category_cache($cat_ID);
+
return $cat_ID;
}
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php
index 7a33aca..4f90c28 100644
--- a/wp-admin/admin-functions.php
+++ b/wp-admin/admin-functions.php
@@ -2090,11 +2090,11 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
$metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";
$metadata['file'] = $file;
- if ( $metadata['width'] * $metadata['height'] < 3 * 1024 * 1024 ) {
- if ( $metadata['width'] > 128 && $metadata['width'] >= $metadata['height'] * 4 / 3 )
- $thumb = wp_create_thumbnail($file, 128);
- elseif ( $metadata['height'] > 96 )
- $thumb = wp_create_thumbnail($file, 96);
+ $max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file );
+
+ if ( $max > 0 && $metadata['width'] * $metadata['height'] < $max ) {
+ $max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
+ $thumb = wp_create_thumbnail( $file, $max_side );
if ( @file_exists($thumb) )
$metadata['thumb'] = basename($thumb);
diff --git a/wp-admin/link-import.php b/wp-admin/link-import.php
index 9f1e0c0..6484dbb 100644
--- a/wp-admin/link-import.php
+++ b/wp-admin/link-import.php
@@ -26,7 +26,7 @@ switch ($step) {
<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">
<?php wp_nonce_field('import-bookmarks') ?>
-<p><?php _e('If a program or website you use allows you to export your links or subscriptions as OPML you may import them here.'); ?>
+<p><?php _e('If a program or website you use allows you to export your links or subscriptions as OPML you may import them here.'); ?></p>
<div style="width: 70%; margin: auto; height: 8em;">
<input type="hidden" name="step" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php
index 51b3122..5791bc0 100644
--- a/wp-admin/options-discussion.php
+++ b/wp-admin/options-discussion.php
@@ -70,7 +70,7 @@ include('admin-header.php');
</fieldset>
<fieldset class="options">
<legend><?php _e('Comment Blacklist') ?></legend>
-<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be deleted. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p>
+<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p>
<p>
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
</p>
diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php
index ce4e62c..87249f9 100644
--- a/wp-admin/upgrade-functions.php
+++ b/wp-admin/upgrade-functions.php
@@ -517,10 +517,12 @@ function upgrade_210() {
foreach ( $posts as $post )
wp_schedule_single_event(mysql2date('U', $post->post_date), 'publish_future_post', array($post->ID));
}
+
if ( $wp_current_db_version < 3570 ) {
// Create categories for link categories if a category with the same
// name doesn't exist. Create a map of link cat IDs to cat IDs.
- $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
+ $link_cat_id_map = array();
+ $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM " . $wpdb->prefix . 'linkcategories');
foreach ( $link_cats as $link_cat) {
if ( $cat_id = category_exists($link_cat->cat_name) ) {
$link_cat_id_map[$link_cat->cat_id] = $cat_id;
@@ -534,9 +536,13 @@ function upgrade_210() {
// Associate links to cats.
$links = $wpdb->get_results("SELECT link_id, link_category FROM $wpdb->links");
if ( !empty($links) ) foreach ( $links as $link ) {
+ if ( 0 == $link->link_category )
+ continue;
+ if ( ! isset($link_cat_id_map[$link->link_category]) )
+ continue;
$link_cat = $link_cat_id_map[$link->link_category];
$cat = $wpdb->get_row("SELECT * FROM $wpdb->link2cat WHERE link_id = '$link->link_id' AND category_id = '$link_cat'");
- if (!$cat && 0 != $link->link_category) {
+ if ( !$cat ) {
$wpdb->query("INSERT INTO $wpdb->link2cat (link_id, category_id)
VALUES ('$link->link_id', '$link_cat')");
}
@@ -553,6 +559,9 @@ function upgrade_210() {
$wpdb->query("UPDATE $wpdb->categories SET link_count = '$count' WHERE cat_ID = '$cat_id'");
}
}
+
+ // Obsolete linkcategories table
+ $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'linkcategories');
}
}
diff --git a/wp-admin/upload-js.php b/wp-admin/upload-js.php
index 67d7a9e..bdf3d1c 100644
--- a/wp-admin/upload-js.php
+++ b/wp-admin/upload-js.php
@@ -56,7 +56,7 @@ addLoadEvent( function() {
this.currentImage.width = false;
this.currentImage.height = false;
}
- this.currentImage.isImage = ( 0 == id ? '' : $('attachment-is-image-' + id).value );
+ this.currentImage.isImage = ( 0 == id ? 0 : $('attachment-is-image-' + id).value );
this.currentImage.ID = id;
},
@@ -74,7 +74,7 @@ addLoadEvent( function() {
h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('&laquo; Back')) ?></a>";
}
h += "<div id='file-title'>"
- if ( !this.currentImage.isImage )
+ if ( 0 == this.currentImage.isImage )
h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>";
else
h += "<h2>" + this.currentImage.title + "</h2>";
@@ -83,7 +83,7 @@ addLoadEvent( function() {
h += "</span>";
h += '</div>'
h += "<div id='upload-file-view' class='alignleft'>";
- if ( this.currentImage.isImage ) {
+ if ( 1 == this.currentImage.isImage ) {
h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>";
h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
h += "</a>";
@@ -152,7 +152,7 @@ addLoadEvent( function() {
h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('&laquo; Back')); ?></a>";
}
h += "<div id='file-title'>"
- if ( !this.currentImage.isImage )
+ if ( 0 == this.currentImage.isImage )
h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>";
else
h += "<h2>" + this.currentImage.title + "</h2>";
@@ -161,7 +161,7 @@ addLoadEvent( function() {
h += "</span>";
h += '</div>'
h += "<div id='upload-file-view' class='alignleft'>";
- if ( this.currentImage.isImage ) {
+ if ( 1 == this.currentImage.isImage ) {
h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file')); ?>'>";
h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />";
h += "</a>";
@@ -230,7 +230,7 @@ addLoadEvent( function() {
displayEl = $A(document.forms.uploadoptions.elements.display).detect( function(i) { return i.checked; } )
if ( displayEl )
display = displayEl.value;
- else if ( this.currentImage.isImage )
+ else if ( 1 == this.currentImage.isImage )
display = 'full';
if ( 'none' != link )
diff --git a/wp-includes/category.php b/wp-includes/category.php
index 7f47161..7fdc334 100644
--- a/wp-includes/category.php
+++ b/wp-includes/category.php
@@ -5,7 +5,7 @@ function get_all_category_ids() {
if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) {
$cat_ids = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories");
- wp_cache_add('all_category_ids', $cat_ids, 'category');
+ wp_cache_set('all_category_ids', $cat_ids, 'category');
}
return $cat_ids;
@@ -148,7 +148,7 @@ function &get_category(&$category, $output = OBJECT) {
} else {
if ( ! $_category = wp_cache_get($category, 'category') ) {
$_category = $wpdb->get_row("SELECT * FROM $wpdb->categories WHERE cat_ID = '$category' LIMIT 1");
- wp_cache_add($category, $_category, 'category');
+ wp_cache_set($category, $_category, 'category');
}
}
diff --git a/wp-includes/classes.php b/wp-includes/classes.php
index 62cee05..47470d3 100644
--- a/wp-includes/classes.php
+++ b/wp-includes/classes.php
@@ -224,6 +224,8 @@ class WP {
foreach (array_keys($this->query_vars) as $wpvar) {
if ( '' != $this->query_vars[$wpvar] ) {
$this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';
+ if ( !is_scalar($this->query_vars[$wpvar]) ) // Discard non-scalars.
+ continue;
$this->query_string .= $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]);
}
}
@@ -498,10 +500,10 @@ class Walker_Page extends Walker {
return $output;
}
- function start_el($output, $page, $depth, $current_page, $show_date, $date_format) {
+ function start_el($output, $page, $depth, $current_page, $args) {
if ( $depth )
$indent = str_repeat("\t", $depth);
-
+ extract($args);
$css_class = 'page_item';
$_current_page = get_page( $current_page );
if ( $page->ID == $current_page )
diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php
index 6afe8d2..d0027a5 100644
--- a/wp-includes/deprecated.php
+++ b/wp-includes/deprecated.php
@@ -1,4 +1,19 @@
<?php
+
+/*
+ * Deprecated global variables.
+ */
+
+$tableposts = $wpdb->posts;
+$tableusers = $wpdb->users;
+$tablecategories = $wpdb->categories;
+$tablepost2cat = $wpdb->post2cat;
+$tablecomments = $wpdb->comments;
+$tablelinks = $wpdb->links;
+$tablelinkcategories = 'linkcategories_is_gone';
+$tableoptions = $wpdb->options;
+$tablepostmeta = $wpdb->postmeta;
+
/*
* Deprecated functios come here to die.
*/
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 4f103e9..bb7965e 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -791,10 +791,21 @@ function add_magic_quotes($array) {
}
function wp_remote_fopen( $uri ) {
+ $timeout = 10;
+ $parsed_url = @parse_url($uri);
+
+ if ( !$parsed_url || !is_array($parsed_url) )
+ return false;
+
+ if ( !isset($parsed_url['scheme']) || !in_array($parsed_url['scheme'], array('http','https')) )
+ $uri = 'http://' . $uri;
+
if ( ini_get('allow_url_fopen') ) {
$fp = @fopen( $uri, 'r' );
if ( !$fp )
return false;
+
+ //stream_set_timeout($fp, $timeout); // Requires php 4.3
$linea = '';
while( $remote_read = fread($fp, 4096) )
$linea .= $remote_read;
@@ -805,6 +816,7 @@ function wp_remote_fopen( $uri ) {
curl_setopt ($handle, CURLOPT_URL, $uri);
curl_setopt ($handle, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt ($handle, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt ($handle, CURLOPT_TIMEOUT, $timeout);
$buffer = curl_exec($handle);
curl_close($handle);
return $buffer;
@@ -833,10 +845,10 @@ function status_header( $header ) {
elseif ( 410 == $header )
$text = 'Gone';
-// if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
+ if ( version_compare(phpversion(), '4.3.0', '>=') )
+ @header("HTTP/1.1 $header $text", true, $header);
+ else
@header("HTTP/1.1 $header $text");
-// else
-// @header("Status: $header $text");
}
function nocache_headers() {
diff --git a/wp-includes/gettext.php b/wp-includes/gettext.php
index ed94ca9..a35b0b9 100644
--- a/wp-includes/gettext.php
+++ b/wp-includes/gettext.php
@@ -302,7 +302,11 @@ class gettext_reader {
$string = str_replace('nplurals',"\$total",$string);
$string = str_replace("n",$n,$string);
$string = str_replace('plural',"\$plural",$string);
-
+
+ # poEdit doesn't put any semicolons, which
+ # results in parse error in eval
+ $string .= ';';
+
$total = 0;
$plural = 0;
diff --git a/wp-includes/js/tinymce/plugins/autosave/langs/cs.js b/wp-includes/js/tinymce/plugins/autosave/langs/cs.js
deleted file mode 100644
index e69de29..0000000
--- a/wp-includes/js/tinymce/plugins/autosave/langs/cs.js
+++ /dev/null
diff --git a/wp-includes/js/tinymce/plugins/autosave/langs/sv.js b/wp-includes/js/tinymce/plugins/autosave/langs/sv.js
deleted file mode 100644
index e69de29..0000000
--- a/wp-includes/js/tinymce/plugins/autosave/langs/sv.js
+++ /dev/null
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
deleted file mode 100644
index e69de29..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
+++ /dev/null
diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/readme.txt b/wp-includes/js/tinymce/plugins/inlinepopups/readme.txt
deleted file mode 100644
index e69de29..0000000
--- a/wp-includes/js/tinymce/plugins/inlinepopups/readme.txt
+++ /dev/null
diff --git a/wp-includes/js/tinymce/plugins/paste/editor_plugin.js b/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
index de5edbe..1306c0b 100644
--- a/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
+++ b/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
@@ -383,4 +383,3 @@ var TinyMCE_PastePlugin = {
};
tinyMCE.addPlugin("paste", TinyMCE_PastePlugin);
-
diff --git a/wp-includes/js/tinymce/tiny_mce_config.php b/wp-includes/js/tinymce/tiny_mce_config.php
index 01f5ccd..808cfb6 100644
--- a/wp-includes/js/tinymce/tiny_mce_config.php
+++ b/wp-includes/js/tinymce/tiny_mce_config.php
@@ -31,9 +31,6 @@
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'wp_help', 'wp_adv_start', 'wp_adv', 'separator', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end'));
$mce_buttons = implode($mce_buttons, ',');
- if ( !user_can_richedit() )
- $mce_buttons = str_replace('wp_help', 'wp_help,code', $mce_buttons);
-
$mce_buttons_2 = apply_filters('mce_buttons_2', array());
$mce_buttons_2 = implode($mce_buttons_2, ',');
@@ -65,7 +62,6 @@ initArray = {
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
theme_advanced_resizing : true,
- theme_advanced_source_editor_wrap : true,
browsers : "<?php echo $mce_browsers; ?>",
dialog_type : "modal",
theme_advanced_resize_horizontal : false,
diff --git a/wp-includes/js/tinymce/wp-mce-help.php b/wp-includes/js/tinymce/wp-mce-help.php
index 2daf7ef..0893127 100644
--- a/wp-includes/js/tinymce/wp-mce-help.php
+++ b/wp-includes/js/tinymce/wp-mce-help.php
@@ -140,7 +140,7 @@
<h2><?php _e('Advanced Rich Editing') ?></h2>
<h3><?php _e('Images and Attachments') ?></h3>
<p><?php _e('There is a button in the editor toolbar for inserting images that are already hosted somewhere on the internet. If you have a URL for an image, click this button and enter the URL in the box which appears.') ?></p>
- <p><?php _e('If you need to upload an image or sound file from your computer, you can use the uploading tool below the editor. The tool will attempt to create a thumbnail-sized image when you upload an image. To insert your uploaded image into the post, first click on the thumbnail to reveal a menu of options. Clicking on a "Using.." or "Linked..." option will change that option. For instance, you might want to use the thumbnail in the post and link it to a page showing the original with a caption. When you have selected the options you like, click "Send to Editor" and your image or file will appear in the post you are editing.</p>') ?>
+ <p><?php _e('If you need to upload an image or sound file from your computer, you can use the uploading tool below the editor. The tool will attempt to create a thumbnail-sized image when you upload an image. To insert your uploaded image into the post, first click on the thumbnail to reveal a menu of options. Clicking on a "Using.." or "Linked..." option will change that option. For instance, you might want to use the thumbnail in the post and link it to a page showing the original with a caption. When you have selected the options you like, click "Send to Editor" and your image or file will appear in the post you are editing.') ?></p>
<h3><?php _e('HTML in the Rich Editor') ?></h3>
<p><?php _e('Any HTML entered directly into the rich editor will show up as text when the post is viewed. What you see is what you get. When you want to include HTML elements that cannot be generated with the toolbar buttons, you must enter it by hand in the HTML editor. Examples are tables and &lt;code&gt;. To do this, click the HTML button and edit the code, then click Update. If the code is valid and understood by the editor, you should see it rendered immediately.') ?></p>
</div>
diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
index 5ecebd9..4951baa 100644
--- a/wp-includes/post-template.php
+++ b/wp-includes/post-template.php
@@ -289,7 +289,7 @@ function wp_list_pages($args = '') {
global $wp_query;
$current_page = $wp_query->get_queried_object_id();
- $output .= walk_page_tree($pages, $r['depth'], $current_page, $r['show_date'], $r['date_format']);
+ $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
if ( $r['title_li'] )
$output .= '</ul></li>';
@@ -368,8 +368,9 @@ function get_attachment_icon_src( $id = 0, $fullsize = false ) {
$src_file = $icon_dir . '/' . basename($src);
}
- if ( !isset($src) )
+ if ( !isset($src) || !$src )
return false;
+
return array($src, $src_file);
}
diff --git a/wp-includes/post.php b/wp-includes/post.php
index c3d3b6a..058db08 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -904,7 +904,7 @@ function get_all_page_ids() {
if ( ! $page_ids = wp_cache_get('all_page_ids', 'pages') ) {
$page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'");
- wp_cache_add('all_page_ids', $page_ids, 'pages');
+ wp_cache_set('all_page_ids', $page_ids, 'pages');
}
return $page_ids;
@@ -946,7 +946,7 @@ function &get_page(&$page, $output = OBJECT) {
return get_post($_page, $output);
// Potential issue: we're not checking to see if the post_type = 'page'
// So all non-'post' posts will get cached as pages.
- wp_cache_add($_page->ID, $_page, 'pages');
+ wp_cache_set($_page->ID, $_page, 'pages');
}
}
}
diff --git a/wp-includes/registration-functions.php b/wp-includes/registration-functions.php
new file mode 100644
index 0000000..d270cd2
--- /dev/null
+++ b/wp-includes/registration-functions.php
@@ -0,0 +1,4 @@
+<?php
+// Deprecated. Use registration.php.
+require_once(ABSPATH . WPINC . '/registration.php');
+?>
diff --git a/wp-includes/rss-functions.php b/wp-includes/rss-functions.php
new file mode 100644
index 0000000..c07f867
--- /dev/null
+++ b/wp-includes/rss-functions.php
@@ -0,0 +1,4 @@
+<?php
+// Deprecated. Use rss.php instead.
+require_once (ABSPATH . WPINC . '/rss.php');
+?>
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index 43e076d..bcc8bc5 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -38,7 +38,7 @@ class WP_Scripts {
$this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' );
$this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '4583' );
$this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
- $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20061223' );
+ $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20070116' );
}
}
@@ -146,10 +146,7 @@ class WP_Scripts {
foreach ( (array) $handles as $handle ) {
$handle = explode('?', $handle);
if ( !in_array($handle[0], $this->queue) && isset($this->scripts[$handle[0]]) ) {
- if ( 'wp_tiny_mce' == $handle[0] ) // HACK: Put tinyMCE first.
- array_unshift($this->queue, $handle[0]);
- else
- $this->queue[] = $handle[0];
+ $this->queue[] = $handle[0];
if ( isset($handle[1]) )
$this->args[$handle[0]] = $handle[1];
}