<?php

add_action('admin_menu', 'titan_one_button_preset');

function titan_one_button_preset() {
	add_theme_page('Titan one button install widgets', 'Titan Widget Presets', 'read', 'titan_one_button','t1t_prearange');
	wp_enqueue_style( 'Titan one button install widgets style', get_template_directory_uri() . '/inc/t1t-widget-presets.css' );
	wp_enqueue_script('observer one button install widgets', get_template_directory_uri() . '/js/t1t-one-button-install.js', array('jquery'));
}

function t1t_prearange(){
	$bloginfo = get_template_directory_uri();

?>

<div id="demo-picker">
	<ul>

		<li>
			<div class="picker-image">
				<img src="<?php echo $bloginfo; ?>/images/widget-presets/demotitan1.png"/>
			</div>
			<form method="post">
				<input  type="submit" class="button-secondary" name="preset1" value="<?php echo 'Gaming Demo' ?>"/>
			</form>
		</li>
		<li>
			<div class="picker-image">
				<img src="<?php echo $bloginfo; ?>/images/widget-presets/demotitan2.png"/>
			</div>
			<form method="post">
				<input  type="submit" class="button-secondary" name="preset2" value="<?php echo 'Magazine demo' ?>"/>
			</form>
		</li>
		<li>
			<div class="picker-image">
				<img src="<?php echo $bloginfo; ?>/images/widget-presets/demotitan3.png"/>
			</div>
			<form method="post">
				<input  type="submit" class="button-secondary" name="preset3" value="<?php echo 'Blog demo' ?>"/>
			</form>
		</li>
		
		<form method="post">
			<input  type="submit" class="button-secondary" name="empty" value="<?php echo 'empty - resets sidebars' ?>"/>
		</form>
		<div class="warrning-button">
			<span>Warning!!!!</span>
			 <div class="warning-text">This will reset the widget layout, logo images, and some other options you currently have. Do you understand?</div>
			 <div class="yesido">Yes</div>
			 <div class="noidont">No</div>
		</div>	
		
		
	</ul>
</div>
<?php
if(isset($_POST) && !empty($_POST['empty'])) {
update_option('sidebars_widgets', array ('wp_inactive_widgets' => array ( )));
} elseif (isset($_POST) && !empty($_POST['preset1'])){
	update_option( 'sidebars_widgets', array ( 
		'Homepage' => array ( 
			0 => 'super_slider_widget_t1t-1', 
			1 => 'ticker_widget_t1t-1', 
			2 => 'thumbnails_t1t-1', 
			3 => 'img_featured_category_t1t-1', 
			4 => 't1t_blog_posts_t1t-1',
			5 => 'small_img_category_t1t-1', 
			6 => 'blog_category_t1t-1', 
			7 => 'tv_widget_t1t-1',
			8 => 'carousel_widget_t1t-1',
			9 => 'tabs_t1t-1', 
			10 => 'blog_category_t1t-1', 	
			11 => 'most_commented_widget_t1t-1', 
			12 => 'tv_widget_ajax_t1t-1', 
			13 => 'trending_widget_t1t-1', 
			14 => 'ad_widget_sizes_t1t-1', 
			15 => 'img_featured_category_t1t-12', 
			16 => 'featured_list_posts_t1t-1', 
			17 => 'featured_list_posts_t1t-1', 	
			)));
	
	update_option('t1t_copyright', 'Copyright 2015 Titan Theme. Stepfox Development Studios');
	//logo section
	set_theme_mod('header_image', $bloginfo.'/images/logo.png');
	update_option('t1t_menu_logo', $bloginfo.'/images/menu-logo.png');
	set_theme_mod('background_image', '');
	update_option('t1t_favicon', $bloginfo.'/images/favicon.png');
	update_option('t1t_apple_touch_icon', $bloginfo.'/images/apple-touch-icon.png');
	update_option('t1t_facebook_default', $bloginfo.'/images/titan-home-facebook.jpg');

	//colors
	update_option('t1t_menu_background', '#000000');
	update_option('t1t_menu_color', '#ffffff');
	update_option('t1t_menu_hover_color', '#db0000');
	update_option('t1t_menu_border_color', '#ffffff');
	update_option('t1t_main_color', '#db0000');
	set_theme_mod('background_color', 'efefef');
	update_option('t1t_search_color', '');
	update_option('t1t_social_color', '');
	
	//design
	update_option('t1t_title_picker', 'style_title5');
	update_option('t1t_site_width', '1350');
	update_option('t1t_slider_picker', 'slider_fx1');
	update_option('t1t_header_size', 'fullwidth');
	update_option('t1t_fixed_menu', 'show-menu');
	update_option('t1t_widget_fx', 'widgetfx-1');
	update_option('t1t_image_effect', 'image_fx1');

    //typography
	update_option('t1t_fonts', 'Open Sans');
	update_option('t1t_menu_font', 'Open Sans');
	update_option('t1t_menu_font_weight', '400');
	update_option('t1t_widget_font', 'Open Sans');
	
	//header posts
	update_option('t1t_header_posts_tags', '0');
	
	//post page options
	update_option('t1t_uppercase_title', 'uppercase');
	update_option('t1t_content_font_size', '13');
	update_option('t1t_post_media_size', 'false');
	update_option('t1t_share_post', 'true');
	update_option('t1t_post_tags', 'true');
	update_option('t1t_post_categories', 'true');
	update_option('t1t_author_box', 'true');
	update_option('t1t_show_comments', 'true');
	update_option('t1t_next_prev_links', 'true');
	update_option('t1t_related', 'true');
	update_option('t1t_related_choice', 'category');
	
	//category and tv options
	update_option('t1t_category_post_style', 'style_1');
	update_option('t1t_category_big_post', 'true');
	update_option('t1t_category_big_post_style', 'style_1');
	update_option('t1t_category_show_author', 'true');
	update_option('t1t_category_show_date', 'true');
	update_option('t1t_popular_widget', 'true');
	update_option('t1t_popular_post', 'forever');
	update_option('t1t_tv_widget_style', 'one');
	update_option('t1t_category_number', '9');
	
	//translate
	update_option('t1t_word_before_author', 'by');
	update_option('t1t_word_before_category', 'Latest in:');
	update_option('t1t_search_translate', 'Search');
	update_option('t1t_post_tags_title', 'Tags');
	update_option('t1t_post_category_title', 'Categories');
	update_option('t1t_share_this_article', 'SHARE THIS ARTICLE');
	update_option('t1t_share_this_video', 'SHARE THIS VIDEO');
	update_option('t1t_share_this_gallery', 'SHARE THIS GALLERY');
	update_option('t1t_older_article', 'OLDER ARTICLE');
	update_option('t1t_next_article', 'NEXT ARTICLE');
	update_option('t1t_related_by', 'RELATED BY');
	update_option('t1t_category_popular_title', 'Popular Posts');
	update_option('t1t_tv_carousel_title', 'BROWSE MORE VIDEOS');
	update_option('t1t_gallery_carousel_title', 'BROWSE MORE GALLERIES');
	update_option('t1t_review_page_title', 'Reviews');
	update_option('t1t_comments_post_comment', 'Post comment');
	update_option('t1t_comments_post_reply', 'Leave a Reply');
	update_option('t1t_comments_post_reply_to', 'Leave a Reply to');
	update_option('t1t_comments_cancel_reply', 'Cancel reply');
	update_option('t1t_comments_logged_in_as', 'Logged in as');
	update_option('t1t_comments_logged_in_as_log_out', 'Log out');
	update_option('t1t_comments_name', 'Name');
	update_option('t1t_comments_email', 'Email');
	update_option('t1t_comments_website', 'Website');
	update_option('t1t_comments_no_comment', 'No Comment');
	update_option('t1t_comments_one_comment', 'One Comment');
	update_option('t1t_comments_number_comments', 'Comments on this post.');
	update_option('t1t_mob_menu_translate', 'MENU');

	//social
	update_option('t1t_facebook', 'StepfoxThemes');
	update_option('t1t_twitter', 'stepfoxthemes');
	update_option('t1t_pinterest', 'test');
	update_option('t1t_google', 'test');
	update_option('t1t_youtube', 'test');
	update_option('t1t_instagram', 'test');	
 
	
}elseif (isset($_POST) && !empty($_POST['preset2'])){

	update_option( 'sidebars_widgets', array ( 
		'Homepage' => array ( 
			0 => 't1t_blog_posts_t1t-2', 
			1 => 'img_featured_category_t1t-2', 
			2 => 'trending_widget_t1t-2', 
			3 => 't1t_blog_posts_t1t-21', 
			4 => 'carousel_widget_t1t-2',
			5 => 't1t_blog_posts_t1t-22', 
			6 => 'thumbnails_t1t-2', 
			7 => 'tv_widget_t1t-2',
			8 => 'ad_widget_sizes_t1t-2',
			9 => 'blog_category_t1t-2', 
			10 => 'most_commented_widget_t1t-2', 	
			11 => 'thumbnails_t1t-21', 
			12 => 'tag_cloud-2', 
			13 => 'jumping_posts_t1t-2', 
			)));
			
	update_option('t1t_copyright', 'Copyright 2015 Titan Theme. Stepfox Development Studios');	
		
	//logo section
	set_theme_mod('header_image', $bloginfo.'/images/logo.png');
	update_option('t1t_menu_logo', $bloginfo.'/images/menu-logo.png');
	set_theme_mod('background_image', $bloginfo.'/images/background.jpg');
	update_option('t1t_favicon', $bloginfo.'/images/favicon.png');
	update_option('t1t_apple_touch_icon', $bloginfo.'/images/apple-touch-icon.png');
	update_option('t1t_facebook_default', $bloginfo.'/images/titan-home-facebook.jpg');

	//colors
	update_option('t1t_menu_background', '#ffffff');
	update_option('t1t_menu_color', '#000000');
	update_option('t1t_menu_hover_color', '#f24000');
	update_option('t1t_menu_border_color', '#eaeaea');
	update_option('t1t_main_color', '#f24000');
	set_theme_mod('background_color', 'ffffff');
	update_option('t1t_search_color', '-black');
	update_option('t1t_social_color', '');
	
	//design
	update_option('t1t_title_picker', 'style_title1');
	update_option('t1t_site_width', '1350');
	update_option('t1t_slider_picker', 'slider_fx2');
	update_option('t1t_header_size', 'normal');
	update_option('t1t_fixed_menu', 'show-menu');
	update_option('t1t_widget_fx', 'widgetfx-1');
	update_option('t1t_image_effect', 'image_fx2');

    //typography
	update_option('t1t_fonts', 'Viga');
	update_option('t1t_menu_font', 'Viga');
	update_option('t1t_menu_font_weight', '400');
	update_option('t1t_widget_font', 'Open Sans');
	
	//header posts
	update_option('t1t_header_posts_tags', '0');
	
	//post page options
	update_option('t1t_uppercase_title', 'uppercase');
	update_option('t1t_content_font_size', '14');
	update_option('t1t_post_media_size', 'false');
	update_option('t1t_share_post', 'true');
	update_option('t1t_post_tags', 'true');
	update_option('t1t_post_categories', 'true');
	update_option('t1t_author_box', 'true');
	update_option('t1t_show_comments', 'true');
	update_option('t1t_next_prev_links', 'true');
	update_option('t1t_related', 'true');
	update_option('t1t_related_choice', 'category');
	
	//category and tv options
	update_option('t1t_category_post_style', 'style_1');
	update_option('t1t_category_big_post', 'true');
	update_option('t1t_category_big_post_style', 'style_2');
	update_option('t1t_category_show_author', 'true');
	update_option('t1t_category_show_date', 'true');
	update_option('t1t_popular_widget', 'true');
	update_option('t1t_popular_post', 'forever');
	update_option('t1t_tv_widget_style', 'one');
	update_option('t1t_category_number', '9');
	
	//translate
	update_option('t1t_word_before_author', 'by');
	update_option('t1t_word_before_category', 'Latest in:');
	update_option('t1t_search_translate', 'Search');
	update_option('t1t_post_tags_title', 'Tags');
	update_option('t1t_post_category_title', 'Categories');
	update_option('t1t_share_this_article', 'SHARE THIS ARTICLE');
	update_option('t1t_share_this_video', 'SHARE THIS VIDEO');
	update_option('t1t_share_this_gallery', 'SHARE THIS GALLERY');
	update_option('t1t_older_article', 'OLDER ARTICLE');
	update_option('t1t_next_article', 'NEXT ARTICLE');
	update_option('t1t_related_by', 'RELATED BY');
	update_option('t1t_category_popular_title', 'Popular Posts');
	update_option('t1t_tv_carousel_title', 'BROWSE MORE VIDEOS');
	update_option('t1t_gallery_carousel_title', 'BROWSE MORE GALLERIES');
	update_option('t1t_review_page_title', 'Reviews');
	update_option('t1t_comments_post_comment', 'Post comment');
	update_option('t1t_comments_post_reply', 'Leave a Reply');
	update_option('t1t_comments_post_reply_to', 'Leave a Reply to');
	update_option('t1t_comments_cancel_reply', 'Cancel reply');
	update_option('t1t_comments_logged_in_as', 'Logged in as');
	update_option('t1t_comments_logged_in_as_log_out', 'Log out');
	update_option('t1t_comments_name', 'Name');
	update_option('t1t_comments_email', 'Email');
	update_option('t1t_comments_website', 'Website');
	update_option('t1t_comments_no_comment', 'No Comment');
	update_option('t1t_comments_one_comment', 'One Comment');
	update_option('t1t_comments_number_comments', 'Comments on this post.');
	update_option('t1t_mob_menu_translate', 'MENU');

	//social
	update_option('t1t_facebook', 'StepfoxThemes');
	update_option('t1t_twitter', 'stepfoxthemes');
	update_option('t1t_pinterest', 'test');
	update_option('t1t_google', 'test');
	update_option('t1t_youtube', 'test');
	update_option('t1t_instagram', 'test');	




	
	
}elseif (isset($_POST) && !empty($_POST['preset3'])){
		
	update_option( 'sidebars_widgets', array ( 
		'Homepage' => array ( 
			0 => 'super_slider_widget_t1t-3', 
			1 => 'ticker_widget_t1t-3', 
			2 => 'thumbnails_t1t-3', 
			3 => 't1t_blog_posts_t1t-3', 
			4 => 'thumbnails_t1t-31',
			5 => 't1t_blog_posts_t1t-31', 
			6 => 't1t_blog_posts_t1t-32', 
			7 => 'carousel_widget_t1t-3',
			8 => 'thumbnails_t1t-32',
			9 => 'jumping_posts_t1t-3', 
			)));

			
	update_option('t1t_copyright', 'Copyright 2015 Titan Theme. Stepfox Development Studios');	
		
	//logo section
	set_theme_mod('header_image', $bloginfo.'/images/logo.png');
	update_option('t1t_menu_logo', $bloginfo.'/images/menu-logo.png');
	set_theme_mod('background_image', $bloginfo.'/images/background.jpg');
	update_option('t1t_favicon', $bloginfo.'/images/favicon.png');
	update_option('t1t_apple_touch_icon', $bloginfo.'/images/apple-touch-icon.png');
	update_option('t1t_facebook_default', $bloginfo.'/images/titan-home-facebook.jpg');

	//colors
	update_option('t1t_menu_background', '#141414');
	update_option('t1t_menu_color', '#ffffff');
	update_option('t1t_menu_hover_color', '#ed4230');
	update_option('t1t_menu_border_color', '#2d2d2d');
	update_option('t1t_main_color', '#ed4230');
	set_theme_mod('background_color', 'ffffff');
	update_option('t1t_search_color', '');
	update_option('t1t_social_color', '');
	
	//design
	update_option('t1t_title_picker', 'style_title1');
	update_option('t1t_site_width', '1903');
	update_option('t1t_slider_picker', 'slider_fx2');
	update_option('t1t_header_size', 'normal');
	update_option('t1t_fixed_menu', 'show-menu');
	update_option('t1t_widget_fx', 'widgetfx-1');
	update_option('t1t_image_effect', 'image_fx2');

    //typography
	update_option('t1t_fonts', 'Viga');
	update_option('t1t_menu_font', 'Viga');
	update_option('t1t_menu_font_weight', '400');
	update_option('t1t_widget_font', 'Open Sans');
	
	//header posts
	update_option('t1t_header_posts_tags', '0');
	
	//post page options
	update_option('t1t_uppercase_title', 'uppercase');
	update_option('t1t_content_font_size', '14');
	update_option('t1t_post_media_size', 'false');
	update_option('t1t_share_post', 'true');
	update_option('t1t_post_tags', 'true');
	update_option('t1t_post_categories', 'true');
	update_option('t1t_author_box', 'true');
	update_option('t1t_show_comments', 'true');
	update_option('t1t_next_prev_links', 'true');
	update_option('t1t_related', 'true');
	update_option('t1t_related_choice', 'category');
	
	//category and tv options
	update_option('t1t_category_post_style', 'style_1');
	update_option('t1t_category_big_post', 'true');
	update_option('t1t_category_big_post_style', 'style_2');
	update_option('t1t_category_show_author', 'true');
	update_option('t1t_category_show_date', 'true');
	update_option('t1t_popular_widget', 'true');
	update_option('t1t_popular_post', 'forever');
	update_option('t1t_tv_widget_style', 'one');
	update_option('t1t_category_number', '9');
	
	//translate
	update_option('t1t_word_before_author', 'by');
	update_option('t1t_word_before_category', 'Latest in:');
	update_option('t1t_search_translate', 'Search');
	update_option('t1t_post_tags_title', 'Tags');
	update_option('t1t_post_category_title', 'Categories');
	update_option('t1t_share_this_article', 'SHARE THIS ARTICLE');
	update_option('t1t_share_this_video', 'SHARE THIS VIDEO');
	update_option('t1t_share_this_gallery', 'SHARE THIS GALLERY');
	update_option('t1t_older_article', 'OLDER ARTICLE');
	update_option('t1t_next_article', 'NEXT ARTICLE');
	update_option('t1t_related_by', 'RELATED BY');
	update_option('t1t_category_popular_title', 'Popular Posts');
	update_option('t1t_tv_carousel_title', 'BROWSE MORE VIDEOS');
	update_option('t1t_gallery_carousel_title', 'BROWSE MORE GALLERIES');
	update_option('t1t_review_page_title', 'Reviews');
	update_option('t1t_comments_post_comment', 'Post comment');
	update_option('t1t_comments_post_reply', 'Leave a Reply');
	update_option('t1t_comments_post_reply_to', 'Leave a Reply to');
	update_option('t1t_comments_cancel_reply', 'Cancel reply');
	update_option('t1t_comments_logged_in_as', 'Logged in as');
	update_option('t1t_comments_logged_in_as_log_out', 'Log out');
	update_option('t1t_comments_name', 'Name');
	update_option('t1t_comments_email', 'Email');
	update_option('t1t_comments_website', 'Website');
	update_option('t1t_comments_no_comment', 'No Comment');
	update_option('t1t_comments_one_comment', 'One Comment');
	update_option('t1t_comments_number_comments', 'Comments on this post.');
	update_option('t1t_mob_menu_translate', 'MENU');

	//social
	update_option('t1t_facebook', 'StepfoxThemes');
	update_option('t1t_twitter', 'stepfoxthemes');
	update_option('t1t_pinterest', 'test');
	update_option('t1t_google', 'test');
	update_option('t1t_youtube', 'test');
	update_option('t1t_instagram', 'test');	

}

//about us widget

update_option( 'widget_about_t1t', array ( 
1 => array ( 'title' =>'About us', 'text' =>'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'),

 '_multiwidget' => 1 ) );

  //Ad widget

update_option( 'widget_ad_widget_sizes_t1t', array ( 
1 => array ('title' =>'advertisment', 'text' =>'', 'widget_size' => 'one-part', 'link' => '', 'image' => $bloginfo.'/images/336x280.jpg'),

 '_multiwidget' => 1 ) );

 //big featured image category

update_option( 'widget_img_featured_category_t1t', array ( 
1 => array (  'title' => '', 'number' => 3, 'review' => 0, 'widget_size' => 'three-parts', 'offset' => 0, 'categories' => 0, 'author' => 'on', 'date' => 'on', 'cat_show' => 'on'  ),
12 => array (  'title' => '', 'number' => 4, 'review' => 0, 'widget_size' => 'four-parts', 'offset' => 0, 'categories' => 0, 'author' => 'on', 'date' => 'on', 'cat_show' => 'on'  ),

2 => array (  'title' => '', 'number' => 3, 'review' => 0, 'widget_size' => 'three-parts', 'offset' => 0, 'categories' => 0, 'author' => 'on', 'date' => 'on', 'cat_show' => 'on'  ),

 '_multiwidget' => 1 ) );

//Blogroll 1

update_option( 'widget_blog_category_t1t', array ( 
1 => array ( 'title' => 'Blogroll', 'number' => 3, 'offset' => 0, 'author' => 'on', 'date' => 'on', 'widget_size' => 'three-parts', 'categories' => '0', 'excerptnumber'=>'30'),

2 => array ( 'title' => 'Blogroll', 'number' => 12, 'offset' => 0, 'author' => 'on', 'date' => 'on', 'widget_size' => 'three-parts', 'categories' => '0', 'excerptnumber'=>'30'),

'_multiwidget' => 1 ) );

//Blogroll 2

update_option( 'widget_t1t_blog_posts_t1t', array ( 
1 => array ( 'title' => '', 'number' => 1, 'widget_size' => 'three-parts', 'categories' => 0, 'author' => 'on', 'offset' => 0, 'date' => 'on', 'cat_show' => 'on' ),

2 => array ( 'title' => '', 'number' => 1, 'widget_size' => 'three-parts', 'categories' => 0, 'author' => 'on', 'offset' => 0, 'date' => 'on', 'cat_show' => 'on' ),
21 => array ( 'title' => '', 'number' => 1, 'widget_size' => 'three-parts', 'categories' => 0, 'author' => 'on', 'offset' => 1, 'date' => 'on', 'cat_show' => 'on' ),
22 => array ( 'title' => '', 'number' => 1, 'widget_size' => 'three-parts', 'categories' => 0, 'author' => 'on', 'offset' => 2, 'date' => 'on', 'cat_show' => 'on' ),

3 => array ( 'title' => 'blogroll', 'number' => 1, 'widget_size' => 'two-parts', 'categories' => 0, 'author' => 'on', 'offset' => 0, 'date' => 'on', 'cat_show' => 'on' ),
31 => array ( 'title' => 'blogroll', 'number' => 1, 'widget_size' => 'two-parts', 'categories' => 0, 'author' => 'on', 'offset' => 1, 'date' => 'on', 'cat_show' => 'on' ),
32 => array ( 'title' => 'blogroll', 'number' => 1, 'widget_size' => 'two-parts', 'categories' => 0, 'author' => 'on', 'offset' => 2, 'date' => 'on', 'cat_show' => 'on' ),


'_multiwidget' => 1 ) );

//carousel

update_option( 'widget_carousel_widget_t1t', array ( 
1 => array (  'title' => 'Carousel Widget', 'number' => 10, 'widget_size' => 'three-parts', 'tags' => 0, 'author' => 'on'),

2 => array (  'title' => 'Carousel Widget', 'number' => 10, 'widget_size' => 'three-parts', 'tags' => 0, 'author' => 'on'),

3 => array (  'title' => 'Carousel Widget', 'number' => 10, 'widget_size' => 'four-parts', 'tags' => 0, 'author' => 'on'),

 '_multiwidget' => 1 ) );
 
//featured categories

update_option( 'widget_featured_list_posts_t1t', array ( 
1 => array ('title' => 'Featured categories', 'widget_size' => 'two-parts', 'category_one' => '0', 'category_two' => '0', 'category_three' => '0', 'category_four' => '0'  ),

 '_multiwidget' => 1 ) );

//jumping posts

update_option( 'widget_jumping_posts_t1t', array ( 
1 => array ('title' => 'Jumping posts', 'number' => 4, 'widget_size' => 'one-part', 'categories' => 0 ),

2 => array ('title' => 'Jumping posts', 'number' => 4, 'widget_size' => 'four-parts', 'categories' => 0 ),

3 => array ('title' => 'Jumping posts', 'number' => 4, 'widget_size' => 'four-parts', 'categories' => 0 ),

'_multiwidget' => 1 ) );

//most commented

update_option( 'widget_most_commented_widget_t1t', array ( 
1 => array ('title' => 'Most commented', 'number' => 2 ),

2 => array ('title' => 'Most commented', 'number' => 2 ),
 
'_multiwidget' => 1 ) );

 //slider

 update_option( 'widget_slider_widget_t1t', array ( 
1 => array ( 'title' => 'Image Slider', 'number' => 3, 'slider_control' => 'on', 'widget_size' => 'one-part', 'tags' => 0, 'subtitle'=>'on'),

'_multiwidget' => 1 ) );

//small featured image category

update_option( 'widget_small_img_category_t1t', array ( 
1 => array ( 'title' => 'Small featured images', 'number' => 2, 'review' => 0, 'widget_size' => 'one-part', 'categories' => 0, 'author' => 'on', 'offset' => 0  ),

 '_multiwidget' => 1 ) );

//super slider

update_option( 'widget_super_slider_widget_t1t', array ( 
1 => array ( 'title' => 'Super Slider', 'number' => 7, 'widget_size' => 'fullwidth-super-slider', 'tags' => 0, 'author' => 'on', 'date' => 'on' ),

3 => array ( 'title' => 'Super Slider', 'number' => 7, 'widget_size' => 'fullwidth-super-slider', 'tags' => 0, 'author' => 'on', 'date' => 'on' ),

 '_multiwidget' => 1 ) );

//tabber

update_option( 'widget_tabs_t1t', array ( 
1 => array ( 'latest_title' => 'Latest','popular_title' => 'Popular','comments_title' => 'Commented', 'latest_number' => 5, 'categories' => 0, 'widget_size' => 'one-part', 'duration'=>'forever' ),

 '_multiwidget' => 1 ) );

//thumbnails widget

update_option( 'widget_thumbnails_t1t', array ( 
1 => array ( 'title' => 'Thumbnails Widget', 'number' => 5, 'widget_size' => 'one-part', 'categories' => 0 ),

2 => array ( 'title' => 'Thumbnails Widget', 'number' => 5, 'widget_size' => 'one-part', 'categories' => 0 ),
21 => array ( 'title' => 'Thumbnails Widget', 'number' => 10, 'widget_size' => 'one-part', 'categories' => 0 ),

3 => array ( 'title' => 'Thumbnails Widget', 'number' => 4, 'widget_size' => 'one-part', 'categories' => 0 ),
31 => array ( 'title' => 'Thumbnails Widget', 'number' => 4, 'widget_size' => 'one-part', 'categories' => 0 ),
32 => array ( 'title' => 'Thumbnails Widget', 'number' => 12, 'widget_size' => 'four-parts', 'categories' => 0 ),

 '_multiwidget' => 1 ) );

//ticker widget

update_option( 'widget_ticker_widget_t1t', array ( 
1 => array ( 'title' => 'Breaking News', 'number' => 10, 'widget_size' => 'fullwidth-ticker', 'tags' => 0, 'sign_before_link' => '+' ),

3 => array ( 'title' => 'Breaking News', 'number' => 10, 'widget_size' => 'fullwidth-ticker', 'tags' => 0, 'sign_before_link' => '+' ),

 '_multiwidget' => 1 ) );

//trending posts widget

update_option( 'widget_trending_widget_t1t', array ( 
1 => array (  'title' => 'Trending posts', 'number' => 6, 'duration' => 'forever'),

2 => array (  'title' => 'Trending posts', 'number' => 5, 'duration' => 'forever'),

 '_multiwidget' => 1 ) );

   //tv-widget

update_option( 'widget_tv_widget_t1t', array ( 
1 => array (  'title' => 'New on Theme TV', 'widget_size' => 'one-part', 'number' => 1 ),

2 => array (  'title' => 'New on Theme TV', 'widget_size' => 'one-part', 'number' => 2 ),

 '_multiwidget' => 1 ) );

   //tv-widget

update_option( 'widget_tv_widget_ajax_t1t', array ( 
1 => array (  'title' => 'New on Theme TV', 'widget_size' => 'two-parts', 'number' => 6 ),

 '_multiwidget' => 1 ) );

    //embed-widget

update_option( 'widget_embed_vid_widget_t1t', array ( 
1 => array ( 'title' =>'Video of the week', 'widget_size' => 'two-parts', 'link_to_vid' => 'http://vimeo.com/63186969' ),

 '_multiwidget' => 1 ) );
 










//wordpress widgets

//archives widget

update_option( 'widget_archives', array ( 
1 => array ( 'title' => 'My Archives' ),
2 => array ( 'title' => 'My Archives' ),
3 => array ( 'title' => 'My Archives' ),
 '_multiwidget' => 1 ) );
 
 //categories widget

update_option( 'widget_categories', array ( 
1 => array ( 'title' => 'My Archives' ),
2 => array ( 'title' => 'My Categories' ),
3 => array ( 'title' => 'My Archives' ),
 '_multiwidget' => 1 ) );

//tag cloud
update_option( 'widget_tag_cloud', array ( 
1 => array ( 'title' => 'Tags' ),
2 => array ( 'title' => 'Tags' ),
3 => array ( 'title' => 'My Archives' ),
 '_multiwidget' => 1 ) );

}		



