mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Unused var fixes. Props DD32. see #8220
git-svn-id: https://develop.svn.wordpress.org/trunk@9716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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/';
|
||||
|
||||
@@ -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]) )
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user