array( 'type' => 'start' ), 'icon' => array( 'type' => 'icon' ), 'title' => array( 'type' => 'title', 'value' => __('Brunelleschi Theme Settings','brunelleschi') ), 'form-start' => array( 'type' => 'form-start' ), 'section-start' => array( 'type' => 'section-start', 'heading' => __('Display Settings','brunelleschi') ), 'fonts' => array( 'type' => 'select', 'name' => 'fonts', 'label' => __('Use Alternative Fonts?','brunelleschi'), 'description' => __('Choose a Font Set','brunelleschi'), 'options' => array( __('Classic','brunelleschi'), __('Modern','brunelleschi'), __('Nouveau','brunelleschi') ), 'std' => __('Classic','brunelleschi') ), 'site-title' => array( 'type' => 'checkbox', 'name' => 'site-title', 'label' => __('Hide Site Title?','brunelleschi'), 'description' => __('Check to hide the Site Title.','brunelleschi'), 'std' => '' ), 'site-description' => array( 'type' => 'checkbox', 'name' => 'site-description', 'label' => __('Hide Site Description?','brunelleschi'), 'description' => __('Check to hide the Site Description.','brunelleschi'), 'std' => '' ), 'left-heading' => array( 'type' => 'checkbox', 'name' => 'left-heading', 'label' => __('Use Left Aligned Header Text?','brunelleschi'), 'description' => __('Check to left align header text.','brunelleschi'), 'std' => '' ), 'use-header-image' => array( 'type' => 'checkbox', 'name' => 'use-header-image', 'label' => __('Enable Header Image?','brunelleschi'), 'description' => __('Check to include a Header Image.','brunelleschi'), 'std' => '' ), 'remove-header-image-border' => array( 'type' => 'checkbox', 'name' => 'remove-header-image-border', 'label' => __('Remove Header Image Border?','brunelleschi'), 'description' => __('Check to Remove Header Image Border.','brunelleschi'), 'std' => '' ), 'use-featured-content' => array( 'type' => 'checkbox', 'name' => 'use-featured-content', 'label' => __('Use a Featured Content Slider?','brunelleschi'), 'description' => __('Featured content slider overrides the header image','brunelleschi'), 'std' => '' ), 'header-order' => array( 'type' => 'select', 'name' => 'header-order', 'label' => __('Header Text or Banner Image on Top?','brunelleschi'), 'description' => __('Choose the order you want the header to display.','brunelleschi'), 'options' => array( __('Text on Top','brunelleschi'), __('Text on the Left','brunelleschi'), __('Text on the Right','brunelleschi'), __('Text on the Bottom','brunelleschi') ), 'std' => __('Text on Top','brunelleschi') ), 'hide-navigation' => array( 'type' => 'checkbox', 'name' => 'hide-navigation', 'label' => __('Hide Navigation?','brunelleschi'), 'description' => __('Check to add a hide the primary navigation','brunelleschi'), 'std' => '' ), 'center-navigation' => array( 'type' => 'checkbox', 'name' => 'center-navigation', 'label' => __('Center Navigation?','brunelleschi'), 'description' => __('Check to center the primary navigation','brunelleschi'), 'std' => '' ), 'navigation-position' => array( 'type' => 'select', 'name' => 'navigation-position', 'label' => __('Pick Navigation Position.','brunelleschi'), 'description' => __('Navigation above the banner, below, or within the body column?','brunelleschi'), 'options' => array( __('Nav Above Banner','brunelleschi'), __('Nav Below Banner','brunelleschi') ), 'std' => __('Nav Below Banner','brunelleschi') ), 'sidebar' => array( 'type' => 'select', 'name' => 'sidebar', 'label' => __('Left, Right, None, or Both Sidebars?','brunelleschi'), 'description' => __('Pick which side you want the sidebar on. Choose none for no sidebar.','brunelleschi'), 'options' => array( __('left','brunelleschi'), __('right','brunelleschi'), __('none','brunelleschi'), __('both','brunelleschi'), __('two left', 'brunelleschi'), __('two right', 'brunelleschi') ), 'std' => __('right','brunelleschi') ), 'sidebar-width' => array( 'type' => 'select', 'name' => 'sidebar-width', 'label' => __('Sidebar Width?','brunelleschi'), 'description' => __('Pick a number between two and four.','brunelleschi'), 'options' => array( __('two','brunelleschi'), __('three','brunelleschi'), __('tour','brunelleschi') ), 'std' => __('three','brunelleschi') ), 'content-width' => array( 'type' => 'select', 'name' => 'content-width', 'label' => __('Content Width:','brunelleschi'), 'description' => __('Choose the overall Content Width in pixels.','brunelleschi'), 'std' => '960', 'options' => array( '800', '960', '1024', '1140' ) ), 'posted-on' => array( 'type' => 'select', 'name' => 'posted-on', 'label' => __('Posted On Position:','brunelleschi'), 'description' => __('This is the part that says by AUTHOR posted on DATE.','brunelleschi'), 'options' => array( __('Above Post','brunelleschi'), __('Below Post','brunelleschi'), __('Hidden','brunelleschi') ), 'std' => 'Above Post' ), 'archives-format' => array( 'type' => 'checkbox', 'name' => 'archives-format', 'label' => __('Show Full Post in Archives and Tags?','brunelleschi'), 'description' => __('Check to show full post, uncheck for excerpt.','brunelleschi'), 'std' => '', ), 'box-shadow' => array( 'type' => 'checkbox', 'name' => 'box-shadow', 'label' => __('Use box shadow?','brunelleschi'), 'description' => __('Check to add a groovy box shadow (new browsers only)','brunelleschi'), 'std' => '' ), 'extra-css' => array( 'type' => 'textarea', 'name' => 'extra-css', 'label' => __('Custom CSS:','brunelleschi'), 'description' => __('Caution! CSS is very powerful!','brunelleschi'), 'std' => '' ), 'section-end' => array( 'type' => 'section-end' ), 'form-end' => array( 'type' => 'form-end' ), 'end' => array( 'type' => 'end' ) ); }elseif($tab == 'donate'){ $brunelleschi_options_fields = array( 'start' => array( 'type' => 'start' ), 'icon' => array( 'type' => 'icon' ), 'title' => array( 'type' => 'title', 'value' => __('Donate','brunelleschi') ), 'donate' => array( 'type' => 'donate', 'name' => 'donate' ), 'end' => array( 'type' => 'end' ) ); } return $brunelleschi_options_fields; } /* Setting Page Tabs */ function brunelleschi_get_settings_page_tabs(){ $tabs = array( 'general' => __('General','brunelleschi') ,'donate' => __('Donate','brunelleschi') ); return $tabs; } /* Brunelleschi page Tabs */ function brunelleschi_page_tabs( $current = 'general' ) { if ( isset ( $_GET['tab'] ) ) : $current = $_GET['tab']; else: $current = 'general'; endif; $tabs = brunelleschi_get_settings_page_tabs(); $links = array(); foreach( $tabs as $tab => $name ) : if ( $tab == $current ) : $links[] = ''.$name.''; else : $links[] = ''.$name.''; endif; endforeach; echo '

'; echo ''; } /* Render Options Page */ function brunelleschi_options_render() { global $settings_prefix; if(isset($_GET['tab'])){ $brunelleschi_options_fields = brunelleschi_options_fields($_GET['tab']); }else{ $brunelleschi_options_fields = brunelleschi_options_fields('general'); } foreach ( $brunelleschi_options_fields as $key => $field ) { if(isset($field['name'])){ $slug = $settings_prefix.'['.$field['name'].']'; } $options = get_option($settings_prefix); switch( $field['type'] ) { case 'start':?>
' . __( 'Settings saved.', 'brunelleschi') . '
'; ?>


/>

Brunelleschi is 100% free. Don't feel obligated or required in any way to pay me for this theme. That said, if you like the theme and want to buy me a Coffee, that's great! I put a lot of time into Brunelleschi and I hope you enjoy it!

__('Classic','brunelleschi'), 'site-title' => '', 'site-description' => '', 'left-heading' => '', 'use-header-image' => '1', 'remove-header-image-border' => '', 'use-featured-content' => '', 'header-order' => __('Text on Top','brunelleschi'), 'hide-navigation' => '', 'center-navigation' => '', 'navigation-position' => __('Nav Below Banner','brunelleschi'), 'sidebar' => 'right', 'sidebar-width' => __('three','brunelleschi'), 'content-width' => '960', 'posted-on' => __('Above Post','brunelleschi'), 'archives-format' => '', 'box-shadow' => '', 'extra-css' => '' ); }else{ $valid_input = get_option('brunelleschi_options'); $valid_input['fonts'] = (__('Classic','brunelleschi') || __('Modern','brunelleschi') || __('Nouveau','brunelleschi') === $input['fonts'] ? $input['fonts'] : $valid_input['fonts']); $valid_input['site-title'] = (isset($input['site-title']) ? '1' : ''); $valid_input['site-description'] = (isset($input['site-description']) ? '1' : ''); $valid_input['left-heading'] = (isset($input['left-heading']) ? '1' : ''); $valid_input['use-header-image'] = (isset($input['use-header-image']) ? '1' : ''); $valid_input['remove-header-image-border'] = (isset($input['remove-header-image-border']) ? '1' : ''); $valid_input['use-featured-content'] = (isset($input['use-featured-content']) ? '1' : ''); $valid_input['header-order'] = (__('Text on Top','brunelleschi') || __('Text on the Left','brunelleschi') || __('Text on the Right','brunelleschi') || __('Text on the Bottom','brunelleschi') === $input['header-order'] ? $input['header-order'] : $valid_input['header-order']); $valid_input['hide-navigation'] = (isset($input['hide-navigation']) ? '1' : ''); $valid_input['center-navigation'] = (isset($input['center-navigation']) ? '1' : ''); $valid_input['navigation-position'] = (__('Nav Above Banner','brunelleschi') || __('Nav Below Banner','brunelleschi') === $input['navigation-position'] ? $input['navigation-position'] : $valid_input['navigation-position']); $valid_input['sidebar'] = (__('left','brunelleschi') || __('right','brunelleschi') || __('none','brunelleschi') || __('both','brunelleschi') || __('two left','brunelleschi') || __('two right','brunelleschi') === $input['sidebar'] ? $input['sidebar'] : $valid_input['sidebar']); $valid_input['sidebar-width'] = (__('two','brunelleschi') || __('three','brunelleschi') || __('four','brunelleschi') === $input['sidebar-width'] ? $input['sidebar-width'] : $valid_input['sidebar-width']); $valid_input['content-width'] = ('800' || '960' || '1024' || '1140' === $input['content-width'] ? $input['content-width'] : $valid_input['content-width']); $valid_input['posted-on'] = (__('Above Post','brunelleschi') || __('Below Post','brunelleschi') || __('Hidden','brunelleschi') === $input['posted-on'] ? $input['posted-on'] : $valid_input['posted-on']); $valid_input['archives-format'] = (isset($input['archives-format']) ? '1' : ''); $valid_input['box-shadow'] = (isset($input['box-shadow']) ? '1' : ''); $valid_input['extra-css'] = addslashes($input['extra-css']); } return $valid_input; } /* Sucessful Update Message */ function brunelleschi_update_message(){ if( isset($_GET['activated']) ){ echo '

'; $theme_data = $theme_data = get_theme_data( trailingslashit( TEMPLATEPATH ) . 'style.css' ); printf( __('Thank you for using Brunelleschi version %s. Edit your theme options here. Learn what\'s new in version %s.'), $theme_data['Version'], admin_url( 'themes.php?page=brunelleschi_options' ), $theme_data['Version']); echo '

