Remove unused variables. Props DD32. fixes #5418
git-svn-id: http://svn.automattic.com/wordpress/trunk@6354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
95fe4f48bd
commit
dab1c792c7
|
@ -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 ) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 ))
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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,7 +349,7 @@ function add_meta( $post_ID ) {
|
|||
|
||||
wp_cache_delete($post_ID, 'post_meta');
|
||||
|
||||
$result = $wpdb->query( "
|
||||
$wpdb->query( "
|
||||
INSERT INTO $wpdb->postmeta
|
||||
(post_id,meta_key,meta_value )
|
||||
VALUES ('$post_ID','$metakey','$metavalue' )
|
||||
|
@ -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 );
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ function _cat_row( $category, $level, $name_override = false ) {
|
|||
if ( current_user_can( 'manage_categories' ) ) {
|
||||
$edit = "<a href='categories.php?action=edit&cat_ID=$category->term_id' class='edit'>".__( 'Edit' )."</a></td>";
|
||||
$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 .= "<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,7 +89,7 @@ function link_cat_row( $category ) {
|
|||
$count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count;
|
||||
$output = "<tr id='link-cat-$category->term_id'$class>
|
||||
<th scope='row' style='text-align: center'>$category->term_id</th>
|
||||
<td>" . ( $name_override ? $name_override : $pad . ' ' . $category->name ) . "</td>
|
||||
<td>" . ( $name_override ? $name_override : $category->name ) . "</td>
|
||||
<td>$category->description</td>
|
||||
<td align='center'>$count</td>
|
||||
<td>$edit</td>\n\t</tr>\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 id="the-list" class="list:meta"><tr style="display: none;"><td> </td></tr></tbody>'; //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'];
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue