OK, I keep going over things and I don't get it. I've got a plugin that allows users to select from different color schemes for their blogs, so I put the menu under the Presentation menu. However, when the form is submitted, you get dumped back at the Presentation main menu with a url like this:
http://holisticnetworking.net/design/wp-admin/themes.php?
Why is it stripping off the end, there? Grr!
function hn_theme_styles_panel() {
$available = get_site_option('available_styles');
$name = 'style_';
$selected = '';
if($_POST) {
$selected = $_POST['new_style'];
$name .= strtolower(implode('_', explode(' ', $selected)));
update_site_option('user_style', $name);
?><div id='message' class='updated fade'><p><strong><?php echo($selected) ?> applied!</strong></p></div><?php
}
else {
$selected = get_option('user_style');
}
?>
<br />
<fieldset>
<form action="themes.php?page=theme_styles" id="select_style">
<select value="new_style">
<option>Please Select</option>
<?php foreach($available as $style) {
?><option <?php if($style == $selected) { echo(' selected="yes"'); } ?>><?php echo($style); ?></option><?php
} ?>
</select>
<input type="submit" value="Load Style" />
</form>
</fieldset>
<?php
}