summaryrefslogtreecommitdiffstats
path: root/wp-admin/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/post.php')
-rw-r--r--wp-admin/post.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 7f3c2ab..d1a0ff7 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -3,22 +3,8 @@ require_once('admin.php');
$parent_file = 'edit.php';
$submenu_file = 'edit.php';
-$wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' );
-
-for ($i=0; $i<count($wpvarstoreset); $i += 1) {
- $wpvar = $wpvarstoreset[$i];
- if (!isset($$wpvar)) {
- if (empty($_POST["$wpvar"])) {
- if (empty($_GET["$wpvar"])) {
- $$wpvar = '';
- } else {
- $$wpvar = $_GET["$wpvar"];
- }
- } else {
- $$wpvar = $_POST["$wpvar"];
- }
- }
-}
+
+wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));
if ( isset( $_POST['deletepost'] ) )
$action = 'delete';