'ffffff', 'text' => '333333', 'link' => '000000', 'border' => 'ffffff' ); define ('FUNCTIONS', 'functions/'); define ('COPY', FUNCTIONS . '/vigilance.php'); require_once (FUNCTIONS . '/sidebars.php'); require_once (FUNCTIONS . '/comments.php'); require_once (FUNCTIONS . '/wpcom-header.php'); // Use legacy comments template for versions less than 2.7 add_filter('comments_template', 'legacy_comments'); function legacy_comments($file) { if(!function_exists('wp_list_comments')) $file = 'legacy.comments.php'; return $file; } $themename = "Vigilance"; $shortname = "V"; $options = array ( array( "name" => __("Navigation", 'vigilance'), "type" => "subhead"), array( "name" => __("Exclude pages from header", 'vigilance'), "id" => $shortname."_pages_to_exclude", "desc" => __("Page ID's you don't want displayed in your header navigation. Use a comma-delimited list, eg. 1,2,3", 'vigilance'), "std" => "", "type" => "text"), array( "name" => __("Color Scheme", 'vigilance'), "type" => "subhead"), array( "name" => __("Customize colors", 'vigilance'), "desc" => __("If enabled the theme will use the layouts and colors you choose below.", 'vigilance'), "id" => $shortname."_background_css", "std" => "Disabled", "type" => "select", "options" => array("Disabled", "Enabled")), array( "name" => __("Background color", 'vigilance'), "id" => $shortname."_background_color", "desc" => "Your background color. Use Hex values and leave out the leading #.", "std" => "dcdfc2", "type" => "text"), array( "name" => "Border color", "id" => $shortname."_border_color", "desc" => "Your border color. Use Hex values and leave out the leading #.", "std" => "d7dab9", "type" => "text"), array( "name" => __("Link color", 'vigilance'), "id" => $shortname."_link_color", "desc" => __("Your link color. Use Hex values and leave out the leading #.", 'vigilance'), "std" => "772124", "type" => "text"), array( "name" => __("Link hover color", 'vigilance'), "id" => $shortname."_hover_color", "desc" => __("Your link hover color. Use Hex values and leave out the leading #.", 'vigilance'), "std" => "58181b", "type" => "text"), array( "name" => __("Disable hover images", 'vigilance'), "id" => $shortname."_image_hover", "desc" => __("This is useful if you use custom link colors and don't want the default red showing when a user hovers over the comments bubble or the sidebar menu items.", 'vigilance'), "std" => "false", "type" => "checkbox"), array( "name" => __("Alert Box", 'vigilance'), "type" => "subhead"), array( "name" => __("Alert Box On/Off", 'vigilance'), "desc" => __("Toggle the alert box.", 'vigilance'), "id" => $shortname."_alertbox_state", "std" => "Off", "type" => "select", "options" => array("Off", "On")), array( "name" => __("Alert Title", 'vigilance'), "id" => $shortname."_alertbox_title", "desc" => __("The title of your alert.", 'vigilance'), "std" => "", "type" => "text"), array( "name" => __("Alert Message", 'vigilance'), "id" => $shortname."_alertbox_content", "desc" => __("Must use HTML in the message including <p> tags.", 'vigilance'), "std" => "", "type" => "textarea", "options" => array("rows" => "8", "cols" => "70") ), ); 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", $themename . " Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

' . sprintf(__('%s settings saved.', 'vigilance'),$themename) . '

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

' . sprintf(__('%s settings reset.', 'vigilance'),$themename) . '

'; ?>

" /> $option) { $radio_setting = get_settings($value['id']); if($radio_setting != ''){ if ($key == get_settings($value['id']) ) { $checked = "checked=\"checked\""; } else { $checked = ""; } }else{ if($key == $value['std']){ $checked = "checked=\"checked\""; }else{ $checked = ""; } }?> />
/>

: