<?php
/**
 * A unique identifier is defined to store the options in the database and reference them from the theme.
 * By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
 * If the identifier changes, it'll appear as if the options have been reset.
 */
function optionsframework_option_name() {
	// This gets the theme name from the stylesheet
	$themename = wp_get_theme();
	$themename = preg_replace("/\W/", "_", strtolower($themename) );
	$optionsframework_settings = get_option( 'optionsframework' );
	$optionsframework_settings['id'] = $themename;
	update_option( 'optionsframework', $optionsframework_settings );
}
/**
 * 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 'options_framework_theme'
 * with the actual text domain for your theme.  Read more:
 * http://codex.wordpress.org/Function_Reference/load_theme_textdomain
 */
function optionsframework_options() {
	// Test data
	$rss=get_bloginfo('rss2_url');
	$test_array = array(
		'one' => __('One', 'options_framework_theme'),
		'two' => __('Two', 'options_framework_theme'),
		'three' => __('Three', 'options_framework_theme'),
		'four' => __('Four', 'options_framework_theme'),
		'five' => __('Five', 'options_framework_theme')
	);
	$theme_array = array(
		'Default' => __('Default', 'options_framework_theme'),
		'Basic' => __('Basic', 'options_framework_theme'),
		'Dark Blue' => __('Dark Blue', 'options_framework_theme'),
		);
	$menu_array=array(
		'Enable Top Menu'=>__('Enable Top Menu Here', 'options_framework_theme'),
		'Disable Top Menu'=>__('Disable Top Menu Here', 'options_framework_theme'),
		);
	// Multicheck Array
	$multicheck_array = array(
		'one' => __('French Toast', 'options_framework_theme'),
		'two' => __('Pancake', 'options_framework_theme'),
		'three' => __('Omelette', 'options_framework_theme'),
		'four' => __('Crepe', 'options_framework_theme'),
		'five' => __('Waffle', 'options_framework_theme')
	);
	// 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();
	/*****************Theme Option For Custom Theme*****************/
		$options[] = array(
			'name' => __('Color Themes', 'options_framework_theme'),
			'type' => 'heading');
		$options[] = array(
			'name'=>__('Select Default Theme Here','options_framework_theme'),
			'desc' => __('Radio select with default.', 'options_framework_theme'),
			'id' => 'default_theme',
			'std' => 'Default',
			'type' => 'radio',
			'options' => $theme_array);
		$options[] = array(
			'name' =>  __('Background Color', 'options_framework_theme'),
			'desc' => __('Change the background CSS.', 'options_framework_theme'),
			'id' => 'default_bg',
			'std' => $background_defaults,
			'type' => 'background');
	/*****************Theme option for Custom Theme *****************/
	/*****************Theme option for Header *****************/	
		$options[] = array(
			'name' => __('Header & Footer', 'options_framework_theme'),
			'type' => 'heading');
		$options[] = array(
			'name'=>__('Header','options_framework_theme'),
			'id' => 'hhh',
			'type' => '',
			);
		$options[] = array(
			'name' => __('Site Logo', 'options_framework_theme'),
			'desc' => __('This creates a full size uploader that previews the image.', 'options_framework_theme'),
			'id' => 'logo',
			'type' => 'upload');
		$options[] = array(
			'name'=>__('Enable Or Disable Top Menu Here','options_framework_theme'),
			'desc' => __('Check This to Enable  Top Menu.', 'options_framework_theme'),
			'id' => 'top_menu',
			'type' => 'checkbox',
			);
		$options[] = array(
			'name'=>__('Footer','options_framework_theme'),
			'id' => 'fff',
			'type' => '',
			);
		$options[] = array(
			'name' => __('Footer All Right Reserved Text', 'options_framework_theme'),
			'desc' => __('Add Here Your All Right Reserved text', 'options_framework_theme'),
			'id' => 'right_reserved',
			'type' => 'editor');
	/*****************Theme option for Header *****************/
	/*****************Theme option for Front Page Featured Columns *****************/	
		$options[] = array(
			'name' => __('Front Page', 'options_framework_theme'),
			'type' => 'heading');
		$options[] = array(
			'name'=>__('Front Page Featured Column Left','options_framework_theme'),
			'id' => 'fcl',
			'type' => '',
			);
		$options[] = array(
			'name' =>__('Add video or Image','options_framework_theme'),
			'desc' => __('Add Video URL Here.', 'options_framework_theme'),
			'id' => 'video_hidden',
			'type' => 'checkbox');
		$options[] = array(
			'name' => __('Video Input', 'options_framework_theme'),
			'desc' => __('This option is hidden unless activated by a checkbox click.', 'options_framework_theme'),
			'id' => 'show_video_hidden',
			'std' => 'Add Your Video Url here.',
			'class' => 'hidden',
			'type' => 'text');
		$options[] = array(
			'desc' => __('Select Image Here', 'options_framework_theme'),
			'id' => 'image_hidden',
			'type' => 'checkbox');
		$options[] = array(
			'name' => __('Image Input', 'options_framework_theme'),
			'desc' => __('This option is hidden unless activated by a checkbox click.', 'options_framework_theme'),
			'id' => 'show_image_hidden',
			'std' => 'Add Your Image Here.',
			'class' => 'hidden',
			'type' => 'upload');
		$options[] = array(
			'name'=>__('Front Page Featured Column Right','options_framework_theme'),
			'id' => 'fcr',
			'type' => '',
			);
		$options[] = array(
			'name' => __('Front Page Featured Heading', 'options_framework_theme'),
			'desc' => __('A text input field for feature heading.', 'options_framework_theme'),
			'id' => 'featured_heading',
			'type' => 'text');
		$options[] = array(
			'name' => __('Front Page Featured Sub Heading', 'options_framework_theme'),
			'desc' => __('A text input field for feature sub heading.', 'options_framework_theme'),
			'id' => 'featured_sub_heading',
			'type' => 'text');
		$options[] = array(
			'name' => __('Front Page Featured Text', 'options_framework_theme'),
			'desc' => __('A text input field for feature text.', 'options_framework_theme'),
			'id' => 'featured_text',
			'type' => 'textarea');
		$options[] = array(
			'name' =>__('Featured Button','options_framework_theme'),
			'desc' => __('Use a Single Button.', 'options_framework_theme'),
			'id' => 'single_btn',
			'type' =>'checkbox');
		$options[]=array(
			'name'=>__('Single Button Text','options_framework_theme'),
			'desc'=>__('A text input field for single button text'),
			'id'=>'btntxt',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'text'
			);
		$options[]=array(
			'name'=>__('Modal Title','options_framework_theme'),
			'desc'=>__('A text input field for modal title'),
			'id'=>'modal-title',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'text'
			);
		$options[]=array(
			'name'=>__('Modal Content','options_framework_theme'),
			'desc'=>__('A editor field for modal content'),
			'id'=>'modal-content',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'editor'
			);
		$options[] = array(
			'desc' => __("Use Two Button's", 'options_framework_theme'),
			'id' => 'two_btn',
			'type' => 'checkbox');
		$options[]=array(
			'name'=>__('Button-1 Text','options_framework_theme'),
			'desc'=>__('A text input field for button text'),
			'id'=>'btntxt1',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'text'
			);
		$options[]=array(
			'name'=>__('Modal Title','options_framework_theme'),
			'desc'=>__('A text input field for modal title'),
			'id'=>'modal-title1',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'text'
			);
		$options[]=array(
			'name'=>__('Modal Content','options_framework_theme'),
			'desc'=>__('A editor field for modal content'),
			'id'=>'modal-content1',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'editor'
			);
		$options[]=array(
			'name'=>__('Button-2 Text','options_framework_theme'),
			'desc'=>__('A text input field for  button text'),
			'id'=>'btntxt2',
			'std'=>'Default Value',
			'class' => 'hidden',
			'type'=>'text'
			);
		$options[]=array(
			'name'=>__('Button-2 Link','options_framework_theme'),
			'desc'=>__('A text input field for button link'),
			'id'=>'btnlink2',
			'std'=>'#',
			'class' => 'hidden',
			'type'=>'text'
			);
		$wp_editor_settings = array(
			'wpautop' => true, // Default
			'textarea_rows' => 5,
			'tinymce' => array( 'plugins' => 'wordpress' )
		);
		$options[]=array(
			'name'=>__('Front Page Three Box After Featured Row','options_framework_theme'),
			'id' => "boxxxx",
			'type' => ''
			);
		$options[]=array(
			'name'=>__('Box-1','options_framework_theme'),
			'desc' => __('Box-1 - Use Your Own Text in This Box.', 'options_framework_theme'),
			'id' => "box-1",
			'type' => 'checkbox'
			);
		$options[]=array(
			'name' => __('Box-1 Title', 'options_framework_theme'),
			'id' => "b1_title",
			'std' => 'Default Value',
			'type' => 'text',
			'class'=>'hidden'	
			);
		$options[] = array(
			'name' => __('Add Your Front Box Body Content Here', 'options_framework_theme'),
			'id' => 'b1_editor',
			'type' => 'editor',
			'class'=>'hidden',
			'settings' => $wp_editor_settings );
		$options[]=array(
			'desc' => __('Check Here To add default image gallery', 'options_framework_theme'),
			'id' => "d-box-1",
			'std'=>true,
			'type' => 'checkbox'
			);
		$options[]=array(
			'name'=>__('Box-2','options_framework_theme'),
			'desc' => __('Box-2- Use Your Own Text in This Box.', 'options_framework_theme'),
			'id' => "box-2",
			'type' => 'checkbox',
			);
		$options[]=array(
			'name' => __('Box-2 Title', 'options_framework_theme'),
			'id' => "b2_title",
			'std' => 'Default Value',
			'type' => 'text',
			'class'=>'hidden'	
			);
		$options[] = array(
			'name' => __('Add Your Front Box Body Content Here', 'options_framework_theme'),
			'id' => 'b2_editor',
			'type' => 'editor',
			'class'=>'hidden',
			'settings' => $wp_editor_settings );
		$options[]=array(
			'desc' => __('Check Here To add default FAQs Box With Collapse Panel', 'options_framework_theme'),
			'id' => "d-box-2",
			'std'=>true,
			'type' => 'checkbox'
		);
		$options[] = array(
			'name' => __('collapse-1 title', 'options_framework_theme'),
			'desc' => __('A text input field for collapse title.', 'options_framework_theme'),
			'id' => 'collapse_title1',
			'std' => 'Default Value',
			'class'=>'hidden',
			'type' => 'text');
		$options[] = array(
			'name' => __('Collapse-1 Text', 'options_framework_theme'),
			'desc' => __('A textarea input field for collapse contnet.', 'options_framework_theme'),
			'id' => 'example_collapse1',
			'std' => 'Default Value',
			'class'=>'hidden',
			'type' => 'textarea');
		$options[] = array(
			'name' => __('Front Page collapse-2 title ', 'options_framework_theme'),
			'desc' => __('A text input field for collapse title.', 'options_framework_theme'),
			'id' => 'collapse_title2',
			'std' => 'Default Value',
			'class'=>'hidden',
			'type' => 'text');
		$options[] = array(
			'name' => __('Collapse-2 Text', 'options_framework_theme'),
			'desc' => __('A textarea input field for collapse contnet.', 'options_framework_theme'),
			'id' => 'example_collapse2',
			'std' => 'Default Value',
			'class'=>'hidden',
			'type' => 'textarea');
		$options[] = array(
			'name' => __('Front Page collapse-3 title', 'options_framework_theme'),
			'desc' => __('A text input field for collapse title.', 'options_framework_theme'),
			'id' => 'collapse_title3',
			'std' => 'Default Value',
			'class'=>'hidden',
			'type' => 'text');
		$options[] = array(
			'name' => __('Collapse-3 Text', 'options_framework_theme'),
			'desc' => __('A textarea input field for collapse contnet.', 'options_framework_theme'),
			'id' => 'example_collapse3',
			'std' => 'Default Value',
			'class'=>'hidden',
			'type' => 'textarea');
		$options[]=array(
			'name'=>__('Box-3','options_framework_theme'),
			'desc' => __('Box-3- Use Your Own Text in This Box.', 'options_framework_theme'),
			'id' => "box-3",
			'type' => 'checkbox',
			);
		$options[]=array(
			'name' => __('Box-3 Title', 'options_framework_theme'),
			'id' => "b3_title",
			'std' => 'Default Value',
			'type' => 'text',
			'class'=>'hidden'	
			);
		$options[] = array(
			'name' => __('Add Your Front Box Body Content Here', 'options_framework_theme'),
			'id' => 'b3_editor',
			'type' => 'editor',
			'class'=>'hidden',
			'settings' => $wp_editor_settings );
		$options[]=array(
			'desc' => __('Check Here To add default Login Box', 'options_framework_theme'),
			'id' => "d-box-3",
			'std'=>true,
			'type' => 'checkbox'
			);
	/*****************Theme option Front page featured columns*****************/	
	/*****************Theme option for Social Icons*****************/
		$options[] = array(
			'name' => __('Social', 'options_framework_theme'),
			'type' => 'heading' );
		$options[]=array(
			'name'=>__('Enable or Disable the social icons.','options_framework_theme'),
			'desc' => __('Enable Social icons.', 'options_framework_theme'),
			'id' => "enable",
			'type' => 'checkbox'
			);
		$options[]=array(
			'name' => __('RSS', 'options_framework_theme'),
			'desc' => __('Enter your rss url Include http:// at the front of the url.', 'options_framework_theme'),
			'id' => "rss",
			'std' => $rss,
			'type' => 'text',
			'class'=>'hidden'	
			);		
		$options[]=array(
			'name' => __('Flicker', 'options_framework_theme'),
			'desc' => __('Enter your flicker url Include http:// at the front of the url.', 'options_framework_theme'),
			'id' => "flicker",
			'std' => '',
			'type' => 'text',	
			'class'=>'hidden'
			);
		$options[]=array(
			'name' => __('YouTube', 'options_framework_theme'),
			'desc' => __('Enter your youtube url Include http:// at the front of the url.', 'options_framework_theme'),
			'id' => "youtube",
			'std' => '',
			'type' => 'text',
			'class'=>'hidden'	
			);
		$options[]=array(
			'name' => __('Twitter', 'options_framework_theme'),
			'desc' => __('Enter your twitter url Include http:// at the front of the url.', 'options_framework_theme'),
			'id' => "twitter",
			'std' => '',
			'type' => 'text',
			'class'=>'hidden'	
			);
		$options[]=array(
			'name' => __('Facebook', 'options_framework_theme'),
			'desc' => __('Enter your facebook url Include http:// at the front of the url.', 'options_framework_theme'),
			'id' => "fb",
			'std' => '',
			'type' => 'text',
			'class'=>'hidden'	
			);
	/*****************Theme option for Social Icons*****************/	
	/*****************Theme Option For About Page*****************/
		$options[] = array(
			'name' => __('About Page', 'options_framework_theme'),
			'type' => 'heading'
			);

		$options[] = array(
			'name' => __('Create a page and Choose the about template before using these options', 'options_framework_theme'),
			'id'   =>'apg',
			'type' => ''
			);

		$options[]=array(
			'name' => __('Page Title', 'options_framework_theme'),
			'desc'=>__('This is the text field to add title of about page.'),
			'id'=>'about-title',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Page Sub Title', 'options_framework_theme'),
			'desc'=>__('This is the text field to add sub title of about page.'),
			'id'=>'about-sub-title',
			'type'=>'text'
			);


		$options[]=array(
			'name' => __('About Page Carousel Image 1 ', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add carousel image.'),
			'id'=>'ci1',
			'type'=>'upload'
			);

		$options[]=array(
			'name' => __('About Page Carousel Image 2 ', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add carousel image.'),
			'id'=>'ci2',
			'type'=>'upload'
			);

		$options[]=array(
			'name' => __('About Page Carousel Image 3', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add carousel image.'),
			'id'=>'ci3',
			'type'=>'upload'
			);

		$options[]=array(
			'name' => __('About Page Carousel Image 4 ', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add carousel image.'),
			'id'=>'ci4',
			'type'=>'upload'
			);

		$options[]=array(
			'name' => __('About Page Carousel Image 5 ', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add carousel image.'),
			'id'=>'ci5',
			'type'=>'upload'
			);


		$options[]=array(
			'name' => __('Who We Are Tab Text', 'options_framework_theme'),
			'desc'=>__('This is the text area field to add text at about page who we are tab.'),
			'id'=>'wwrt',
			'type'=>'textarea'
			);

		$options[]=array(
			'name' => __('What We Do Tab Image ', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add image at about page what we do tab.'),
			'id'=>'wwdi',
			'type'=>'upload'
			);

		$options[]=array(
			'name' => __('What We Do Tab Text', 'options_framework_theme'),
			'desc'=>__('This is the text area field to add text at about page What We Do Tab.'),
			'id'=>'wwdt',
			'type'=>'textarea'
			);

	/*****************Theme Option For About Page*****************/

	/*****************Theme Option For Contact Page*****************/
		$options[] = array(
			'name' => __('Contact Page', 'options_framework_theme'),
			'type' => 'heading'
			);

		$options[] = array(
			'name' => __('Create a page and Choose the contact template before using these options', 'options_framework_theme'),
			'id'   =>'cpg',
			'type' => ''
			);

		$options[]=array(
			'name' => __('Contact Page Header Image', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add image in header section of contact page.', 'options_framework_theme'),
			'id'=>'cimage',
			'type'=>'upload'
			);

		$options[]=array(
			'name' => __('Address', 'options_framework_theme'),
			'id'=>'add',
			'type'=>''
			);

		$options[]=array(
			'name' => __('Company Name', 'options_framework_theme'),
			'desc'=>__('This is the text field to add company name.'),
			'id'=>'cmp',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Street', 'options_framework_theme'),
			'desc'=>__('This is the text field to add street.'),
			'id'=>'street',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('City', 'options_framework_theme'),
			'desc'=>__('This is the text field to add city.'),
			'id'=>'city',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Contact No.', 'options_framework_theme'),
			'desc'=>__('This is the text field to add contact no.'),
			'id'=>'phno',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Your Name', 'options_framework_theme'),
			'desc'=>__('This is the text field to add name.'),
			'id'=>'name',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Email Id', 'options_framework_theme'),
			'desc'=>__('This is the text field to add email id.'),
			'id'=>'eid',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Working Hours', 'options_framework_theme'),
			'id'=>'wh',
			'type'=>''
			);

		$options[]=array(
			'name' => __('Working Hours For Monday to Friday', 'options_framework_theme'),
			'desc'=>__('This is the text field to add workinghours.'),
			'id'=>'wh1',
			'type'=>'text'
			);

		$options[]=array(
			'name' => __('Working Hours For Saturday', 'options_framework_theme'),
			'desc'=>__('This is the text field to add workinghours.'),
			'id'=>'wh2',
			'type'=>'text'
			);
		
	/*****************Theme Option For Contact Page*****************/
	
	/*****************Theme Option For Service Page*****************/
		$options[] = array(
			'name' => __('Service Page', 'options_framework_theme'),
			'type' => 'heading'
			);

		$options[] = array(
			'name' => __('Create a page and Choose the service template before using these options', 'options_framework_theme'),
			'id'   =>'cpg',
			'type' => ''
			);

		$options[]=array(
			'name' => __('Service Page Header Image', 'options_framework_theme'),
			'desc'=>__('This is the image upload field to add image in header section of service page.', 'options_framework_theme'),
			'id'=>'simage',
			'type'=>'upload'
			);
	/*****************Theme Option For Service Page*****************/
	return $options;
}