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
224 224 // Save the data 225 225 $id = wp_insert_attachment($object, $file); 226 226 227 $upload = array('file' => $file, 'id' => $id);228 229 227 list($width, $height, $type, $attr) = getimagesize( $file ); 230 228 231 229 if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { -
wp-admin/edit-link-form.php
11 11 $nonce_action = 'add-bookmark'; 12 12 } 13 13 14 function xfn_check($class, $value = '', $ type = 'check') {14 function xfn_check($class, $value = '', $depreciated = null) { 15 15 global $link; 16 16 17 17 $link_rel = $link->link_rel; -
wp-admin/includes/comment.php
8 8 } 9 9 10 10 function edit_comment() { 11 global $user_ID;12 11 13 $comment_ID = (int) $_POST['comment_ID'];14 12 $comment_post_ID = (int) $_POST['comment_post_ID']; 15 13 16 14 if (!current_user_can( 'edit_post', $comment_post_ID )) -
wp-admin/includes/export.php
100 100 function wxr_post_taxonomy() { 101 101 $categories = get_the_category(); 102 102 $tags = get_the_tags(); 103 $cat_names = array();104 $tag_names = array();105 103 $the_list = ''; 106 104 $filter = 'rss'; 107 105 -
wp-admin/includes/plugin.php
153 153 global $menu; 154 154 global $_wp_real_parent_file; 155 155 global $_wp_submenu_nopriv; 156 global $_wp_menu_nopriv;157 156 158 157 $file = plugin_basename( $file ); 159 158 -
wp-admin/includes/post.php
2 2 3 3 // Update an existing post with values provided in $_POST. 4 4 function edit_post() { 5 global $user_ID;6 5 7 6 $post_ID = (int) $_POST['post_ID']; 8 7 … … 350 349 351 350 wp_cache_delete($post_ID, 'post_meta'); 352 351 353 $ result = $wpdb->query( "354 INSERT INTO $wpdb->postmeta355 (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 " ); 358 357 return $wpdb->insert_id; 359 358 } 360 359 return false; … … 428 427 429 428 // Replace hrefs of attachment anchors with up-to-date permalinks. 430 429 function _fix_attachment_links( $post_ID ) { 431 global $wp_rewrite;432 430 433 431 $post = & get_post( $post_ID, ARRAY_A ); 434 432 -
wp-admin/includes/template.php
40 40 if ( current_user_can( 'manage_categories' ) ) { 41 41 $edit = "<a href='categories.php?action=edit&cat_ID=$category->term_id' class='edit'>".__( 'Edit' )."</a></td>"; 42 42 $default_cat_id = (int) get_option( 'default_category' ); 43 $default_link_cat_id = (int) get_option( 'default_link_category' );44 43 45 44 if ( $category->term_id != $default_cat_id ) 46 45 $edit .= "<td><a href='" . wp_nonce_url( "categories.php?action=delete&cat_ID=$category->term_id", 'delete-category_' . $category->term_id ) . "' class='delete:the-list:cat-$category->term_id delete'>".__( 'Delete' )."</a>"; … … 90 89 $count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count; 91 90 $output = "<tr id='link-cat-$category->term_id'$class> 92 91 <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> 94 93 <td>$category->description</td> 95 94 <td align='center'>$count</td> 96 95 <td>$edit</td>\n\t</tr>\n"; … … 125 124 } 126 125 127 126 function get_nested_categories( $default = 0, $parent = 0 ) { 128 global $post_ID, $ mode, $wpdb, $checked_categories;127 global $post_ID, $wpdb, $checked_categories; 129 128 130 129 if ( empty($checked_categories) ) { 131 130 if ( $post_ID ) { … … 390 389 } 391 390 392 391 function list_meta( $meta ) { 393 global $post_ID;394 392 // Exit if no meta 395 393 if (!$meta ) { 396 394 echo '<tbody id="the-list" class="list:meta"><tr style="display: none;"><td> </td></tr></tbody>'; //TBODY needed for list-manipulation JS … … 433 431 } 434 432 } 435 433 436 $key_js = js_escape( $entry['meta_key'] );437 434 $entry['meta_key'] = attribute_escape($entry['meta_key']); 438 435 $entry['meta_value'] = attribute_escape($entry['meta_value']); 439 436 $entry['meta_id'] = (int) $entry['meta_id']; -
wp-admin/includes/upload.php
78 78 } 79 79 80 80 function wp_upload_view() { 81 global $style, $ post_id, $style;81 global $style, $style; 82 82 $id = get_the_ID(); 83 83 $attachment_data = wp_get_attachment_metadata( $id ); 84 84 ?> … … 268 268 $url = $file['url']; 269 269 $type = $file['type']; 270 270 $file = $file['file']; 271 $filename = basename($file);272 271 273 272 // Construct the attachment array 274 273 $attachment = array( -
wp-admin/includes/user.php
187 187 188 188 function get_others_unpublished_posts($user_id, $type='any') { 189 189 global $wpdb; 190 $user = get_userdata( $user_id );191 $level_key = $wpdb->prefix . 'user_level';192 190 193 191 $editable = get_editable_user_ids( $user_id ); 194 192 … … 246 244 global $wpdb; 247 245 248 246 $id = (int) $id; 249 $user = get_userdata($id);250 247 251 248 if ($reassign == 'novalue') { 252 249 $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_author = $id");
