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

    ', 'after_title' => '

    ', )); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 80, 80, true ); // 80 pixels wide by 80 pixels tall, hard crop mode $themename = "Blog Happens"; $shortname = "bhp"; $options = array ( array("name" => "Theme Options", "type" => "title"), array("type" => "open"), array("name" => "Blog Content Width", "id" => $shortname."_content_width", "desc" => "Choose blog content width.", "std" => "wide", "type" => "choose_content_width"), array("name" => "Blog Image", "desc" => "Appear on top-left of the page. Please use 80px width.", "id" => $shortname."_blog_image", "type" => "blog_file"), array("name" => "Text Link Color", "desc" => "Select the text link color.", "id" => $shortname."_link_color", "std" => "", "type" => "choose_color"), array("name" => "Text Link Color on Hover", "desc" => "Select the text link color when move mouse over the text.", "id" => $shortname."_hover_color", "std" => "", "type" => "choose_color"), array("name" => "Background Color", "desc" => "Select the background color.", "id" => $shortname."_bg_color", "std" => "", "type" => "choose_color"), array("name" => "Background Image", "desc" => "Upload background image here.", "id" => $shortname."_bg_image", "type" => "bg_file"), array("name" => "Background Repeat Style", "id" => $shortname."_bg_repeat_style", "desc" => "Choose which style of background repeat.", "std" => "repeat", "type" => "choose_bg_repeat"), array("name" => "Custom CSS", "id" => $shortname."_custom_css", "desc" => "Input your Custom CSS code.", "type" => "custom_css"), array("type" => "blog_image_enable", "id" => $shortname."_blog_image_enable"), array("type" => "bg_image_enable", "id" => $shortname."_bg_image_enable"), array("type" => "close") ); $uploadpath = wp_upload_dir(); if ($uploadpath['baseurl']=='') $uploadpath['baseurl'] = get_bloginfo('siteurl').'/wp-content/uploads'; function bhp_add_admin() { global $themename, $shortname, $options, $uploadpath; 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'] ); } if ($_FILES["bgImage"]["type"]) { $directory = $uploadpath['basedir'].'/'; $filename = str_replace(' ', '_', $_FILES["bgImage"]["name"]); move_uploaded_file($_FILES["bgImage"]["tmp_name"], $directory . $filename); update_option('bhp_bgImage', $uploadpath['baseurl']. "/". $filename); } if ($_FILES["blogImage"]["type"]) { $directory = $uploadpath['basedir'].'/'; $filename = str_replace(' ', '_', $_FILES["blogImage"]["name"]); move_uploaded_file($_FILES["blogImage"]["tmp_name"], $directory . $filename); update_option('bhp_blogImage', $uploadpath['baseurl']. "/". $filename); } 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", "Theme Options", 'edit_themes', basename(__FILE__), 'bhp_admin'); } function bhp_admin() { global $themename, $shortname, $options, $uploadpath; if ( $_REQUEST['saved'] ) echo '

    '.$themename.' settings saved.

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

    '.$themename.' settings reset.

    '; ?>

    Settings


    */ ?> " />

    '; } ?> name="bhp_blog_image_enable" id="bhp_blog_image_enable" /> Enable blog image

    ','bhp'), $uploadpath['baseurl']); ?>


    '; } ?> name="bhp_bg_image_enable" id="bhp_bg_image_enable" /> Enable background image

    You can try BGpatterns.com ','bhp'), $uploadpath['baseurl']); ?>
    #