Make WordPress Core


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

wp_reset_vars() from Sewar. fixes #2888

File:
1 edited

Legend:

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

    r3907 r3946  
    19541954}
    19551955
     1956function wp_reset_vars($vars) {
     1957    for ($i=0; $i<count($vars); $i += 1) {
     1958        $var = $vars[$i];
     1959        global $$var;
     1960
     1961        if (!isset($$var)) {
     1962            if (empty($_REQUEST["$var"])) {
     1963                $$var = '';
     1964            } else {
     1965                $$var = $_REQUEST["$var"];
     1966                unset($_REQUEST["$wpvar"]);
     1967            }
     1968        }
     1969    }
     1970}
     1971
    19561972?>
Note: See TracChangeset for help on using the changeset viewer.