function first_time_activation(){
	$t1t_menu_background = (get_option('t1t_menu_background', null) !== null);
	$t1t_menu_color = (get_option('t1t_menu_color', null) !== null);
	$t1t_fonts = (get_option('t1t_fonts', null) !== null);
	
	
if (empty($t1t_menu_background) && empty($t1t_menu_color ) && empty($t1t_fonts)){
	$bloginfo = get_template_directory_uri();
	update_option( 'sidebars_widgets', array ( 
		'Homepage' => array ( 
			0 => 'super_slider_widget_t1t-1', 
			1 => 'ticker_widget_t1t-1', 
			2 => 'thumbnails_t1t-1', 
			3 => 'img_featured_category_t1t-1', 
			4 => 't1t_blog_posts_t1t-1',
			5 => 'small_img_category_t1t-1', 
			6 => 'blog_category_t1t-1', 
			7 => 'tv_widget_t1t-1',
			8 => 'carousel_widget_t1t-1',
			9 => 'tabs_t1t-1', 
			10 => 'blog_category_t1t-1', 	
			11 => 'most_commented_widget_t1t-1', 
			12 => 'tv_widget_ajax_t1t-1', 
			13 => 'trending_widget_t1t-1', 
			14 => 'ad_widget_sizes_t1t-1', 
			15 => 'img_featured_category_t1t-12', 
			16 => 'featured_list_posts_t1t-1', 
			17 => 'featured_list_posts_t1t-1', 	
			)));
	
	update_option('t1t_copyright', 'Copyright 2015 Titan Theme. Stepfox Development Studios');
	//logo section
	set_theme_mod('header_image', $bloginfo.'/images/logo.png');
	update_option('t1t_menu_logo', $bloginfo.'/images/menu-logo.png');
	set_theme_mod('background_image', '');
	update_option('t1t_favicon', $bloginfo.'/images/favicon.png');
	update_option('t1t_apple_touch_icon', $bloginfo.'/images/apple-touch-icon.png');
	update_option('t1t_facebook_default', $bloginfo.'/images/titan-home-facebook.jpg');

	//colors
	update_option('t1t_menu_background', '#000000');
	update_option('t1t_menu_color', '#ffffff');
	update_option('t1t_menu_hover_color', '#db0000');
	update_option('t1t_menu_border_color', '#ffffff');
	update_option('t1t_main_color', '#db0000');
	set_theme_mod('background_color', 'efefef');
	update_option('t1t_search_color', '');
	update_option('t1t_social_color', '');
	
	//design
	update_option('t1t_title_picker', 'style_title5');
	update_option('t1t_site_width', '1350');
	update_option('t1t_slider_picker', 'slider_fx1');
	update_option('t1t_header_size', 'fullwidth');
	update_option('t1t_fixed_menu', 'show-menu');
	update_option('t1t_widget_fx', 'widgetfx-1');
	update_option('t1t_image_effect', 'image_fx1');

    //typography
	update_option('t1t_fonts', 'Open Sans');
	update_option('t1t_menu_font', 'Open Sans');
	update_option('t1t_menu_font_weight', '400');
	update_option('t1t_widget_font', 'Open Sans');
	
	//header posts
	update_option('t1t_header_posts_tags', '0');
	
	//post page options
	update_option('t1t_uppercase_title', 'uppercase');
	update_option('t1t_content_font_size', '13');
	update_option('t1t_post_media_size', 'false');
	update_option('t1t_share_post', 'true');
	update_option('t1t_post_tags', 'true');
	update_option('t1t_post_categories', 'true');
	update_option('t1t_author_box', 'true');
	update_option('t1t_show_comments', 'true');
	update_option('t1t_next_prev_links', 'true');
	update_option('t1t_related', 'true');
	update_option('t1t_related_choice', 'category');
	
	//category and tv options
	update_option('t1t_category_post_style', 'style_1');
	update_option('t1t_category_big_post', 'true');
	update_option('t1t_category_big_post_style', 'style_1');
	update_option('t1t_category_show_author', 'true');
	update_option('t1t_category_show_date', 'true');
	update_option('t1t_popular_widget', 'true');
	update_option('t1t_popular_post', 'forever');
	update_option('t1t_tv_widget_style', 'one');
	update_option('t1t_category_number', '9');
	
	//translate
	update_option('t1t_word_before_author', 'by');
	update_option('t1t_word_before_category', 'Latest in:');
	update_option('t1t_search_translate', 'Search');
	update_option('t1t_post_tags_title', 'Tags');
	update_option('t1t_post_category_title', 'Categories');
	update_option('t1t_share_this_article', 'SHARE THIS ARTICLE');
	update_option('t1t_share_this_video', 'SHARE THIS VIDEO');
	update_option('t1t_share_this_gallery', 'SHARE THIS GALLERY');
	update_option('t1t_older_article', 'OLDER ARTICLE');
	update_option('t1t_next_article', 'NEXT ARTICLE');
	update_option('t1t_related_by', 'RELATED BY');
	update_option('t1t_category_popular_title', 'Popular Posts');
	update_option('t1t_tv_carousel_title', 'BROWSE MORE VIDEOS');
	update_option('t1t_gallery_carousel_title', 'BROWSE MORE GALLERIES');
	update_option('t1t_review_page_title', 'Reviews');
	update_option('t1t_comments_post_comment', 'Post comment');
	update_option('t1t_comments_post_reply', 'Leave a Reply');
	update_option('t1t_comments_post_reply_to', 'Leave a Reply to');
	update_option('t1t_comments_cancel_reply', 'Cancel reply');
	update_option('t1t_comments_logged_in_as', 'Logged in as');
	update_option('t1t_comments_logged_in_as_log_out', 'Log out');
	update_option('t1t_comments_name', 'Name');
	update_option('t1t_comments_email', 'Email');
	update_option('t1t_comments_website', 'Website');
	update_option('t1t_comments_no_comment', 'No Comment');
	update_option('t1t_comments_one_comment', 'One Comment');
	update_option('t1t_comments_number_comments', 'Comments on this post.');
	update_option('t1t_mob_menu_translate', 'MENU');

	//social
	update_option('t1t_facebook', 'StepfoxThemes');
	update_option('t1t_twitter', 'stepfoxthemes');
	update_option('t1t_pinterest', 'test');
	update_option('t1t_google', 'test');
	update_option('t1t_youtube', 'test');
	update_option('t1t_instagram', 'test');	
		}
	}

add_action( 'after_switch_theme', 'first_time_activation' );



?>