<?php 
/**
 * Titan customizer
**/ 
?>
<?php 
function titan_customize( $wp_customize ) {
	//  = Titan: Sections =
	
	$wp_customize->get_section('title_tagline')->title = 'Site Title, Tagline & Footer copyright text' ;
	$wp_customize->get_section('title_tagline')->priority = '1';

	$wp_customize->get_section('header_image')->title = 'Logo, Favicon, Apple touch icon' ;
	$wp_customize->get_section('header_image')->priority = '2';	
	
	$wp_customize->get_section('colors')->title = 'Colors' ;
	$wp_customize->get_section('colors')->priority = '3';

	$wp_customize->add_section('t1t_design' , array(
			'title' => 'Design',
			'priority' => '4'
	));
	
	$wp_customize->add_section('t1t_typography' , array(
			'title' => 'Typography',
			'priority' => '5'
	));

	$wp_customize->add_section('t1t_header_posts_options' , array(
			'title' => 'Header Posts',
			'priority' => '6'
	));

	$wp_customize->add_section('t1t_post_page_options' , array(
			'title' => 'Post page option',
			'priority' => '7'
	));
	
	$wp_customize->add_section('t1t_category_page_options' , array(
			'title' => 'Category and TV options',
			'priority' => '8'
	));

	$wp_customize->add_section('t1t_translate' , array(
			'title' => 'Translate',
			'priority' => '9'
	));
	
	$wp_customize->add_section('t1t_social' , array(
			'title' => 'Social settings',
			'priority' => '10'
	));
	
	$wp_customize->add_section('t1t_ads_options' , array(
			'title' => 'Tracking',
			'priority' => '11'
	));

	
	//  = Titan: Colors =
	
	$colors = array();

	$colors[] = array(
			'slug'=>'t1t_menu_background',
			'default' => '#FFFFFF',
			'label' => 'Menu background color', 
			'section' => 'colors',
			'priority' => '2'
	);

	$colors[] = array(
			'slug'=>'t1t_menu_color',
			'default' => '#000000',
			'label' => 'Menu font color', 
			'section' => 'colors',
			'priority' => '3'
	);
	
	$colors[] = array(
			'slug'=>'t1t_menu_hover_color',
			'default' => '#ff6e00',
			'label' => 'Menu hover color', 
			'section' => 'colors',
			'priority' => '3'
	);

	$colors[] = array(
			'slug'=>'t1t_main_color',
			'default' => '#ff6e00',
			'label' => 'Main color', 
			'section' => 'colors',
			'priority' => '5'
	);
	
		$colors[] = array(
			'slug'=>'t1t_menu_border_color',
			'default' => '#ebebeb',
			'label' => 'Menu border color', 
			'section' => 'colors',
			'priority' => '2'
	);

	foreach( $colors as $color ) {
		$wp_customize->add_setting(
				$color['slug'], array(
						'default' => $color['default'],
						'type' => 'option',
						'capability' =>'edit_theme_options',
						'sanitize_callback' => 'sanitize_hex_color'
				)
		);

		$wp_customize->add_control(
				new WP_Customize_Color_Control(
						$wp_customize,
						$color['slug'],
						array('label' => $color['label'],
								'section' => $color['section'],
								'settings' => $color['slug'],
								'priority' => $color['priority'])
				)
		);
	}
	


		//  = Titan: Images =

		
		$t1timages = array();
		$bloginfo = get_template_directory_uri();

		
		$t1timages[] = array(
				'slug'=>'t1t_apple_touch_icon',
				'default' => $bloginfo.'/images/apple-touch-icon.png',
				'label' => 'Apple touch icon: 129x129 px PNG/JPG image.',
				'priority' => '30'
		);
		
		$t1timages[] = array(
				'slug'=>'t1t_favicon',
				'default' => $bloginfo.'/images/favicon.png',
				'label' => 'Favicon: 16x16 px PNG/GIF image.',
				'priority' => '20'
		);
		
		$t1timages[] = array(
				'slug'=>'t1t_menu_logo',
				'default' => $bloginfo.'/images/menu-logo.png',
				'label' => 'Flying menu logo 100x36px PNG/GIF/JPG image.',
				'priority' => '20'
		);
		
		$t1timages[] = array(
				'slug'=>'t1t_facebook_default',
				'default' => $bloginfo.'/images/titan-home-facebook.jpg',
				'label' => 'Facebook Homepage image',
				'priority' => '30'
		);
		
		foreach( $t1timages as $t1timage ) {		
		
		
		$wp_customize->add_setting($t1timage['slug'], array(
				'capability'        => 'edit_theme_options',
				'type'           => 'option',
				'default' => $t1timage['default'],
				'sanitize_callback' => 't1t_sanitize'
		));
		
		$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, $t1timage['slug'], array(
				'label'    => $t1timage['label'],
				'section'  => 'header_image',
				'settings' => $t1timage['slug'],
				'priority' => $t1timage['priority']
		)));
	
	
	
		}
	
	
		//  = Titan: Text =
		
		
		$t1ttext = array();
	
		$t1ttext[] = array(
				'slug'=>'t1t_facebook',
				'default' => '',
				'label' => 'Facebook:', 
				'section' => 't1t_social',
				'priority' => '1'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_twitter',
				'default' => '',
				'label' => 'Twitter:', 
				'section' => 't1t_social',
				'priority' => '2'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_pinterest',
				'default' => '',
				'label' => 'Pinterest:', 
				'section' => 't1t_social',
				'priority' => '3'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_google',
				'default' => '',
				'label' => 'Google:', 
				'section' => 't1t_social',
				'priority' => '4'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_youtube',
				'default' => '',
				'label' => 'Youtube:', 
				'section' => 't1t_social',
				'priority' => '5'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_instagram',
				'default' => '',
				'label' => 'Instagram:', 
				'section' => 't1t_social',
				'priority' => '6'
		);

		$t1ttext[] = array(
				'slug'=>'t1t_word_before_author',
				'default' => 'by',
				'label' => 'Word before author(eg. by, from, posted by)', 
				'section' => 't1t_translate',
				'priority' => '1'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_word_before_category',
				'default' => 'Latest in:',
				'label' => 'Category page:Word before Category title', 
				'section' => 't1t_translate',
				'priority' => '1'
		);
			
		
		$t1ttext[] = array(
				'slug'=>'t1t_search_translate',
				'default' => 'Search',
				'label' => 'Search', 
				'section' => 't1t_translate',
				'priority' => '3'
		);

		$t1ttext[] = array(
				'slug'=>'t1t_mob_menu_translate',
				'default' => 'MENU',
				'label' => 'mobile version word on menu', 
				'section' => 't1t_translate',
				'priority' => '3'
		);
			
		$t1ttext[] = array(
				'slug'=>'t1t_post_tags_title',
				'default' => 'Tags',
				'label' => 'Post page: Tags title', 
				'section' => 't1t_translate',
				'priority' => '4'
		);

		$t1ttext[] = array(
				'slug'=>'t1t_post_category_title',
				'default' => 'Categories',
				'label' => 'Post page: Categories title', 
				'section' => 't1t_translate',
				'priority' => '4'
		);

		$t1ttext[] = array(
				'slug'=>'t1t_share_this_article',
				'default' => 'SHARE THIS ARTICLE',
				'label' => 'Post page: share', 
				'section' => 't1t_translate',
				'priority' => '4'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_share_this_video',
				'default' => 'SHARE THIS VIDEO',
				'label' => 'TV page: share', 
				'section' => 't1t_translate',
				'priority' => '4'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_share_this_gallery',
				'default' => 'SHARE THIS GALLERY',
				'label' => 'Gallery page: share', 
				'section' => 't1t_translate',
				'priority' => '4'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_older_article',
				'default' => 'OLDER ARTICLE',
				'label' => 'Post page: Older article', 
				'section' => 't1t_translate',
				'priority' => '5'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_next_article',
				'default' => 'NEXT ARTICLE',
				'label' => 'Post page: next article', 
				'section' => 't1t_translate',
				'priority' => '6'
		);
		
		
		$t1ttext[] = array(
				'slug'=>'t1t_related_by',
				'default' => 'RELATED BY',
				'label' => 'Post page: related widget title', 
				'section' => 't1t_translate',
				'priority' => '7'
		);

		$t1ttext[] = array(
				'slug'=>'t1t_category_popular_title',
				'default' => 'Popular Posts',
				'label' => 'Category page: Popular posts widget title', 
				'section' => 't1t_translate',
				'priority' => '7'
		);
	
		$t1ttext[] = array(
				'slug'=>'t1t_tv_carousel_title',
				'default' => 'BROWSE MORE VIDEOS',
				'label' => 'Tv title', 
				'section' => 't1t_translate',
				'priority' => '10'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_gallery_carousel_title',
				'default' => 'BROWSE MORE GALLERIES',
				'label' => 'Gallery title', 
				'section' => 't1t_translate',
				'priority' => '10'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_review_page_title',
				'default' => 'Reviews',
				'label' => 'Reviews title', 
				'section' => 't1t_translate',
				'priority' => '10'
		);
		
			
		$t1ttext[] = array(
				'slug'=>'t1t_comments_post_comment',
				'default' => 'Post comment',
				'label' => 'Comments: Post comment', 
				'section' => 't1t_translate',
				'priority' => '12'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_post_reply',
				'default' => 'Leave a Reply',
				'label' => 'Comments: Leave a Reply', 
				'section' => 't1t_translate',
				'priority' => '13'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_post_reply_to',
				'default' => 'Leave a Reply to',
				'label' => 'Comments: Leave a Reply to', 
				'section' => 't1t_translate',
				'priority' => '14'
		);
		
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_cancel_reply',
				'default' => 'Cancel reply',
				'label' => 'Comments: Cancel reply', 
				'section' => 't1t_translate',
				'priority' => '15'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_logged_in_as',
				'default' => 'Logged in as',
				'label' => 'Comments: Logged in as', 
				'section' => 't1t_translate',
				'priority' => '15'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_logged_in_as_log_out',
				'default' => 'Log out',
				'label' => 'Comments: Log out', 
				'section' => 't1t_translate',
				'priority' => '15'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_name',
				'default' => 'Name',
				'label' => 'Comments: Name', 
				'section' => 't1t_translate',
				'priority' => '16'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_email',
				'default' => 'Email',
				'label' => 'Comments: Email', 
				'section' => 't1t_translate',
				'priority' => '17'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_website',
				'default' => 'Website',
				'label' => 'Comments: Website', 
				'section' => 't1t_translate',
				'priority' => '18'
		);
				
		$t1ttext[] = array(
				'slug'=>'t1t_comments_no_comment',
				'default' => 'No Comment',
				'label' => 'Comments: No Comment', 
				'section' => 't1t_translate',
				'priority' => '19'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_one_comment',
				'default' => 'One Comment',
				'label' => 'Comments: One Comment', 
				'section' => 't1t_translate',
				'priority' => '20'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_comments_number_comments',
				'default' => 'Comments on this post.',
				'label' => 'Comments: Number of comments on this post.(the line after the number)', 
				'section' => 't1t_translate',
				'priority' => '21'
		);
		
		$t1ttext[] = array(
				'slug'=>'t1t_category_number',
				'default' => '9',
				'label' => 'Number of posts to show', 
				'section' => 't1t_category_page_options',
				'priority' => '100'
		);	
		
		$t1ttext[] = array(
				'slug'=>'t1t_copyright',
				'default' => 'Copyright 2015 Titan Theme. Stepfox Development Studios',
				'label' => 'Footer copyright text', 
				'section' => 'title_tagline',
				'priority' => '10'
		);
	
		foreach( $t1ttext as $t1t_text ) {
			
			
			$wp_customize->add_setting($t1t_text['slug'], array(
					'default'        => $t1t_text['default'],
					'capability'     => 'edit_theme_options',
					'type'           => 'option',
					'sanitize_callback' => 't1t_sanitize'
			
			));
			
			$wp_customize->add_control($t1t_text['slug'], array(
					'label'      => $t1t_text['label'],
					'section'    => $t1t_text['section'],
					'settings'   => $t1t_text['slug'],
					'priority'   => $t1t_text['priority'],
			));
					
		}
		
		
		
		
		
		
		
		//  = Titan: Dropdown =
		
		$t1t_tags = array();
		
		$t1t_tags_obj = get_tags('hide_empty=0');
		
		foreach ($t1t_tags_obj as $t1t_tag) {
		
			$t1t_tags[$t1t_tag->slug] = $t1t_tag->slug;}
		
			$tags_tmp = array_unshift($t1t_tags, 'Select a tag:');
			
			
			
			$fonts_list = array(
				'Asap' => 'Asap',
				'Asul' => 'Asul',		
				'Bitter' => 'Bitter',
				'Caudex' => 'Caudex',
				'Droid Sans' => 'Droid Sans',
				'Droid Serif' => 'Droid Serif',
				'Electrolize' => 'Electrolize',
				'Hanuman' => 'Hanuman',
				'Jura' => 'Jura',
				'Kameron' => 'Kameron',
				'Kotta One' => 'Kotta One',
				'Lato' => 'Lato',
				'Lora' => 'Lora',
				'Magra' => 'Magra',
				'Maven Pro' => 'Maven Pro',
				'Metrophobic' => 'Metrophobic',
				'Molengo' => 'Molengo',
				'Open Sans' => 'Open Sans',
				'PT Sans' => 'PT Sans',
				'PT Serif' => 'PT Serif',
				'Play' => 'Play',
				'Podkova' => 'Podkova',
				'Pontano Sans' => 'Pontano Sans',
				'Quattrocento Sans' => 'Quattrocento Sans',
				'Raleway' => 'Raleway',
				'Rosario' => 'Rosario',
				'Shanti' => 'Shanti',
				'Share' => 'Share',
				'Signika' => 'Signika',
				'Telex' => 'Telex',
				'Tinos' => 'Tinos',
				'Ubuntu' => 'Ubuntu',
				'Vidaloka' => 'Vidaloka',
				'Viga' => 'Viga'				
			);
					
			$t1t_dropdowns = array();
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_title_picker',
					'default' => 'style_title1',
					'label' => 'Widget title style', 
					'section' => 't1t_design',
					'choices'    => array(
							'style_title1' => 'Style 1',
							'style_title2' => 'Style 2',
							'style_title3' => 'Style 3',
							'style_title4' => 'Style 4',
							'style_title5' => 'Style 5',
							'style_title6' => 'Style 6',
							'style_title7' => 'Style 7',
							'style_title8' => 'Style 8',
						
					));		
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_header_posts_tags',
					'default' => 'Select a tag:',
					'label' => 'Header small posts tag:', 
					'section' => 't1t_header_posts_options',
					'choices' => $t1t_tags,
			);
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_site_width',
					'default' => '80%',
					'label' => 'Body width:(if you play with this option dont forget to reupload or regenerate your images so the new sizes can take full effect!!!important!!!!!) ', 
					'section' => 't1t_design',
					'choices'    => array(
							'1350' => '1350px',
							'1560' => '1560px',
							'1903' => '1903px',
				
					));	
							
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_slider_picker',
					'default' => 'slider_fx2',
					'label' => 'Slider transition', 
					'section' => 't1t_design',
					'choices'    => array(
							'slider_fx1' => 'Slide',
							'slider_fx2' => 'Fade',
							'slider_fx3' => 'Pop',
							'slider_fx4' => 'Move up',
							'slider_fx5' => 'Drop in',
							'slider_fx6' => 'Rise from bottom',
							'slider_fx7' => 'Clapper',
							'slider_fx8' => 'Zoom',
							'slider_fx9' => 'Black and white',							
					));
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_image_effect',
					'default' => 'image_fx1',
					'label' => 'Image Effect:', 
					'section' => 't1t_design',
					'choices'    => array(
							'' => 'None',
							'image_fx1' => 'Fast Shine',
							'image_fx2' => 'Zoom in',
							'image_fx3' => 'Border Line',
							'image_fx4' => 'Black and white',
							'image_fx5' => 'Opacity',					
					));
							
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_search_color',
					'default' => '',
					'label' => 'Search Icon Color', 
					'section' => 'colors',
					'choices'    => array(
							'-black' => 'Black',
							'' => 'White',
		
					));
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_social_color',
					'default' => '',
					'label' => 'Social icons header color', 
					'section' => 'colors',
					'choices'    => array(
							'-black' => 'Black',
							'' => 'White',
		
					));
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_header_size',
					'default' => 'fullwidth',
					'label' => 'Header width', 
					'section' => 't1t_design',
					'choices'    => array(
							'normal' => 'Normal',
							'fullwidth' => 'Fullwidth',
		
					));					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_fixed_menu',
					'default' => 'show-menu',
					'label' => 'Menu follow with scroll', 
					'section' => 't1t_design',
					'choices'    => array(
							'show-menu' => 'Show',
							'' => 'Hide',
		
					));
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_fonts',
					'default' => 'Open Sans',
					'label' => 'Main Font', 
					'section' => 't1t_typography',
					'choices'    => $fonts_list
	
					);
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_menu_font',
					'default' => 'Open Sans',
					'label' => 'Menu Font', 
					'section' => 't1t_typography',
					'choices'    => $fonts_list
			
			);
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_menu_font_weight',
					'default' => '400',
					'label' => 'Menu Font Weight', 
					'section' => 't1t_typography',
					'choices'    => array(
							'400' => 'Regular',
							'600' => 'Semi-bold',
							'700' => 'Bold',
			));
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_widget_font',
					'default' => 'Open Sans',
					'label' => 'Widget title font', 
					'section' => 't1t_typography',
					'choices'    => $fonts_list
			
			);
						
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_widget_fx',
					'default' => 'widgetfx-1',
					'label' => 'Widget load effect', 
					'section' => 't1t_design',
					'choices'    => array(
							'' => 'no effect',
							'widgetfx-1' => 'Fade in',
							'widgetfx-2' => 'Move up',
							'widgetfx-3' => 'Scale up',
							'widgetfx-4' => 'Rubber band',
							'widgetfx-5' => 'Bounce up',
							'widgetfx-6' => 'Pulse',
							'widgetfx-7' => 'Fade in up',
							'widgetfx-8' => 'Pop up',
							'widgetfx-9' => 'Bounce',
		
					));		

			$t1t_dropdowns[] = array(
					'slug'=>'t1t_uppercase_title',
					'default' => 'uppercase',
					'label' => 'Title Uppercase', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'uppercase' => 'On',
							'none' => 'Off',	
					));	
									
											
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_content_font_size',
					'default' => '13',
					'label' => 'Content font size', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'12' => '12px',
							'13' => '13px',
							'14' => '14px',
							'15' => '15px',
							'16' => '16px',
							'17' => '17px',
							'18' => '18px',

		
					));	

			$t1t_dropdowns[] = array(
					'slug'=>'t1t_post_media_size',
					'default' => 'true',
					'label' => 'Featured media size', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Full width',
							'false' => '3/4',
							'off' => 'Media off',
		
					));		
	
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_share_post',
					'default' => 'true',
					'label' => 'Share buttons', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
		
					));			
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_post_tags',
					'default' => 'true',
					'label' => 'Post tags', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
		
					));	
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_post_categories',
					'default' => 'true',
					'label' => 'Post categories', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
		
					));			
	
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_author_box',
					'default' => 'true',
					'label' => 'Author-box', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
		
					));
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_show_comments',
					'default' => 'true',
					'label' => 'Comments', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_next_prev_links',
					'default' => 'true',
					'label' => 'Navigation Links', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));					
			
		
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_related',
					'default' => 'true',
					'label' => 'Related Posts', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));
									
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_related_choice',
					'default' => 'tags',
					'label' => 'Chose related posts', 
					'section' => 't1t_post_page_options',
					'choices'    => array(
							'tags' => 'Tags',
							'category' => 'Category',
							'author' => 'Author',
			
					));					

			$t1t_dropdowns[] = array(
					'slug'=>'t1t_category_post_style',
					'default' => 'style_1',
					'label' => 'Category post style', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'style_1' => 'Style 1',
							'style_2' => 'Style 2',
							'style_3' => 'Style 3',
			
					));
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_category_big_post',
					'default' => 'true',
					'label' => 'Category big post', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));	
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_category_big_post_style',
					'default' => 'true',
					'label' => 'Category big post style', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'style_1' => 'Style 1',
							'style_2' => 'Style 2',	
					));	

			$t1t_dropdowns[] = array(
					'slug'=>'t1t_category_show_author',
					'default' => 'true',
					'label' => 'Category show author', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));	
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_category_show_date',
					'default' => 'true',
					'label' => 'Category show date', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));		
			
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_popular_widget',
					'default' => 'true',
					'label' => 'Popular Posts', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'true' => 'Show',
							'false' => 'Hide',
			
					));
										
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_popular_post',
					'default' => 'forever',
					'label' => 'Popular Posts Time', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'week' => 'week',
							'month' => 'month',
							'year' => 'year',
							'forever' => 'forever',
			
					));	
					
			$t1t_dropdowns[] = array(
					'slug'=>'t1t_tv_widget_style',
					'default' => 'one',
					'label' => 'TV-Widget-Style', 
					'section' => 't1t_category_page_options',
					'choices'    => array(
							'one' => 'Style 1',
							'two' => 'Style 2',
							'three' => 'Style 3',		
					));		
									
			foreach( $t1t_dropdowns as $t1t_dropdown ) {
					
					
				$wp_customize->add_setting($t1t_dropdown['slug'], array(
						'default'        => $t1t_dropdown['default'],
						'capability'     => 'edit_theme_options',
						'type'           => 'option',
						'sanitize_callback' => 't1t_sanitize'
							
				));
					
				$wp_customize->add_control($t1t_dropdown['slug'], array(
						'label'      => $t1t_dropdown['label'],
						'section'    => $t1t_dropdown['section'],
						'settings'   => $t1t_dropdown['slug'],
						'choices' => $t1t_dropdown['choices'],
						'type'    => 'select',
				));
					
			}
		
			
			
			//  = Titan: Dropdown =
			
			class textarea_control extends WP_Customize_Control {
				public $type = 'textarea';
					
				public function render_content() {
					?>

			<label>
					<span class="customize-control-title">
					<?php echo esc_html( $this->label ); ?>
					</span>
					<textarea rows="5" style="width:100%;" <?php $this->link(); ?>>
			<?php echo esc_textarea( $this->value() ); ?>
			</textarea>
			</label>
<?php
						    }
						}			
			
			
			$t1ttextareas = array();
			
			$t1ttextareas[] = array(
					'default' => '',
					'slug'=>'t1t_tracking',
					'label' => 'Paste your Google Analytics (or other) tracking code here.',
					'section' => 't1t_ads_options'
			);
			
		foreach( $t1ttextareas as $t1ttextarea ) {
			
			$wp_customize->add_setting($t1ttextarea['slug'], array(
					'default'        => $t1ttextarea['default'],
					'capability'     => 'edit_theme_options',
					'type'           => 'option',
					'sanitize_callback' => 't1t_sanitize'
			) );
			
			$wp_customize->add_control( new textarea_control( $wp_customize, $t1ttextarea['slug'], array(
					'label'   => $t1ttextarea['label'],
					'section' => 't1t_ads_options',
					'settings'   => $t1ttextarea['slug'],
			) ) );
			
		}
		
function t1t_sanitize($input) {return $input;}
	
}
add_action( 'customize_register', 'titan_customize' );
?>