<?php

if( !get_option('oriont_options') ){
	if( get_option('oriont_active') < 3 ){
	$old_options  = array(
			"oriont_logo_setting",
			"oriont_logo",
			"oriont_logo_margin",
			"oriont_favicon",
			"oriont_gravatar",
			"oriont_timthumb",
			"oriont_top_right",
			"oriont_top_date",
			"oriont_todaydate_format",
			"oriont_random_article",
			"oriont_breadcrumbs",
			"oriont_breadcrumbs_delimiter",
			"oriont_css",
			"oriont_header_code",
			"oriont_footer_code",
			"oriont_sidebar_pos",
			"oriont_on_home",
			"oriont_home_layout",
			"oriont_home_tabs_box",
			"oriont_post_featured",
			"oriont_post_authorbio",
			"oriont_post_nav",
			"oriont_post_meta",
			"oriont_post_author",
			"oriont_post_date",
			"oriont_post_cats",
			"oriont_post_comments",
			"oriont_post_tags",
			"oriont_comment_validation",
			"oriont_share_post",
			"oriont_share_tweet",
			"oriont_share_twitter_username",
			"oriont_share_facebook",
			"oriont_share_google",
			"oriont_share_linkdin",
			"oriont_share_stumble",
			"oriont_share_pinterest",
			"oriont_related",
			"oriont_related_number",
			"oriont_related_query",
			"oriont_footer_top",
			"oriont_footer_social",
			"oriont_footer_widgets",
			"oriont_footer_one",
			"oriont_footer_two",
			"oriont_share_buttons",
			"oriont_archives_socail",
			"oriont_blog_display",
			"oriont_category_desc",
			"oriont_category_rss",
			"oriont_tag_rss",
			"oriont_author_bio",
			"oriont_author_rss",
			"oriont_search_cats",
			"oriont_search_exclude_pages",
			"oriont_sidebar_home",
			"oriont_sidebar_page",
			"oriont_sidebar_post",
			"oriont_sidebar_archive",
			"oriont_breaking_news",
			"oriont_breaking_title",
			"oriont_breaking_number",
			"oriont_breaking_effect",
			"oriont_breaking_speed",
			"oriont_breaking_time",
			"oriont_breaking_type",
			"oriont_breaking_tag",
			"oriont_rss_url",
			"oriont_slider",
			"oriont_slider_type",
			"oriont_slider_pos",
			"oriont_slider_number",
			"oriont_flexi_slider_effect",
			"oriont_flexi_slider_speed",
			"oriont_flexi_slider_time",
			"oriont_elastic_slider_effect",
			"oriont_elastic_slider_autoplay",
			"oriont_elastic_slider_interval",
			"oriont_elastic_slider_speed",
			"oriont_slider_query",
			"oriont_slider_tag",
			"oriont_slider_cat",
			"oriont_slider_posts",
			"oriont_slider_pages",
			"oriont_slider_custom",
			"oriont_banner_top",
			"oriont_banner_top_img",
			"oriont_banner_top_url",
			"oriont_banner_top_alt",
			"oriont_banner_top_tab",
			"oriont_banner_top_adsense",
			"oriont_banner_bottom",
			"oriont_banner_bottom_img",
			"oriont_banner_bottom_url",
			"oriont_banner_bottom_alt",
			"oriont_banner_bottom_tab",
			"oriont_banner_bottom_adsense",
			"oriont_banner_above",
			"oriont_banner_above_img",
			"oriont_banner_above_url",
			"oriont_banner_above_alt",
			"oriont_banner_above_tab",
			"oriont_banner_above_adsense",
			"oriont_banner_below",
			"oriont_banner_below_img",
			"oriont_banner_below_url",
			"oriont_banner_below_alt",
			"oriont_banner_below_tab",
			"oriont_banner_below_adsense",
			"oriont_ads1_shortcode", 
			"oriont_ads2_shortcode",
			"oriont_theme_skin",
			"oriont_background_type",
			"oriont_background_pattern",
			"oriont_background_pattern_color",
			"oriont_background_full",
			"oriont_exclude_shortcodes",
			"oriont_notify_theme",
			"oriont_dashboard_logo",
			"oriont_global_color",
			"oriont_links_color",
			"oriont_links_decoration",
			"oriont_links_color_hover",
			"oriont_links_decoration_hover",
			"oriont_topbar_links_color",
			"oriont_topbar_links_color_hover",
			"oriont_todaydate_background",
			"oriont_todaydate_color",
			"oriont_breaking_title_bg",
			"oriont_footer_title_color",
			"oriont_footer_links_color",
			"oriont_footer_links_color_hover",
			"oriont_breaking_cat",
			"oriont_sidebars",
			"oriont_social",
			"oriont_home_tabs",
			"oriont_background",
			"oriont_topbar_background",
			"oriont_header_background",
			"oriont_footer_background",
			"oriont_typography_general",
			"oriont_typography_top_menu",
			"oriont_typography_main_nav",
			"oriont_typography_page_title",
			"oriont_typography_post_title",
			"oriont_typography_post_meta",
			"oriont_typography_post_entry",
			"oriont_typography_boxes_title",
			"oriont_typography_widgets_title",
			"oriont_typography_footer_widgets_title",
			"oriont_typography_post_h1",
			"oriont_typography_post_h2",
			"oriont_typography_post_h3",
			"oriont_typography_post_h4",
			"oriont_typography_post_h5",
			"oriont_typography_post_h6"
		);
		
		$current_options = array();
		foreach( $old_options as $option ){
			if( get_option( $option ) ){
				$new_option = preg_replace('/oriont_/', '' , $option);
				if( $option == 'oriont_home_tabs' ){
					$oriont_home_tabs = explode (',' , get_option( $option ) );
					$current_options[$new_option] = $oriont_home_tabs  ;
				}else{			
					$current_options[$new_option] =  get_option( $option ) ;
				}
				update_option( 'oriont_options' , $current_options );
				delete_option($option);
			}
		}
		update_option( 'oriont_active' , 3 );
		echo '<script>location.reload();</script>';
		die;
	}
}
?>