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' => 'checkbox', 'name' => 'fonts', 'label' => __('Use Alternative Fonts?','brunelleschi'), 'description' => __('Check to use alternative fonts.','brunelleschi'), 'std' => '' ), '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' => '' ), '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' => '' ), array( 'type' => 'section-end' ), array( 'type' => 'form-end' ), array( 'type' => 'end' ) ); /* Render Options Page */ function brunelleschi_options_render() { global $brunelleschi_options_fields,$settings_prefix; 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':?>
'; $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' => '', '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');