Make WordPress Core

Changeset 6354


Ignore:
Timestamp:
12/05/2007 12:29:05 AM (19 years ago)
Author:
ryan
Message:

Remove unused variables. Props DD32. fixes #5418

Location:
trunk/wp-admin
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-header.php

    r5795 r6354  
    225225                $id = wp_insert_attachment($object, $file);
    226226
    227                 $upload = array('file' => $file, 'id' => $id);
    228 
    229227                list($width, $height, $type, $attr) = getimagesize( $file );
    230228
  • trunk/wp-admin/edit-link-form.php

    r6213 r6354  
    1212}
    1313
    14 function xfn_check($class, $value = '', $type = 'check') {
     14function xfn_check($class, $value = '', $depreciated = null) {
    1515        global $link;
    1616
  • trunk/wp-admin/includes/comment.php

    r5821 r6354  
    99
    1010function edit_comment() {
    11         global $user_ID;
    1211
    13         $comment_ID = (int) $_POST['comment_ID'];
    1412        $comment_post_ID = (int) $_POST['comment_post_ID'];
    1513
  • trunk/wp-admin/includes/export.php

    r6335 r6354  
    101101        $categories = get_the_category();
    102102        $tags = get_the_tags();
    103         $cat_names = array();
    104         $tag_names = array();
    105103        $the_list = '';
    106104        $filter = 'rss';
  • trunk/wp-admin/includes/plugin.php

    r6320 r6354  
    154154        global $_wp_real_parent_file;
    155155        global $_wp_submenu_nopriv;
    156         global $_wp_menu_nopriv;
    157156
    158157        $file = plugin_basename( $file );
  • trunk/wp-admin/includes/post.php

    r6333 r6354  
    33// Update an existing post with values provided in $_POST.
    44function edit_post() {
    5         global $user_ID;
    65
    76        $post_ID = (int) $_POST['post_ID'];
     
    351350                wp_cache_delete($post_ID, 'post_meta');
    352351
    353                 $result = $wpdb->query( "
    354                                                 INSERT INTO $wpdb->postmeta
    355                                                 (post_id,meta_key,meta_value )
    356                                                 VALUES ('$post_ID','$metakey','$metavalue' )
    357                                         " );
     352                $wpdb->query( "
     353                                INSERT INTO $wpdb->postmeta
     354                                (post_id,meta_key,meta_value )
     355                                VALUES ('$post_ID','$metakey','$metavalue' )
     356                        " );
    358357                return $wpdb->insert_id;
    359358        }
     
    429428// Replace hrefs of attachment anchors with up-to-date permalinks.
    430429function _fix_attachment_links( $post_ID ) {
    431         global $wp_rewrite;
    432430
    433431        $post = & get_post( $post_ID, ARRAY_A );
  • trunk/wp-admin/includes/template.php

    r6299 r6354  
    4141                $edit = "<a href='categories.php?action=edit&amp;cat_ID=$category->term_id' class='edit'>".__( 'Edit' )."</a></td>";
    4242                $default_cat_id = (int) get_option( 'default_category' );
    43                 $default_link_cat_id = (int) get_option( 'default_link_category' );
    4443
    4544                if ( $category->term_id != $default_cat_id )
     
    9190        $output = "<tr id='link-cat-$category->term_id'$class>
    9291                <th scope='row' style='text-align: center'>$category->term_id</th>
    93                 <td>" . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . "</td>
     92                <td>" . ( $name_override ? $name_override : $category->name ) . "</td>
    9493                <td>$category->description</td>
    9594                <td align='center'>$count</td>
     
    126125
    127126function get_nested_categories( $default = 0, $parent = 0 ) {
    128         global $post_ID, $mode, $wpdb, $checked_categories;
     127        global $post_ID, $wpdb, $checked_categories;
    129128
    130129        if ( empty($checked_categories) ) {
     
    391390
    392391function list_meta( $meta ) {
    393         global $post_ID;
    394392        // Exit if no meta
    395393        if (!$meta ) {
     
    434432        }
    435433
    436         $key_js = js_escape( $entry['meta_key'] );
    437434        $entry['meta_key']   = attribute_escape($entry['meta_key']);
    438435        $entry['meta_value'] = attribute_escape($entry['meta_value']);
  • trunk/wp-admin/includes/upload.php

    r6317 r6354  
    7979
    8080function wp_upload_view() {
    81         global $style, $post_id, $style;
     81        global $style, $style;
    8282        $id = get_the_ID();
    8383        $attachment_data = wp_get_attachment_metadata( $id );
     
    269269                $type = $file['type'];
    270270                $file = $file['file'];
    271                 $filename = basename($file);
    272271
    273272                // Construct the attachment array
  • trunk/wp-admin/includes/user.php

    r6346 r6354  
    188188function get_others_unpublished_posts($user_id, $type='any') {
    189189        global $wpdb;
    190         $user = get_userdata( $user_id );
    191         $level_key = $wpdb->prefix . 'user_level';
    192190
    193191        $editable = get_editable_user_ids( $user_id );
     
    247245
    248246        $id = (int) $id;
    249         $user = get_userdata($id);
    250247
    251248        if ($reassign == 'novalue') {
Note: See TracChangeset for help on using the changeset viewer.