@@ -659,7 +659,6 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
// convert it to table rows
$out = '';
- $class = '';
$count = 0;
foreach( $tags as $tag )
$out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"' );
@@ -1879,7 +1878,6 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
global $comment, $post;
$comment = get_comment( $comment_id );
$post = get_post($comment->comment_post_ID);
- $authordata = get_userdata($post->post_author);
$the_comment_status = wp_get_comment_status($comment->comment_ID);
if ( current_user_can( 'edit_post', $post->ID ) ) {
diff --git a/wp-admin/page.php b/wp-admin/page.php
index baf064d231..5d93b42098 100644
--- a/wp-admin/page.php
+++ b/wp-admin/page.php
@@ -22,6 +22,8 @@ wp_reset_vars(array('action'));
* @param int $page_ID Page ID.
*/
function redirect_page($page_ID) {
+ global $action;
+
$referredby = '';
if ( !empty($_POST['referredby']) ) {
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php
index 4a031ee5b4..9aaa84d570 100644
--- a/wp-includes/bookmark.php
+++ b/wp-includes/bookmark.php
@@ -29,7 +29,7 @@ function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
wp_cache_add($bookmark->link_id, $bookmark, 'bookmark');
$_bookmark = $bookmark;
} else {
- if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $link) ) {
+ if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $bookmark) ) {
$_bookmark = & $GLOBALS['link'];
} elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) {
$_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark));
diff --git a/wp-includes/cron.php b/wp-includes/cron.php
index ba18acd649..91e8e4b53b 100644
--- a/wp-includes/cron.php
+++ b/wp-includes/cron.php
@@ -158,7 +158,6 @@ function wp_next_scheduled( $hook, $args = array() ) {
* @return null Cron could not be spawned, because it is not needed to run.
*/
function spawn_cron( $local_time ) {
- global $current_blog;
/*
* do not even start the cron if local server timer has drifted
diff --git a/wp-includes/http.php b/wp-includes/http.php
index 9bc352f97a..e15f0797d4 100644
--- a/wp-includes/http.php
+++ b/wp-includes/http.php
@@ -411,7 +411,7 @@ class WP_Http {
$length = hexdec( $match[1] );
$chunkLength = strlen( $match[0] );
- $strBody = substr($body, strlen( $match[0] ), $length);
+ $strBody = substr($body, $chunkLength, $length);
$parsedBody .= $strBody;
$body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n");
diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 48027a8470..0fba651163 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -1512,9 +1512,7 @@ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
$default = $avatar_default;
}
- if ( 'custom' == $default )
- $default = add_query_arg( 's', $size, $defaults[$avatar_default][1] );
- elseif ( 'mystery' == $default )
+ if ( 'mystery' == $default )
$default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com')
elseif ( 'blank' == $default )
$default = includes_url('images/blank.gif');
@@ -1524,6 +1522,8 @@ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
$default = "http://www.gravatar.com/avatar/s={$size}";
elseif ( empty($email) )
$default = "http://www.gravatar.com/avatar/?d=$default&s={$size}";
+ else
+ $default = add_query_arg( 's', $size, $default );
if ( !empty($email) ) {
$out = 'http://www.gravatar.com/avatar/';
diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php
index 8fc60fb49e..b00ed08a1c 100644
--- a/wp-includes/plugin.php
+++ b/wp-includes/plugin.php
@@ -123,7 +123,7 @@ function has_filter($tag, $function_to_check = false) {
* @subpackage Plugin
* @since 0.71
* @global array $wp_filter Stores all of the filters
- * @global array $merge_filters Merges the filter hooks using this function.
+ * @global array $merged_filters Merges the filter hooks using this function.
* @global array $wp_current_filter stores the list of current filters with the current one last
*
* @param string $tag The name of the filter hook.
@@ -219,7 +219,7 @@ function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args
* @return bool True when finished.
*/
function remove_all_filters($tag, $priority = false) {
- global $wp_filter, $merge_filters;
+ global $wp_filter, $merged_filters;
if( isset($wp_filter[$tag]) ) {
if( false !== $priority && isset($$wp_filter[$tag][$priority]) )
diff --git a/wp-includes/post.php b/wp-includes/post.php
index 34e706455c..f0e937bbeb 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -2161,7 +2161,7 @@ function &get_pages($args = '') {
$pages = $wpdb->get_results($query);
if ( empty($pages) ) {
- $page = apply_filters('get_pages', array(), $r);
+ $pages = apply_filters('get_pages', array(), $r);
return $pages;
}
@@ -3322,7 +3322,7 @@ function wp_save_post_revision( $post_id ) {
* @return object|bool The autosaved data or false on failure or when no autosave exists.
*/
function wp_get_post_autosave( $post_id ) {
- global $wpdb;
+
if ( !$post = get_post( $post_id ) )
return false;
diff --git a/wp-includes/theme.php b/wp-includes/theme.php
index 5a26182eda..6e7674a1da 100644
--- a/wp-includes/theme.php
+++ b/wp-includes/theme.php
@@ -186,7 +186,7 @@ function get_theme_data( $theme_file ) {
if ( preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ) )
$author_uri = clean_url( trim( $author_uri[1]) );
else
- $author_uti = '';
+ $author_uri = '';
if ( preg_match( '|Template:(.*)$|mi', $theme_data, $template ) )
$template = wp_kses( trim( $template[1] ), $themes_allowed_tags );
diff --git a/wp-includes/user.php b/wp-includes/user.php
index 9af3b02a75..734a688b07 100644
--- a/wp-includes/user.php
+++ b/wp-includes/user.php
@@ -259,7 +259,7 @@ function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
$meta_value = trim( $meta_value );
if ( ! empty($meta_value) )
- $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $userid, $meta_key, $meta_value) );
+ $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) );
else
$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
|