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' => '' ), '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' => '' ), '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') ), 'std' => __('right','brunelleschi') ), 'sidebar-width' => array( 'type' => 'select', 'name' => 'sidebar-width', 'label' => __('How Many Columns Should the Sidebar Occupy?','brunelleschi'), 'description' => __('Pick a number between two and four.','brunelleschi'), 'options' => array( __('two','brunelleschi'), __('three','brunelleschi'), __('four','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' ) ), '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' ,'donate' => 'Donate' ); 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', 'site-title' => '', 'site-description' => '', 'left-heading' => '', 'use-header-image' => '', 'use-featured-content' => '', 'header-order' => 'Text on Top', 'hide-navigation' => '', 'center-navigation' => '', 'sidebar' => 'right', 'sidebar-width' => 'three', 'content-width' => '960', 'box-shadow' => '', 'extra-css' => '' ); }else{ $valid_input = get_option('brunelleschi_options'); $valid_input['fonts'] = ('Classic' || 'Modern' || 'Nouveau' === $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['use-featured-content'] = (isset($input['use-featured-content']) ? '1' : ''); $valid_input['header-order'] = ('Text on Top' || 'Text on the Left' || 'Text on the Right' || 'Text on the Bottom' === $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['sidebar'] = ('left' || 'right' || 'none' || 'both' === $input['sidebar'] ? $input['sidebar'] : $valid_input['sidebar']); $valid_input['sidebar-width'] = ('two' || 'three' || 'four' === $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['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.'), $theme_data['Version'], admin_url( 'themes.php?page=brunelleschi_options' ) ); echo '

'; } } /* Temporary Update Migration Code */ /* Necessary for theme_options overhaul */ function brunelleschi_update_migration(){ global $settings_prefix; $defaults = array( 'fonts' => 'Classic', 'site-title' => '', 'site-description' => '', 'left-heading' => '', 'use-header-image' => '', 'use-featured-content' => '', 'header-order' => 'Text on Top', 'hide-navigation' => '', 'sidebar' => 'right', 'sidebar-width' => 'three', 'content-width' => '960', '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');