/** * Set up admin panel * */ function childtheme_admin() { if (!childtheme_can_edit_theme_options()) { wp_die('Nice Try'); } global $my_themename, $my_shortname, $my_options; if ($_REQUEST['saved']) { echo '<div id="message" class="updated fade"><p><strong>' . $my_themename . ' ' . __('settings saved.', 'thematic') . '</strong></p></div>'; } if ($_REQUEST['reset']) { echo '<div id="message" class="updated fade"><p><strong>' . $my_themename . ' ' . __('settings reset.', 'thematic') . '</strong></p></div>'; } if ($_REQUEST['reset_widgets']) { echo '<div id="message" class="updated fade"><p><strong>' . $my_themename . ' ' . __('widgets reset.', 'thematic') . '</strong></p></div>'; } if ($_REQUEST['error']) { echo '<div id="message" class="updated fade"><p><strong>The file you submitted was not a valid image type.</strong></p></div>'; } if ($_REQUEST['imgremoved']) { echo '<div id="message" class="updated fade"><p><strong>' . __('Image Removed') . '</strong></p></div>'; } ?> <div id="panel" class="wrap"> <div id="childtheme_theme_icon_32" class="icon32"></div> <h2><?php print $my_themename; ?> </h2> <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> " enctype="multipart/form-data"> <table class="form-table"> <tbody> <?php childtheme_admin_get_my_options(); ?> </tbody> </table> <p class="submit"> <input id='childoption_submit' name="save" type="submit" value="<?php _e('Save changes', 'thematic'); ?> " /> <input type="hidden" name="action" value="save" /> </p> </form> <form method="post" action=""> <p class="submit"> <input name="reset" type="submit" value="<?php _e('Reset', 'thematic'); ?> " /> <input type="hidden" name="action" value="reset" /> </p> </form> <!-- <form method="post" action=""> <p class="submit"> <input name="reset_widgets" type="submit" value="<?php _e('Reset Widgets', 'thematic'); ?> " /> <input type="hidden" name="action" value="reset_widgets" /> </p> </form> --> </div> <?php }
/** * This function displays the settings for supported plugins * * @todo the whole shebang */ function childtheme_admin_get_my_plugins() { childtheme_admin_get_my_options(true); }