"Slideshow", "type" => "title"), array( "type" => "open"), array( "name" => "Slideshow 1 title", "desc" => "the title for your slideshow 1", "id" => $shortname."_slideshow_title1", "std" => "", "type" => "text"), array( "name" => "Slideshow 1 image", "desc" => "the URL for your slideshow 1 (683px × 207px)", "id" => $shortname."_slideshow_image1", "std" => "http://", "type" => "text"), array( "name" => "Slideshow 2 title", "desc" => "the title for your slideshow 2", "id" => $shortname."_slideshow_title2", "std" => "", "type" => "text"), array( "name" => "Slideshow 2 image", "desc" => "the URL for your slideshow 2 (683px × 207px)", "id" => $shortname."_slideshow_image2", "std" => "http://", "type" => "text"), array( "name" => "Slideshow 3 title", "desc" => "the title for your slideshow 3", "id" => $shortname."_slideshow_title3", "std" => "", "type" => "text"), array( "name" => "Slideshow 3 image", "desc" => "the URL for your slideshow 3 (683px × 207px)", "id" => $shortname."_slideshow_image3", "std" => "http://", "type" => "text"), array( "name" => "Slideshow 4 title", "desc" => "the title for your slideshow 4", "id" => $shortname."_slideshow_title4", "std" => "", "type" => "text"), array( "name" => "Slideshow 4 image", "desc" => "the URL for your slideshow 4 (683px × 207px)", "id" => $shortname."_slideshow_image4", "std" => "http://", "type" => "text"), array( "name" => "Disable Slideshow?", "desc" => "Check this box if you would like to DISABLE the Slideshow.", "id" => $shortname."_featured_disable", "type" => "checkbox", "std" => "false"), array( "type" => "close"), array( "name" => "Featured Category", "type" => "title"), array( "type" => "open"), array( "name" => "Category ID", "desc" => "Separate category ID with commas", "id" => $shortname."_category_id", "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.