"Contact Info",
"type" => "subhead"),
array( "name" => "Your contact info",
"id" => $themeName."_contactInfo",
"desc" => "Phone or email.",
"def" => "phone# | email@site.com",
"type" => "text"),
array( "name" => "Theme Custom Color Options",
"type" => "subhead"),
array( "name" => "Custom colors",
"desc" => "Your theme can use the colors you choose below. Use Hex values without leading '#' symbol. Try out Color Jack, to create a color scheme (be careful when you copy and paste NOT to insert a space character before the six digit hex value.)",
"id" => $themeName."_customOptions",
"def" => "off",
"type" => "select",
"options" => array("off","on")),
// bkg and light text in footer, search text input color
array( "name" => "Background color",
"id" => $themeName."_bkgColor",
"desc" => "Your background, text in footer and search text input colors.",
"def" => "a7a7a7",
"type" => "text"),
// mouse over & rule below header
array( "name" => "Mouse over",
"id" => $themeName."_hoverColor",
"desc" => "Your mouse over color for links, buttons & rule below header colors.",
"def" => "e81e25",
"type" => "text"),
// sidebar one top, rule above footer
array( "name" => "Sidebar #1 (top)",
"id" => $themeName."_sidebarOneTop",
"desc" => "Your colors for sidebar #1 (top) and headings.",
"def" => "0082be",
"type" => "text"),
// sidebar one lower
array( "name" => "Sidebar #1 (lower)",
"id" => $themeName."_sidebarOneLower",
"desc" => "Your colors for sidebar #1 (lower) and rule above footer.",
"def" => "39af4c",
"type" => "text"),
// sidebar two, search button
array( "name" => "Sidebar #2",
"id" => $themeName."_sidebarTwo",
"desc" => "Your colors for sidebar two, search button.",
"def" => "f39a2b",
"type" => "text"),
array( "name" => "Footer",
"type" => "subhead"),
// custom field for footer scripts
array( "name" => "Tracking code",
"id" => $themeName."_trackingCode",
"desc" => "If you use Google Analytics or need any other tracking script in your footer just copy and paste it here.
The script will be inserted before the closing </body> tag.",
"def" => get_option('Adept_trackingCode'),
"type" => "textarea",
"options" => array("rows" => "5",
"cols" => "40") ),
);
function customize_add_admin() {
global $themeName, $options;
if ( $_GET['page'] == "customize.php" ) { // 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=customize.php&saved=true");
die;
} else if( 'reset' == $_REQUEST['action'] ) {
foreach ($options as $value) {
delete_option( $value['id'] ); }
header("Location: themes.php?page=customize.php&reset=true");
die;
}
}
add_theme_page("Adept Options", "Adept Options", 'edit_themes', basename(__FILE__), 'customize_admin');
}
function customize_admin() {
global $themeName, $options;
if ( $_REQUEST['saved'] ) echo '
On this page you create custom colors, add your contact info, and analytics tracking code.
See http://overhaulindustries.com for more themes