1)); $options = get_option('tanish'); # defaults if( ! isset($options['showauthors']) ) $options['showauthors'] = 1; if( ! isset($options['mainbgimage']) ) $options['mainbgimage'] = 'None'; # end defaults update_option('tanish', $options); # setup admin menu add_action('admin_menu', 'tanish_admin_menu'); if ( function_exists('register_sidebar') ) add_sidebars(); //------------------------------------------------------------------------------- function tanish_admin_menu() { add_theme_page('Tanish Options', 'Tanish Options', 'edit_themes', "Audacity of Tanish", 'tanish_options'); } //------------------------------------------------------------------------------- function tanish_options() { global $options, $mainbgimages; if( $_POST['action'] == 'save' ) save_options(); print "

Keep up with Audacity of Tanish For WordPress

Follow on Ahren Code blog or Twitter, or join the Facebook Page.

General






"; foreach( $mainbgimages as $image ) { $checked = ""; if( $options['mainbgimage'] == $image ) $checked = "checked"; print ""; if( $image == "None" || $image == "Random" ) print $image; else print "$image"; print "  "; } print "


Icons courtesy of:
"; } function save_options() { global $_POST, $options; $options['showauthors'] = ( isset($_POST['showauthors']) ) ? 1 : 0; $options['mainbgimage'] = ( isset($_POST['mainbgimage']) ) ? $_POST['mainbgimage'] : "None"; update_option('tanish', $options); print "

Tanish Settings saved.

"; } //------------------------------------------------------------------------------ function add_sidebars() { register_sidebar(array( 'name' => 'bottombarleft', 'before_widget' => "
", 'before_title' => "

" . " ", 'after_title' => "

", 'after_widget' => "
", )); register_sidebar(array( 'name' => 'bottombarcenter', 'before_widget' => "
", 'before_title' => "

" . " ", 'after_title' => "

", 'after_widget' => "
", )); register_sidebar(array( 'name' => 'bottombarright', 'before_widget' => "
", 'before_title' => "

" . " ", 'after_title' => "

", 'after_widget' => "
", )); } ?>