<?php
/**
 * A unique identifier is defined to store the options in the database and reference them from the theme.
 */
function optionsframework_option_name() {
	// Change this to use your theme slug
	return 'options-framework-theme';
}

/**
 * Defines an array of options that will be used to generate the settings page and be saved in the database.
 * When creating the 'id' fields, make sure to use all lowercase and no spaces.
 *
 * If you are making your theme translatable, you should replace 'newday'
 * with the actual text domain for your theme.  Read more:
 * http://codex.wordpress.org/Function_Reference/load_theme_textdomain
 */

function optionsframework_options() {

	// Test data
	$test_array = array(
		'one' => __( 'One', 'newday' ),
		'two' => __( 'Two', 'newday' ),
		'three' => __( 'Three', 'newday' ),
		'four' => __( 'Four', 'newday' ),
		'five' => __( 'Five', 'newday' )
	);

	// Multicheck Array
	$multicheck_array = array(
		'one' => __( 'French Toast', 'newday' ),
		'two' => __( 'Pancake', 'newday' ),
		'three' => __( 'Omelette', 'newday' ),
		'four' => __( 'Crepe', 'newday' ),
		'five' => __( 'Waffle', 'newday' )
	);

	// Multicheck Defaults
	$multicheck_defaults = array(
		'one' => '1',
		'five' => '1'
	);

	// Background Defaults
	$background_defaults = array(
		'color' => '',
		'image' => '',
		'repeat' => 'repeat',
		'position' => 'top center',
		'attachment'=>'scroll' );

	// Typography Defaults
	$typography_defaults = array(
		'size' => '15px',
		'face' => 'georgia',
		'style' => 'bold',
		'color' => '#bada55' );

	// Typography Options
	$typography_options = array(
		'sizes' => array( '6','12','14','16','20' ),
		'faces' => array( 'Helvetica Neue' => 'Helvetica Neue','Arial' => 'Arial' ),
		'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),
		'color' => false
	);

	// Pull all the categories into an array
	$options_categories = array();
	$options_categories_obj = get_categories();
	foreach ($options_categories_obj as $category) {
		$options_categories[$category->cat_ID] = $category->cat_name;
	}

	// Pull all tags into an array
	$options_tags = array();
	$options_tags_obj = get_tags();
	foreach ( $options_tags_obj as $tag ) {
		$options_tags[$tag->term_id] = $tag->name;
	}


	// Pull all the pages into an array
	$options_pages = array();
	$options_pages_obj = get_pages( 'sort_column=post_parent,menu_order' );
	$options_pages[''] = 'Select a page:';
	foreach ($options_pages_obj as $page) {
		$options_pages[$page->ID] = $page->post_title;
	}

	// If using image radio buttons, define a directory path
	$imagepath =  get_template_directory_uri() . '/images/';

	$options = array();

	$options[] = array(
		'name' => __( 'Basic Settings', 'newday' ),
		'type' => 'heading'
	);
	// Favicon activate option
	$options[] = array(
		'name' 		=> __( 'Activate favicon', 'newday' ),
		'desc' 		=> __( 'Check to activate favicon. Upload fav icon from below option', 'newday' ),
		'id' 			=> 'newday_activate_favicon',
		'std' 		=> '0',
		'type' 		=> 'checkbox'
	);

	// Fav icon upload option
	$options[] = array(
		'name' 	=> __( 'Upload favicon', 'newday' ),
		'desc' 	=> __( 'Upload favicon for your site.', 'newday' ),
		'id' 		=> 'newday_favicon',
		'type' 	=> 'upload'
	);
	
	/*************************************************************************/
	
	$options[] = array(
		'name' => __( 'Design', 'newday' ),
		'type' => 'heading'
	);
	$options[] = array(
		'name' 		=> __( 'Custom CSS', 'newday' ),
		'desc' 		=> __( 'Write your custom css.', 'newday' ),
		'id' 			=> 'newday_custom_css',
		'std' 		=> '',
		'type' 		=> 'textarea'
	);

	return $options;
}