0 ) { $title = apply_filters('the_title2', $before . $title . $after, $before, $after); if ( $echo ) echo $title; else return $title; } } ?> "Ad Block Options", "type" => "titles"), array( "name" => "Enable/Disable 125x125 ad block", "id" => $shortname."_ads_display", "type" => "select", "std" => "Display", "options" => array("Disable", "Enable")), array( "name" => "125x125 Ad #1 Image", "id" => $shortname."_ad_image_one", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #1 URL", "id" => $shortname."_ad_url_one", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #2 Image", "id" => $shortname."_ad_image_two", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #2 URL", "id" => $shortname."_ad_url_two", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #3 Image", "id" => $shortname."_ad_image_two", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #3 URL", "id" => $shortname."_ad_url_two", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #4 Image", "id" => $shortname."_ad_image_two", "std" => "#", "type" => "text"), array( "name" => "125x125 Ad #4 URL", "id" => $shortname."_ad_url_two", "std" => "#", "type" => "text"), array( "name" => "468x60 Banner Options", "type" => "titles"), array( "name" => "Enable/Disable 468x60 Banner", "id" => $shortname."_banner_display", "type" => "select", "std" => "Display", "options" => array("Disable", "Enable")), array( "name" => "468x60 Banner After Post URL", "id" => $shortname."_banner_url", "std" => "#", "type" => "text"), array( "name" => "468x60 Banner After Post Image", "id" => $shortname."_banner_image", "std" => "#", "type" => "text"), ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'custom-header' ); /* this sets default video width */ if (!isset($content_width)) { if (easel_sidebars_disabled()) { $content_width = 740; } else { $content_width = 540; } } 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", "Current Theme Options", '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.

'; ?>

settings

" />