Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove unused variables reset by wp_reset_vars(). Many of these haven…

…'t been used since b2. see #21767.

git-svn-id: http://core.svn.wordpress.org/trunk@23445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 83e0ce2ac153803080085cc37876eb0ce461bed2 1 parent 2a956dd
Andrew Nacin nacin authored
2  wp-admin/admin.php
View
@@ -77,8 +77,6 @@
$date_format = get_option('date_format');
$time_format = get_option('time_format');
-wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'text', 'trackback', 'pingback'));
-
wp_enqueue_script( 'common' );
$editing = false;
1  wp-admin/edit-link-form.php
View
@@ -126,7 +126,6 @@
if ( $link_id ) : ?>
<input type="hidden" name="action" value="save" />
<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
-<input type="hidden" name="order_by" value="<?php echo esc_attr($order_by); ?>" />
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
<?php else: ?>
<input type="hidden" name="action" value="add" />
4 wp-admin/includes/bookmark.php
View
@@ -55,12 +55,12 @@ function edit_link( $link_id = 0 ) {
function get_default_link_to_edit() {
$link = new stdClass;
if ( isset( $_GET['linkurl'] ) )
- $link->link_url = esc_url( $_GET['linkurl'] );
+ $link->link_url = esc_url( wp_unslash( $_GET['linkurl'] ) );
else
$link->link_url = '';
if ( isset( $_GET['name'] ) )
- $link->link_name = esc_attr( $_GET['name'] );
+ $link->link_name = esc_attr( wp_unslash( $_GET['name'] ) );
else
$link->link_name = '';
2  wp-admin/includes/class-wp-links-list-table.php
View
@@ -23,7 +23,7 @@ function ajax_user_can() {
function prepare_items() {
global $cat_id, $s, $orderby, $order;
- 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' ) );
+ wp_reset_vars( array( 'action', 'cat_id', 'link_id', 'orderby', 'order', 's' ) );
$args = array( 'hide_invisible' => 0, 'hide_empty' => 0 );
5 wp-admin/link-add.php
View
@@ -15,10 +15,7 @@
$title = __('Add New Link');
$parent_file = 'link-manager.php';
-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[]'));
+wp_reset_vars( array('action', 'cat_id', 'link_id' ) );
wp_enqueue_script('link');
wp_enqueue_script('xfn');
2  wp-admin/link.php
View
@@ -12,7 +12,7 @@
/** Load WordPress Administration Bootstrap */
require_once ('admin.php');
-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[]'));
+wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
5 wp-admin/options-head.php
View
@@ -2,14 +2,13 @@
/**
* WordPress Options Header.
*
- * Resets variables: 'action', 'standalone', and 'option_group_id'. Displays
- * updated message, if updated variable is part of the URL query.
+ * Displays updated message, if updated variable is part of the URL query.
*
* @package WordPress
* @subpackage Administration
*/
-wp_reset_vars(array('action', 'standalone', 'option_group_id'));
+wp_reset_vars( array( 'action' ) );
if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
// For backwards compat with plugins that don't use the Settings API and just set updated=1 in the redirect
2  wp-admin/post.php
View
@@ -14,7 +14,7 @@
$parent_file = 'edit.php';
$submenu_file = 'edit.php';
-wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));
+wp_reset_vars( array( 'action' ) );
if ( isset( $_GET['post'] ) )
$post_id = $post_ID = (int) $_GET['post'];
4 wp-admin/user-edit.php
View
@@ -9,7 +9,7 @@
/** WordPress Administration Bootstrap */
require_once('./admin.php');
-wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'));
+wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) );
$user_id = (int) $user_id;
$current_user = wp_get_current_user();
@@ -54,7 +54,7 @@
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
-$wp_http_referer = remove_query_arg(array('update', 'delete_count'), wp_unslash( $wp_http_referer ) );
+$wp_http_referer = remove_query_arg(array('update', 'delete_count'), $wp_http_referer );
$user_can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
Please sign in to comment.
Something went wrong with that request. Please try again.