"FeedBurner", "desc" => "Your custom FeedBurner settings.", "id" => $shortname."_admin_heading", "type" => "info"), array( "name" => "Feed Address", "desc" => "Enter your full feed address.", "id" => $shortname."_feed_address", "std" => "http://feeds.feedburner.com/google-alerts-spencerestrategies-com", "type" => "text"), array( "name" => "feedburner.com Address", "desc" => "Enter your feedburner.com address to enable eMail subscription. The one that comes after http://feeds.feedburner.com/... (eg: ...urner.com/vaction)", "id" => $shortname."_feed_id", "std" => "google-alerts-spencerestrategies-com", "type" => "text"), //added by developer array( "name" => "Twitter", "desc" => "", "id" => $shortname."_admin_heading", "type" => "info"), array( "name" => "Twitter Address", "desc" => "", "id" => $shortname."_twitter_address", "std" => "http://twitter.com/estrategies", "type" => "text"), array( "name" => "Facebook", "desc" => "", "id" => $shortname."_admin_heading", "type" => "info"), array( "name" => "Facebook Address", "desc" => "", "id" => $shortname."_facebook_address", "std" => "http://www.facebook.com/pages/Zurich-Switzerland/Spencer-e-Strategies/73911400419", "type" => "text"), array( "name" => "Buzz", "desc" => "", "id" => $shortname."_admin_heading", "type" => "info"), array( "name" => "Buzz Address", "desc" => "", "id" => $shortname."_buzz_address", "std" => "http://www.google.com/profiles/spencer.estrategies", "type" => "text"), array( "name" => "Friendfeed", "desc" => "", "id" => $shortname."_admin_heading", "type" => "info"), array( "name" => "Friendfeed Address", "desc" => "", "id" => $shortname."_Friendfeed_address", "std" => "http://friendfeed.com/joespencer", "type" => "text"), // end---- ); 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=social-media-options.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: themes.php?page=social-media-options.php&reset=true"); die; } } add_theme_page($themename." Options", "Social Media Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '
'.$themename.' settings saved.
'.$themename.' settings reset.