From 679250491d95a395011fd748cb0191e614089f42 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 20 Feb 2010 02:01:46 +0000 Subject: [PATCH] Variable Cleanup, Unused variables, Typo'd variables, unused code blocks. Fixes #12299 git-svn-id: http://svn.automattic.com/wordpress/trunk@13242 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 2 +- wp-admin/includes/ms.php | 3 +-- wp-admin/includes/post.php | 2 +- wp-admin/includes/schema.php | 2 +- wp-admin/includes/template.php | 13 +++++-------- wp-admin/includes/theme-install.php | 2 -- wp-admin/includes/theme.php | 3 --- wp-admin/includes/user.php | 1 - wp-admin/post.php | 9 --------- wp-includes/comment-template.php | 2 +- wp-includes/comment.php | 2 +- wp-includes/functions.php | 1 - wp-includes/general-template.php | 2 +- wp-includes/link-template.php | 2 +- wp-includes/ms-blogs.php | 2 +- wp-includes/ms-functions.php | 4 ---- wp-includes/pluggable.php | 1 - wp-includes/post-template.php | 4 ++-- wp-includes/post.php | 2 +- wp-includes/wp-db.php | 2 +- wp-login.php | 2 +- 21 files changed, 19 insertions(+), 44 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index cdac6fde99..d6ce1e84a7 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1835,7 +1835,7 @@ function media_upload_library_form($errors) { $start = ( $_GET['paged'] - 1 ) * 10; if ( $start < 1 ) $start = 0; - add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 10';" ) ); + add_filter( 'post_limits', create_function( '$a', "return 'LIMIT $start, 10';" ) ); list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 3daf4acf8b..a5691f8484 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -125,7 +125,6 @@ function wpmu_delete_user($id) { global $wpdb; $id = (int) $id; - $user = get_userdata($id); do_action('wpmu_delete_user', $id); @@ -767,4 +766,4 @@ function show_post_thumbnail_warning() { } add_action( 'admin_notices', 'show_post_thumbnail_warning' ); -?> +?> \ No newline at end of file diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 68e4a59db6..f1b53f1562 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -960,7 +960,7 @@ function wp_edit_attachments_query( $q = false ) { function postbox_classes( $id, $page ) { if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) return ''; - $current_user = wp_get_current_user(); + if ( $closed = get_user_option('closedpostboxes_'.$page ) ) { if ( !is_array( $closed ) ) { return ''; diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 4985b9bd2a..3ed9c920d8 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -623,7 +623,7 @@ function populate_roles_300() { * @param int $network_id id of network to populate */ function populate_network( $network_id = 1, $domain = '', $email = '', $site_name = '', $path = '/', $vhost = 'no' ) { - global $wpdb, $current_site, $wp_version, $wp_db_version, $wp_rewrite; + global $wpdb, $current_site, $wp_db_version, $wp_rewrite; $msg = ''; //@todo: turn these checks into returned messages diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index d5792cc97a..6710c7e131 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2111,7 +2111,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true, if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; } elseif ( 'spam' == $the_comment_status ) { - $actions['unspam'] = "" . __( 'Not Spam' ) . ''; + $actions['unspam'] = "" . __( 'Not Spam' ) . ''; } elseif ( 'trash' == $the_comment_status ) { $actions['untrash'] = "" . __( 'Restore' ) . ''; } @@ -2678,13 +2678,12 @@ function the_attachment_links( $id = false ) { * @param string $default slug for the role that should be already selected */ function wp_dropdown_roles( $selected = false ) { - global $wp_roles; $p = ''; $r = ''; $editable_roles = get_editable_roles(); - foreach( $editable_roles as $role => $details ) { + foreach ( $editable_roles as $role => $details ) { $name = translate_user_role($details['name'] ); if ( $selected == $role ) // Make default first in list $p = "\n\t"; @@ -3288,7 +3287,7 @@ function find_posts_div($found_action = '') { -
+
@@ -3298,7 +3297,7 @@ function find_posts_div($found_action = '') {
- +
@@ -3544,7 +3543,7 @@ function convert_to_screen( $screen ) { } function screen_meta($screen) { - global $wp_meta_boxes, $_wp_contextual_help, $post_type; + global $wp_meta_boxes, $_wp_contextual_help, $title; if ( is_string($screen) ) $screen = convert_to_screen($screen); @@ -3607,8 +3606,6 @@ function screen_meta($screen) {