Make WordPress Core

Changeset 23445


Ignore:
Timestamp:
02/16/2013 06:28:41 PM (12 years ago)
Author:
nacin
Message:

Remove unused variables reset by wp_reset_vars(). Many of these haven't been used since b2. see #21767.

Location:
trunk/wp-admin
Files:
9 edited

Legend:

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

    r23416 r23445  
    7878$time_format = get_option('time_format');
    7979
    80 wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'text', 'trackback', 'pingback'));
    81 
    8280wp_enqueue_script( 'common' );
    8381
  • trunk/wp-admin/edit-link-form.php

    r21311 r23445  
    127127<input type="hidden" name="action" value="save" />
    128128<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
    129 <input type="hidden" name="order_by" value="<?php echo esc_attr($order_by); ?>" />
    130129<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
    131130<?php else: ?>
  • trunk/wp-admin/includes/bookmark.php

    r23416 r23445  
    5656    $link = new stdClass;
    5757    if ( isset( $_GET['linkurl'] ) )
    58         $link->link_url = esc_url( $_GET['linkurl'] );
     58        $link->link_url = esc_url( wp_unslash( $_GET['linkurl'] ) );
    5959    else
    6060        $link->link_url = '';
    6161
    6262    if ( isset( $_GET['name'] ) )
    63         $link->link_name = esc_attr( $_GET['name'] );
     63        $link->link_name = esc_attr( wp_unslash( $_GET['name'] ) );
    6464    else
    6565        $link->link_name = '';
  • trunk/wp-admin/includes/class-wp-links-list-table.php

    r21944 r23445  
    2424        global $cat_id, $s, $orderby, $order;
    2525
    26         wp_reset_vars( array( 'action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'orderby', 'order', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]', 's' ) );
     26        wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) );
    2727
    2828        $args = array( 'hide_invisible' => 0, 'hide_empty' => 0 );
  • trunk/wp-admin/link-add.php

    r20433 r23445  
    1616$parent_file = 'link-manager.php';
    1717
    18 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image',
    19     'description', 'visible', 'target', 'category', 'link_id',
    20     'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
    21     'notes', 'linkcheck[]'));
     18wp_reset_vars( array('action', 'cat_id', 'link_id' ) );
    2219
    2320wp_enqueue_script('link');
  • trunk/wp-admin/link.php

    r22855 r23445  
    1313require_once ('admin.php');
    1414
    15 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
     15wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
    1616
    1717if ( ! current_user_can('manage_links') )
  • trunk/wp-admin/options-head.php

    r19712 r23445  
    33 * WordPress Options Header.
    44 *
    5  * Resets variables: 'action', 'standalone', and 'option_group_id'. Displays
    6  * updated message, if updated variable is part of the URL query.
     5 * Displays updated message, if updated variable is part of the URL query.
    76 *
    87 * @package WordPress
     
    109 */
    1110
    12 wp_reset_vars(array('action', 'standalone', 'option_group_id'));
     11wp_reset_vars( array( 'action' ) );
    1312
    1413if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
  • trunk/wp-admin/post.php

    r22725 r23445  
    1515$submenu_file = 'edit.php';
    1616
    17 wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));
     17wp_reset_vars( array( 'action' ) );
    1818
    1919if ( isset( $_GET['post'] ) )
  • trunk/wp-admin/user-edit.php

    r23416 r23445  
    1010require_once('./admin.php');
    1111
    12 wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'));
     12wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) );
    1313
    1414$user_id = (int) $user_id;
     
    5555);
    5656
    57 $wp_http_referer = remove_query_arg(array('update', 'delete_count'), wp_unslash( $wp_http_referer ) );
     57$wp_http_referer = remove_query_arg(array('update', 'delete_count'), $wp_http_referer );
    5858
    5959$user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
Note: See TracChangeset for help on using the changeset viewer.