"Bleach", "type" => "title"), array( "type" => "open"), array( "name" => "Custom Logo", "desc" => "Enter your logo URL (252 x 52). Logo template included in the theme package and located in images folder.", "id" => $shortname."_logo_url", "std" => "", "type" => "text"), array( "name" => "Your Own Header", "desc" => "Enter your image URL (938 x 338). Leave blank to use default.", "id" => $shortname."_alt_header", "std" => "", "type" => "text"), array( "name" => "Pages to exclude", "desc" => "Select the ID’s that you would like to exclude from the top menu (Separate with commas).", "id" => $shortname."_exclude_pages", "std" => "", "type" => "text"), array( "name" => "Categories to exclude", "desc" => "Select the ID’s that you would like to exclude from the category list located under the main banner (Separate with commas).", "id" => $shortname."_exclude_categories", "std" => "", "type" => "text"), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: themes.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: themes.php?page=functions.php&reset=true"); die; } } add_theme_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '
'.$themename.' settings saved.
'.$themename.' settings reset.