"General",
"type" => "heading",
"desc" => "General Settings"),
array( "name" => "Logo Type",
"desc" => '(?)
',
"option1" => "Default",
"option2" => "Image",
"value1" => "0",
"value2" => "1",
"id" => $shortname."_logo_type",
"std" => "",
"type" => "select-custom"),
array( "name" => "Logo Image",
"desc" => '(?)
',
"id" => $shortname."_logo_image",
"std" => "",
"type" => "text"),
array( "name" => "Rss Feed URL",
"desc" => '(?)
',
"id" => $shortname."_rss_url",
"std" => "",
"type" => "text"),
array( "name" => "Top Banner Image",
"desc" => '(?)
',
"id" => $shortname."_banner_image",
"std" => "",
"type" => "text"),
array( "name" => "Top Banner URL",
"desc" => '(?)
',
"id" => $shortname."_banner_url",
"std" => "",
"type" => "text"),
array( "name" => "Ads 125x125",
"desc" => "Just install and Activate WP125 Plugin",
"std" => "",
"type" => "description"),
array( "name" => "Homepage",
"type" => "heading",
"desc" => "Homepage settings"),
array( "name" => "Headline Category",
"desc" => '(?)
',
"id" => $shortname."_headline_category",
"std" => "Select a category:",
"type" => "select-categories"),
array( "name" => "Featured Category",
"desc" => '(?)
',
"id" => $shortname."_featured_category",
"std" => "Select a category:",
"type" => "select-categories"),
array( "name" => "Navigation",
"type" => "heading",
"desc" => "Navigation settings"),
array( "name" => "Top Menu Exclude",
"desc" => '(?)
',
"id" => $shortname."_topmenu_exclude",
"std" => "",
"type" => "text")
);
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=admin-options.php&saved=true");
die;
}
}
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
function mytheme_admin() {
global $themename, $shortname, $options;
if ( $_REQUEST['saved'] ) echo ''.$themename.' settings saved.
';
?>