'Sidebar-Main',
'before_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Bottom-Left',
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Bottom-Middle',
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Bottom-Right',
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Column-Top',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Home-Top',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Post-Top-Right-Home',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Post-Top-Right-Single',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Post-Bottom-Home',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array('name'=>'Post-Bottom-Single',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
/* theme admin screen*/
$fulltemplatepath=get_bloginfo('template_url');
$options = array (
array(
"name" => "Body Background Color",
"desc" => "body",
"id" => "bs_theme_body_background",
"type" => "text",
"std" => "#ffffff"
),
array(
"name" => "Page Wrapper Background Color",
"desc" => "#wrap",
"id" => "bs_theme_wrap_background",
"type" => "text",
"std" => "#ffffff"
),
array(
"name" => "Page Wrapper Border Color",
"desc" => "#wrap",
"id" => "bs_theme_wrap_border",
"type" => "text",
"std" => "#cccccc"
),
array(
"name" => "Header Background Color",
"desc" => "#header",
"id" => "bs_theme_header_background",
"type" => "text",
"std" => "#eeeeee"
),
array(
"name" => "Header Background Image",
"desc" => "#header (use full URL path to image) (approx size of image: 1000x140) ",
"id" => "bs_theme_header_background_image",
"type" => "text",
"std" => $fulltemplatepath."/images/header.gif"
),
array(
"name" => "Show/Hide Header Title & Description",
"desc" => "#header h1, #header .description",
"id" => "bs_theme_header_show_hide_text",
"type" => "radioshowhide",
"std" => "show"
),
array(
"name" => "Show/Hide Posted By Line",
"desc" => ".meta-postedby",
"id" => "bs_theme_header_show_hide_postedby",
"type" => "radioshowhide",
"std" => "show"
),
array(
"name" => "Show/Hide Tags Line",
"desc" => ".meta-tags",
"id" => "bs_theme_header_show_hide_tags",
"type" => "radioshowhide",
"std" => "show"
),
array(
"name" => "Show/Hide Add Comment Line",
"desc" => ".meta-addcomment",
"id" => "bs_theme_header_show_hide_addcomment",
"type" => "radioshowhide",
"std" => "show"
),
array(
"name" => "Navigation Bar Background Color",
"desc" => "#navbar",
"id" => "bs_theme_navbar_background",
"type" => "text",
"std" => "#cccccc"
),
array(
"name" => "Navigation Bar Link Color",
"desc" => "#navbar a",
"id" => "bs_theme_navbar_link_color",
"type" => "text",
"std" => "#444444"
),
array(
"name" => "Sidebar Text Color",
"desc" => "#sidebar",
"id" => "bs_theme_sidebar_text_color",
"type" => "text",
"std" => "#444444"
),
array(
"name" => "Footer Text Color",
"desc" => "#footer",
"id" => "bs_theme_footer_text_color",
"type" => "text",
"std" => "#666666"
),
array(
"name" => "Post Title Color",
"desc" => "h1, h2, h3, h4",
"id" => "bs_theme_title_color",
"type" => "text",
"std" => "#111111"
),
array(
"name" => "General Link Color",
"desc" => "a",
"id" => "bs_theme_link_color",
"type" => "text",
"std" => "#333399"
),
array(
"name" => "General Text Color",
"desc" => ".the_content",
"id" => "bs_theme_text_color",
"type" => "text",
"std" => "#222222"
),
array(
"name" => "Google Verify Code",
"desc" => "Go to Google Webmaster Tools, submit your XML Sitemap and grab your verify code to paste into this box.",
"id" => "bs_theme_google_verify_code",
"type" => "textarea",
"std" => ""
),
array(
"name" => "Good Analytics Code",
"desc" => "Go to Google Analytics, and grab your tracking code to paste into this box. You can also put your Quantcast tracking code here.",
"id" => "bs_theme_google_analytics_code",
"type" => "textarea",
"std" => ""
),
array(
"name" => "Custom CSS",
"desc" => "You can add any css into this box and it will override any code in the stylesheet or from the info above.",
"id" => "bs_theme_custom_css",
"type" => "textarea",
"std" => ""
),
);
function mytheme_add_admin() {
global $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("Edit Basic Simplicity", "Edit Basic Simplicity", 'edit_themes', basename(__FILE__), 'basic_simplicity_theme_page');
}
function basic_simplicity_theme_page() {
global $options;
if ( $_REQUEST['saved'] ) echo 'Basic Simplicity: Settings saved.
';
if ( $_REQUEST['reset'] ) echo 'Basic Simplicity: Settings reset.
';
_e('');
_e('');
_e('
');
_e('
Manage Themes
');
_e('
Edit Basic Simplicity
');
_e('
Below you can make simple style changes to Basic Simplicity as well as enter things like your Google Analytics tracking code.
');
_e('
You are using Basic Simplicity v.1.4.1, learn more about Basic Simplicity.
');
_e('
');
_e('
');
_e('
');
_e('
');
_e('
');
}
add_action('admin_menu', 'mytheme_add_admin');
?>