'
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); $themename = "Bob's Law Blog"; /* The Options*/ $options = array ( array( "name" => "125 x 125 Banner Images", "type" => "title" ), array( "type" => "open" ), array( "name" => "125 x 125 Banner Ad #1", "desc" => "Insert the URL of the image you want to use for the ad space here.", "id" => "banner_ad_1", "type" => "text" ), array( "name" => "125 x 125 Banner Ad #2", "desc" => "Insert the URL of the image you want to use for the ad space here.", "id" => "banner_ad_2", "type" => "text" ), array( "name" => "125 x 125 Banner Ad #3", "desc" => "Insert the URL of the image you want to use for the ad space here.", "id" => "banner_ad_3", "type" => "text" ), array( "name" => "125 x 125 Banner Ad #4", "desc" => "Insert the URL of the image you want to use for the ad space here.", "id" => "banner_ad_4", "type" => "text" ), array( "type" => "close" ), array( "name" => "125 x 125 Banner URL's", "type" => "title" ), array( "type" => "open" ), array( "name" => "Banner Ad #1 URL", "desc" => "Insert the destination URL for Banner Ad #1.", "id" => "banner_ad_url_1", "type" => "text" ), array( "name" => "Banner Ad #2 URL", "desc" => "Insert the destination URL for Banner Ad #2.", "id" => "banner_ad_url_2", "type" => "text" ), array( "name" => "Banner Ad #3 URL", "desc" => "Insert the destination URL for Banner Ad #3.", "id" => "banner_ad_url_3", "type" => "text" ), array( "name" => "Banner Ad #4 URL", "desc" => "Insert the destination URL for Banner Ad #4.", "id" => "banner_ad_url_4", "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; } } if(!function_exists('wp_list_comments')) { add_theme_page($themename." Options", $themename, 'edit_themes', basename(__FILE__), 'mytheme_admin'); } else { add_menu_page($themename." Options", $themename, 'edit_themes', basename(__FILE__), 'mytheme_admin'); } } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

'; if ( $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

'; ?>

Theme Settings


" />          />