'; } } /* Temporary Update Migration Code */ /* Necessary for theme_options overhaul */ function brunelleschi_update_migration(){ global $settings_prefix; $defaults = array( 'fonts' => __('Classic','brunelleschi'), 'site-title' => '', 'site-description' => '', 'left-heading' => '', 'use-header-image' => '1', 'remove-header-image-border' => '', 'use-featured-content' => '', 'header-order' => __('Text on Top','brunelleschi'), 'hide-navigation' => '', 'center-navigation' => '', 'navigation-position' => __('Nav Below Banner','brunelleschi'), 'sidebar' => 'right', 'sidebar-width' => __('three','brunelleschi'), 'content-width' => '960', 'posted-on' => __('Above Post','brunelleschi'), 'archives-format' => '', 'box-shadow' => '', 'extra-css' => '' ); if(!get_option('brunelleschi_options')){ add_option( 'brunelleschi_options', $defaults ); } $new_options = get_option('brunelleschi_options'); foreach($defaults as $option => $val){ if( get_option('brunelleschi_settings_'.$option) ){ $temp = get_option('brunelleschi_settings_'.$option); if($temp === 'checked'){ $temp = '1'; } delete_option('brunelleschi_settings_'.$option); $new_options[$option] = $temp; } } update_option('brunelleschi_options',$new_options); add_action('validate_current_theme','brunelleschi_update_message'); } add_action('after_setup_theme','brunelleschi_update_migration');