'Wide Sidebar')); register_sidebar(array('name'=>'Left Sidebar')); register_sidebar(array('name'=>'Left2 Sidebar')); register_sidebar(array('name'=>'Bottom Sidebar')); register_sidebar(array('name'=>'Invitation')); ?> "Address Line 1", "id" => $shortname."_address_1", "std" => "", "type" => "text"), array( "name" => "Address Line 2", "id" => $shortname."address_2", "std" => "", "type" => "text"), array( "name" => "City", "id" => $shortname."_city", "std" => "", "type" => "text"), array( "name" => "State", "id" => $shortname."_state", "std" => "", "type" => "text"), array( "name" => "Zip", "id" => $shortname."_zip", "std" => "", "type" => "text"), array( "name" => "Phone including dashes", "id" => $shortname."_phone", "std" => "", "type" => "text"), array( "name" => "Email", "id" => $shortname."_email", "std" => "", "type" => "text"), array( "name" => "Wedding site or Family Site", "id" => $shortname."_or", "std" => "", "type" => "text"), array( "name" => "Wife", "id" => $shortname."_wife", "std" => "", "type" => "text"), array( "name" => "Husband", "id" => $shortname."_husband", "std" => "", "type" => "text"), array( "name" => "Wedding Date", "id" => $shortname."_date", "std" => "", "type" => "text"), array( "name" => "Quote", "id" => $shortname."_quote", "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=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", "Sakina Wedding Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '
'.$themename.' settings saved.
'.$themename.' settings reset.