Changeset 1810 for trunk/wp-admin/options-head.php
- Timestamp:
- 10/18/2004 04:50:08 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-head.php
r1596 r1810 1 1 <?php 2 2 3 if ($user_level <= 6) { 4 die( __('You have do not have sufficient permissions to edit the options for this blog.') ); 3 $parent_file = 'options-general.php'; 4 5 function add_magic_quotes($array) { 6 foreach ($array as $k => $v) { 7 if (is_array($v)) { 8 $array[$k] = add_magic_quotes($v); 9 } else { 10 $array[$k] = addslashes($v); 11 } 12 } 13 return $array; 5 14 } 15 16 if (!get_magic_quotes_gpc()) { 17 $_GET = add_magic_quotes($_GET); 18 $_POST = add_magic_quotes($_POST); 19 $_COOKIE = add_magic_quotes($_COOKIE); 20 } 21 22 $wpvarstoreset = array('action','standalone', 'option_group_id'); 23 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 24 $wpvar = $wpvarstoreset[$i]; 25 if (!isset($$wpvar)) { 26 if (empty($_POST["$wpvar"])) { 27 if (empty($_GET["$wpvar"])) { 28 $$wpvar = ''; 29 } else { 30 $$wpvar = $_GET["$wpvar"]; 31 } 32 } else { 33 $$wpvar = $_POST["$wpvar"]; 34 } 35 } 36 } 37 38 $standalone = 0; 39 include_once('admin-header.php'); 6 40 ?> 7 41
Note: See TracChangeset
for help on using the changeset viewer.