Ticket #5418: 5418.unused-variables.diff

File 5418.unused-variables.diff, 6.3 KB (added by DD32, 4 years ago)
  • wp-admin/custom-header.php

     
    224224                // Save the data 
    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 
    231229                if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { 
  • wp-admin/edit-link-form.php

     
    1111        $nonce_action = 'add-bookmark'; 
    1212} 
    1313 
    14 function xfn_check($class, $value = '', $type = 'check') { 
     14function xfn_check($class, $value = '', $depreciated = null) { 
    1515        global $link; 
    1616 
    1717        $link_rel = $link->link_rel; 
  • wp-admin/includes/comment.php

     
    88} 
    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 
    1614        if (!current_user_can( 'edit_post', $comment_post_ID )) 
  • wp-admin/includes/export.php

     
    100100function wxr_post_taxonomy() { 
    101101        $categories = get_the_category(); 
    102102        $tags = get_the_tags(); 
    103         $cat_names = array(); 
    104         $tag_names = array(); 
    105103        $the_list = ''; 
    106104        $filter = 'rss'; 
    107105 
  • wp-admin/includes/plugin.php

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

     
    22 
    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']; 
    87 
     
    350349 
    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        } 
    360359        return false; 
     
    428427 
    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 ); 
    434432 
  • wp-admin/includes/template.php

     
    4040        if ( current_user_can( 'manage_categories' ) ) { 
    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 ) 
    4645                        $edit .= "<td><a href='" . wp_nonce_url( "categories.php?action=delete&amp;cat_ID=$category->term_id", 'delete-category_' . $category->term_id ) . "' class='delete:the-list:cat-$category->term_id delete'>".__( 'Delete' )."</a>"; 
     
    9089        $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count; 
    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> 
    9695                <td>$edit</td>\n\t</tr>\n"; 
     
    125124} 
    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) ) { 
    131130                if ( $post_ID ) { 
     
    390389} 
    391390 
    392391function list_meta( $meta ) { 
    393         global $post_ID; 
    394392        // Exit if no meta 
    395393        if (!$meta ) { 
    396394                echo '<tbody id="the-list" class="list:meta"><tr style="display: none;"><td>&nbsp;</td></tr></tbody>'; //TBODY needed for list-manipulation JS 
     
    433431                } 
    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']); 
    439436        $entry['meta_id'] = (int) $entry['meta_id']; 
  • wp-admin/includes/upload.php

     
    7878} 
    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 ); 
    8484?> 
     
    268268                $url = $file['url']; 
    269269                $type = $file['type']; 
    270270                $file = $file['file']; 
    271                 $filename = basename($file); 
    272271 
    273272                // Construct the attachment array 
    274273                $attachment = array( 
  • wp-admin/includes/user.php

     
    187187 
    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 ); 
    194192 
     
    246244        global $wpdb; 
    247245 
    248246        $id = (int) $id; 
    249         $user = get_userdata($id); 
    250247 
    251248        if ($reassign == 'novalue') { 
    252249                $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_author = $id");