Remove unused variables reset by wp_reset_vars(). Many of these haven't been used since b2. see #21767.
git-svn-id: https://develop.svn.wordpress.org/trunk@23445 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b17b5a64e3
commit
780c74d246
@ -77,8 +77,6 @@ set_screen_options();
|
||||
$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;
|
||||
|
@ -126,7 +126,6 @@ do_meta_boxes(null, 'advanced', $link);
|
||||
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" />
|
||||
|
@ -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 = '';
|
||||
|
||||
|
@ -23,7 +23,7 @@ class WP_Links_List_Table extends WP_List_Table {
|
||||
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 );
|
||||
|
||||
|
@ -15,10 +15,7 @@ if ( ! current_user_can('manage_links') )
|
||||
$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');
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -14,7 +14,7 @@ require_once('./admin.php');
|
||||
$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'];
|
||||
|
@ -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 @@ get_current_screen()->set_help_sidebar(
|
||||
'<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' );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user