__('Layout Settings'), "id" => $shortname."_layout_settings", "options" => array(__('blue'), __('brown'), __('cyan'), __('gold'), __('green'), __('sandy')), "std" => __('blue'), "type" => "layoutradio" ), array( "name" => __('Avatar Settings'), "id" => $shortname."_avatar_settings", "options" => array(__('use 1sr avatars as default'), __('use wordpress avatars as default')), "std" => __('use 1sr avatars as default'), "type" => "radio" ), ); 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; } else if ( 'reset_widgets' == $_REQUEST['action'] ) { $null = null; update_option('sidebars_widgets',$null); 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 '

'.$themename.' '.__('Settings saved.').'

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

'.$themename.' '.__('Settings reset.').'

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

'.$themename.' '.__('widgets reset.').'

'; ?>

Options

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

| 1sr First Theme by 1sr |"; /* $themeLink = "| 1sr First Theme 1sr |"; */ return $themeLink; } /** * returns logo link * */ function _1sr_get_logo_link(){ global $shortname, $options; $autorMap = array( 'blue' => 'Simon Schwarze / pixelio.de', 'brown' => 'knipseline / pixelio.de', 'cyan' => 'Dietmar Meinert / pixelio.de', 'green' => 'my / pixelio.de', 'gold' => 'Huber / pixelio.de', 'sandy' => 'Bernd Elsner / pixelio.de', ); /* $autorMap = array( 'blue' => 'Simon Schwarze / pixelio', 'brown' => 'knipseline / pixelio', 'cyan' => 'Dietmar Meinert / pixelio', 'green' => 'my / pixelio', 'gold' => 'Huber / pixelio', 'sandy' => 'Bernd Elsner / pixelio', ); */ $logoLink = "Logo by "; foreach ($options as $value) { if($value['id'] == $shortname."_layout_settings") { $logoLink .= $autorMap[$value['options'][get_option( $value['id'])]]; } } return $logoLink; } /** * print the existing comments * */ function print_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • >

    comment_approved == '0') : ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>
     
    'Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ' ) */ ); } ?>