mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
More options work. Bug fixes for advanced_edit not being boolean type, clean up of options code and update feedback (still needs work there), first bit of miscellaneous screen.
git-svn-id: https://develop.svn.wordpress.org/trunk@1058 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
58
wp-admin/options-misc.php
Normal file
58
wp-admin/options-misc.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
$title = 'Miscellaneous Options';
|
||||
|
||||
function add_magic_quotes($array) {
|
||||
foreach ($array as $k => $v) {
|
||||
if (is_array($v)) {
|
||||
$array[$k] = add_magic_quotes($v);
|
||||
} else {
|
||||
$array[$k] = addslashes($v);
|
||||
}
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS);
|
||||
$HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS);
|
||||
$HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS);
|
||||
}
|
||||
|
||||
$wpvarstoreset = array('action','standalone', 'option_group_id');
|
||||
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||
$wpvar = $wpvarstoreset[$i];
|
||||
if (!isset($$wpvar)) {
|
||||
if (empty($HTTP_POST_VARS["$wpvar"])) {
|
||||
if (empty($HTTP_GET_VARS["$wpvar"])) {
|
||||
$$wpvar = '';
|
||||
} else {
|
||||
$$wpvar = $HTTP_GET_VARS["$wpvar"];
|
||||
}
|
||||
} else {
|
||||
$$wpvar = $HTTP_POST_VARS["$wpvar"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$standalone = 0;
|
||||
include_once('admin-header.php');
|
||||
include('options-head.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2>Miscellaneous Options</h2>
|
||||
<form name="form1" method="post" action="options.php">
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="action" value="update" /> <input type="hidden" name="page_options" value="'hack_file' " />
|
||||
<p>
|
||||
<label>
|
||||
<input type="checkbox" name="hack_file" value="1" <?php checked('1', get_settings('hack_file')); ?> />
|
||||
Use legacy <code>my-hacks.php</code> file support</label>
|
||||
</p>
|
||||
<p style="text-align: right;">
|
||||
<input type="submit" name="Submit" value="Update Options" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<?php include("admin-footer.php") ?>
|
||||
Reference in New Issue
Block a user