diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 8d605655df..2cda013b29 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -224,8 +224,6 @@ Event.observe( window, 'load', hide_text ); // Save the data $id = wp_insert_attachment($object, $file); - $upload = array('file' => $file, 'id' => $id); - list($width, $height, $type, $attr) = getimagesize( $file ); if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 920ebe433f..ed59a145d0 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -11,7 +11,7 @@ if ( ! empty($link_id) ) { $nonce_action = 'add-bookmark'; } -function xfn_check($class, $value = '', $type = 'check') { +function xfn_check($class, $value = '', $depreciated = null) { global $link; $link_rel = $link->link_rel; diff --git a/wp-admin/includes/comment.php b/wp-admin/includes/comment.php index ae0d1d9631..e399a31081 100644 --- a/wp-admin/includes/comment.php +++ b/wp-admin/includes/comment.php @@ -8,9 +8,7 @@ function comment_exists($comment_author, $comment_date) { } function edit_comment() { - global $user_ID; - $comment_ID = (int) $_POST['comment_ID']; $comment_post_ID = (int) $_POST['comment_post_ID']; if (!current_user_can( 'edit_post', $comment_post_ID )) diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index aa20dc2381..467e7bb9e0 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -100,8 +100,6 @@ function wxr_tag_description($t) { function wxr_post_taxonomy() { $categories = get_the_category(); $tags = get_the_tags(); - $cat_names = array(); - $tag_names = array(); $the_list = ''; $filter = 'rss'; diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index af4de4ae7b..1d527dece8 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -153,7 +153,6 @@ function add_submenu_page( $parent, $page_title, $menu_title, $access_level, $fi global $menu; global $_wp_real_parent_file; global $_wp_submenu_nopriv; - global $_wp_menu_nopriv; $file = plugin_basename( $file ); diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 55a7ab37bb..c8bada430d 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -2,7 +2,6 @@ // Update an existing post with values provided in $_POST. function edit_post() { - global $user_ID; $post_ID = (int) $_POST['post_ID']; @@ -350,11 +349,11 @@ function add_meta( $post_ID ) { wp_cache_delete($post_ID, 'post_meta'); - $result = $wpdb->query( " - INSERT INTO $wpdb->postmeta - (post_id,meta_key,meta_value ) - VALUES ('$post_ID','$metakey','$metavalue' ) - " ); + $wpdb->query( " + INSERT INTO $wpdb->postmeta + (post_id,meta_key,meta_value ) + VALUES ('$post_ID','$metakey','$metavalue' ) + " ); return $wpdb->insert_id; } return false; @@ -428,7 +427,6 @@ function update_meta( $mid, $mkey, $mvalue ) { // Replace hrefs of attachment anchors with up-to-date permalinks. function _fix_attachment_links( $post_ID ) { - global $wp_rewrite; $post = & get_post( $post_ID, ARRAY_A ); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 23eff600c9..54e2dfb95e 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -40,7 +40,6 @@ function _cat_row( $category, $level, $name_override = false ) { if ( current_user_can( 'manage_categories' ) ) { $edit = "".__( 'Edit' ).""; $default_cat_id = (int) get_option( 'default_category' ); - $default_link_cat_id = (int) get_option( 'default_link_category' ); if ( $category->term_id != $default_cat_id ) $edit .= "term_id ) . "' class='delete:the-list:cat-$category->term_id delete'>".__( 'Delete' ).""; @@ -90,7 +89,7 @@ function link_cat_row( $category ) { $count = ( $category->count > 0 ) ? "$category->count" : $category->count; $output = " $category->term_id - " . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . " + " . ( $name_override ? $name_override : $category->name ) . " $category->description $count $edit\n\t\n"; @@ -125,7 +124,7 @@ function sort_cats( $cat1, $cat2 ) { } function get_nested_categories( $default = 0, $parent = 0 ) { - global $post_ID, $mode, $wpdb, $checked_categories; + global $post_ID, $wpdb, $checked_categories; if ( empty($checked_categories) ) { if ( $post_ID ) { @@ -390,7 +389,6 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le } function list_meta( $meta ) { - global $post_ID; // Exit if no meta if (!$meta ) { echo ' '; //TBODY needed for list-manipulation JS @@ -433,7 +431,6 @@ function _list_meta_row( $entry, &$count ) { } } - $key_js = js_escape( $entry['meta_key'] ); $entry['meta_key'] = attribute_escape($entry['meta_key']); $entry['meta_value'] = attribute_escape($entry['meta_value']); $entry['meta_id'] = (int) $entry['meta_id']; diff --git a/wp-admin/includes/upload.php b/wp-admin/includes/upload.php index 2b4180d9a2..6e183c2437 100644 --- a/wp-admin/includes/upload.php +++ b/wp-admin/includes/upload.php @@ -78,7 +78,7 @@ function wp_upload_display( $dims = false, $href = '' ) { } function wp_upload_view() { - global $style, $post_id, $style; + global $style, $style; $id = get_the_ID(); $attachment_data = wp_get_attachment_metadata( $id ); ?> @@ -268,7 +268,6 @@ function wp_upload_tab_upload_action() { $url = $file['url']; $type = $file['type']; $file = $file['file']; - $filename = basename($file); // Construct the attachment array $attachment = array( diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 5554cf7c9a..c7f8cfdd3f 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -187,8 +187,6 @@ function get_nonauthor_user_ids() { function get_others_unpublished_posts($user_id, $type='any') { global $wpdb; - $user = get_userdata( $user_id ); - $level_key = $wpdb->prefix . 'user_level'; $editable = get_editable_user_ids( $user_id ); @@ -246,7 +244,6 @@ function wp_delete_user($id, $reassign = 'novalue') { global $wpdb; $id = (int) $id; - $user = get_userdata($id); if ($reassign == 'novalue') { $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_author = $id");