Clean up URL and redirect after GET posts
git-svn-id: http://svn.automattic.com/wordpress/trunk@6863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6279379c76
commit
d35361464b
|
@ -95,6 +95,11 @@ break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||||
|
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
wp_enqueue_script( 'admin-categories' );
|
wp_enqueue_script( 'admin-categories' );
|
||||||
wp_enqueue_script('admin-forms');
|
wp_enqueue_script('admin-forms');
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||||
|
|
||||||
wp_redirect('edit-link-categories.php?message=6');
|
wp_redirect('edit-link-categories.php?message=6');
|
||||||
exit();
|
exit();
|
||||||
|
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||||
|
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = __('Link Categories');
|
$title = __('Link Categories');
|
||||||
|
|
|
@ -26,6 +26,9 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) {
|
||||||
|
|
||||||
wp_redirect($sendback);
|
wp_redirect($sendback);
|
||||||
exit();
|
exit();
|
||||||
|
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||||
|
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = __('Pages');
|
$title = __('Pages');
|
||||||
|
|
|
@ -85,6 +85,11 @@ break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||||
|
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
wp_enqueue_script( 'admin-tags' );
|
wp_enqueue_script( 'admin-tags' );
|
||||||
wp_enqueue_script('admin-forms');
|
wp_enqueue_script('admin-forms');
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,9 @@ if ( isset($_GET['deleteit']) && isset($_GET['linkcheck']) ) {
|
||||||
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
|
$sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
|
||||||
wp_redirect($sendback);
|
wp_redirect($sendback);
|
||||||
exit;
|
exit;
|
||||||
|
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||||
|
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_enqueue_script( 'wp-lists' );
|
wp_enqueue_script( 'wp-lists' );
|
||||||
|
|
Loading…
Reference in New Issue