summaryrefslogtreecommitdiffstats
path: root/wp-includes
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes')
-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
17 files changed, 57 insertions, 23 deletions
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];
}