__('Index Insert Position','thematic'), "desc" => __('The widgetized Index Insert will follow after this post number.','thematic'), "id" => $shortname."_insert_position", "std" => "2", "type" => "text"), array( "name" => __('Info on Author Page','thematic'), "desc" => __("Display a microformatted vCard—with the author's avatar, bio and email—on the author page.",'thematic'), "id" => $shortname."_authorinfo", "std" => "false", "type" => "checkbox"), array( "name" => __('Text in Footer','thematic'), "desc" => __("You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [the-year]",'thematic'), "id" => $shortname."_footertext", "std" => __("Powered by [wp-link]. Built on the [theme-link].", 'thematic'), "type" => "textarea", "options" => array( "rows" => "5", "cols" => "94") ), ); 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=theme-options.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: themes.php?page=theme-options.php&reset=true"); die; } else if ( 'reset_widgets' == $_REQUEST['action'] ) { $null = null; update_option('sidebars_widgets',$null); header("Location: themes.php?page=theme-options.php&reset=true"); die; } } add_theme_page($themename." Options", "Buddymatic Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '
'.$themename.' '.__('settings saved.','thematic').'
'.$themename.' '.__('settings reset.','thematic').'
'.$themename.' '.__('widgets reset.','thematic').'
visit Free BP Themes.'); ?>