mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
wp_reset_vars() from Sewar. fixes #2888
git-svn-id: https://develop.svn.wordpress.org/trunk@3946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1953,4 +1953,20 @@ function get_udims($width, $height) {
|
||||
return array((int) ($width / $height * 96), 96);
|
||||
}
|
||||
|
||||
function wp_reset_vars($vars) {
|
||||
for ($i=0; $i<count($vars); $i += 1) {
|
||||
$var = $vars[$i];
|
||||
global $$var;
|
||||
|
||||
if (!isset($$var)) {
|
||||
if (empty($_REQUEST["$var"])) {
|
||||
$$var = '';
|
||||
} else {
|
||||
$$var = $_REQUEST["$var"];
|
||||
unset($_REQUEST["$wpvar"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user