Make WordPress Core


Ignore:
Timestamp:
07/03/2006 07:03:37 PM (19 years ago)
Author:
ryan
Message:

wp_reset_vars() from Sewar. fixes #2888

File:
1 edited

Legend:

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

    r3928 r3946  
    44$parent_file = 'edit.php';
    55$submenu_file = 'edit.php';
    6 $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' );
    76
    8 for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    9     $wpvar = $wpvarstoreset[$i];
    10     if (!isset($$wpvar)) {
    11         if (empty($_POST["$wpvar"])) {
    12             if (empty($_GET["$wpvar"])) {
    13                 $$wpvar = '';
    14             } else {
    15             $$wpvar = $_GET["$wpvar"];
    16             }
    17         } else {
    18             $$wpvar = $_POST["$wpvar"];
    19         }
    20     }
    21 }
     7wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));
    228
    239if ( isset( $_POST['deletepost'] ) )
Note: See TracChangeset for help on using the changeset viewer.