"Sidebar Background", "type" => "heading", ), array( "name" => "Sidebar Background Color 1", "id" => $shortname."_topbackground_sidebar", "type" => "color", "std" => STD_TOPBG_SIDEBAR, ), array( "name" => "Sidebar Background Color 2", "id" => $shortname."_bottombackground_sidebar", "type" => "color", "std" => STD_BOTTOMBG_SIDEBAR, ), array( "name" => "Sidebar Top Corner", "id" => $shortname."_topcorner_sidebar", "type" => "input", "std" => STD_TOPCORNER_SIDEBAR, ), array( "name" => "Sidebar Bottom Corner", "id" => $shortname."_bottomcorner_sidebar", "type" => "input", "std" => STD_BOTTOMCORNER_SIDEBAR, ), array( "name" => "", "type" => "close", ), array( "name" => "Sidebar Title", "type" => "heading", ), array( "name" => "Sidebar Title Background 1", "id" => $shortname."_topbackground_title_sidebar", "type" => "color", "std" => STD_TOPBG_TITLE_SIDEBAR, ), array( "name" => "Sidebar Title Background 2", "id" => $shortname."_bottombackground_title_sidebar", "type" => "color", "std" => STD_BOTTOMBG_SIDEBAR, ), array( "name" => "Sidebar Title Color", "id" => $shortname."_sidebar_title_color", "type" => "color", "std" => STD_SIDEBAR_TITLE_COLOR, ), array( "name" => "Sidebar Title Size", "id" => $shortname."_sidebar_title_size", "type" => "input", "std" => STD_SIDEBAR_TITLE_SIZE, ), array( "name" => "", "type" => "close", ), array( "name" => "Sidebar Text", "type" => "heading", ), array( "name" => "Sidebar Text Color", "id" => $shortname."_sidebar_color", "type" => "color", "std" => STD_SIDEBAR_COLOR, ), array( "name" => "Sidebar Link Color", "id" => $shortname."_sidebar_link_color", "type" => "color", "std" => STD_SIDEBAR_LINK_COLOR, ), array( "name" => "Sidebar Text Size", "id" => $shortname."_sidebar_size", "type" => "input", "std" => STD_SIDEBAR_SIZE, ), array( "name" => "", "type" => "close", ), ); function freedesign_sidebar_add_admin() { global $themename, $shortname, $options_sidebar; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options_sidebar as $value_sidebar) { update_option( $value_sidebar['id'], $_REQUEST[ $value_sidebar['id'] ] ); } foreach ($options_sidebar as $value_sidebar) { if( isset( $_REQUEST[ $value_sidebar['id'] ] ) ) { update_option( $value_sidebar['id'], $_REQUEST[ $value_sidebar['id'] ] ); } else { delete_option( $value_sidebar['id'] ); } } header("Location: themes.php?page=functions-sidebar.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options_sidebar as $value_sidebar) { delete_option( $value_sidebar['id'] ); } header("Location: themes.php?page=functions-sidebar.php&reset=true"); die; } } add_theme_page("Sidebar", "Sidebar", 'edit_themes', basename(__FILE__), 'freedesign_sidebar_admin'); } function freedesign_sidebar_admin() { global $themename, $shortname, $options_sidebar; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?> ";?>

Sidebar Setting

'.$value_sidebar['name'].'
'; } if ($value_sidebar['type'] == 'input') { $name = $value_sidebar['id']; $value = get_option($name); if ($value == "") {$value = $value_sidebar['std'];} echo ''; } if ($value_sidebar['type'] == 'color') { $name = $value_sidebar['id']; $value = get_option($name); if ($value == "") {$value = $value_sidebar['std'];} echo ''; } if ($value_sidebar['type'] == 'select') { $name = $value_sidebar['id']; $value = get_option($name); if ($value == "") {$value = $value_sidebar['std'];} echo ''; } if ($value_sidebar['type'] == 'close') { echo '
'.$value_sidebar['name'].' default : '.$value_sidebar['std'].'
'.$value_sidebar['name'].''; ?>
default : '.$value_sidebar['std'].'
'.$value_sidebar['name'].' default : '.$value_sidebar['std'].'
'.$value_sidebar['name']; } } ?>