<?php

add_action('after_switch_theme', 'viral_express_transfer_old_settings');

function viral_express_transfer_old_settings() {
    $array_map = array();
    $is_setting_transferred = get_theme_mod('viral_express_is_setting_transferred', false);
    $previous_theme = strtolower(get_option('theme_switched'));

    if ($previous_theme !== 'viral-express' || $is_setting_transferred) {
        return;
    }

    $viral_express_mods = get_option('theme_mods_' . $previous_theme);

    $array_map = array(
        'viral_express_blog_layout' => 'viral_express_blog_layout',
        'viral_express_blog_cat' => 'viral_express_blog_cat',
        'viral_express_archive_content' => 'viral_express_archive_content',
        'viral_express_archive_excerpt_length' => 'viral_express_archive_excerpt_length',
        'viral_express_archive_readmore' => '',
        'viral_express_blog_date' => 'viral_express_blog_date',
        'viral_express_blog_author' => 'viral_express_blog_author',
        'viral_express_blog_comment' => 'viral_express_blog_comment',
        'viral_express_blog_category' => 'viral_express_blog_category',
        'viral_express_blog_tag' => 'viral_express_blog_tag',
        'viral_express_single_layout' => 'viral_express_single_layout',
        'viral_express_single_categories' => 'viral_express_single_categories',
        'viral_express_single_author' => 'viral_express_single_author',
        'viral_express_single_date' => 'viral_express_single_date',
        'viral_express_single_comment_count' => 'viral_express_single_comment_count',
        'viral_express_single_tags' => 'viral_express_single_tags',
        'viral_express_single_prev_next_post' => 'viral_express_single_prev_next_post',
        'viral_express_single_comments' => 'viral_express_single_comments',
        'viral_express_template_color' => 'viral_express_template_color',
        'viral_express_content_header_color' => 'viral_express_content_header_color',
        'viral_express_content_text_color' => 'viral_express_content_text_color',
        'viral_express_content_link_color' => 'viral_express_content_link_color',
        'viral_express_content_link_hov_color' => 'viral_express_content_link_hov_color',
        'viral_express_footer_col' => 'viral_express_footer_col',
        'viral_express_footer_bg_url' => 'viral_express_footer_bg_url',
        'viral_express_footer_bg_id' => 'viral_express_footer_bg_id',
        'viral_express_footer_bg_repeat' => 'viral_express_footer_bg_repeat',
        'viral_express_footer_bg_size' => 'viral_express_footer_bg_size',
        'viral_express_footer_bg_position' => 'viral_express_footer_bg_position',
        'viral_express_footer_bg_attach' => 'viral_express_footer_bg_attach',
        'viral_express_footer_bg_color' => 'viral_express_footer_bg_color',
        'viral_express_footer_border_color' => 'viral_express_footer_border_color',
        'viral_express_footer_title_color' => 'viral_express_footer_title_color',
        'viral_express_footer_text_color' => 'viral_express_footer_text_color',
        'viral_express_footer_anchor_color' => 'viral_express_footer_anchor_color',
        'viral_express_footer_copyright' => 'viral_express_footer_copyright',
        'viral_express_website_layout' => 'viral_express_website_layout',
        'viral_express_fluid_container_width' => 'viral_express_fluid_container_width',
        'viral_express_wide_container_width' => 'viral_express_website_width',
        'viral_express_container_padding' => 'viral_express_container_padding',
        'viral_express_sidebar_width' => 'viral_express_sidebar_width',
        'viral_express_backtotop' => 'viral_express_backtotop',
        'viral_express_load_google_font_locally' => 'viral_express_load_google_font_locally',
        'viral_express_hide_title' => 'viral_express_hide_title',
        'viral_express_hide_tagline' => 'viral_express_hide_tagline',
        'viral_express_tagline_position' => 'viral_express_tagline_position',
        'viral_express_title_color' => '',
        'viral_express_logo_height' => 'viral_express_logo_height',
        'viral_express_logo_padding' => 'viral_express_logo_padding',
        'viral_express_top_header' => 'viral_express_top_header',
        'viral_express_th_disable_mobile' => 'viral_express_th_disable_mobile',
        'viral_express_th_left_display' => 'viral_express_th_left_display',
        'viral_express_th_right_display' => 'viral_express_th_right_display',
        'viral_express_th_menu' => 'viral_express_th_menu',
        'viral_express_th_widget' => 'viral_express_th_widget',
        'viral_express_th_text' => 'viral_express_th_text',
        'viral_express_th_height' => 'viral_express_th_height',
        'viral_express_th_bottom_border_color' => 'viral_express_th_bottom_border_color',
        'viral_express_th_bg_color' => 'viral_express_th_bg_color',
        'viral_express_th_text_color' => 'viral_express_th_text_color',
        'viral_express_th_anchor_color' => 'viral_express_th_anchor_color',
        'viral_express_sticky_header' => 'viral_express_sticky_header',
        'viral_express_mh_layout' => 'viral_express_mh_layout',
        'viral_express_mh_show_search' => 'viral_express_mh_show_search',
        'viral_express_mh_show_cart' => 'viral_express_mh_show_cart',
        'viral_express_mh_show_social' => 'viral_express_mh_show_social',
        'viral_express_mh_show_offcanvas' => 'viral_express_mh_show_offcanvas',
        'viral_express_mh_header_bg_url' => 'viral_express_mh_header_bg_url',
        'viral_express_mh_header_bg_id' => 'viral_express_mh_header_bg_id',
        'viral_express_mh_header_bg_repeat' => 'viral_express_mh_header_bg_repeat',
        'viral_express_mh_header_bg_size' => 'viral_express_mh_header_bg_size',
        'viral_express_mh_header_bg_position' => 'viral_express_mh_header_bg_position',
        'viral_express_mh_header_bg_attach' => 'viral_express_mh_header_bg_attach',
        'viral_express_mh_header_bg_color' => 'viral_express_mh_header_bg_color',
        'viral_express_mh_button_color' => 'viral_express_mh_button_color',
        'viral_express_mh_bg_color' => 'viral_express_mh_bg_color',
        'viral_express_mh_bg_color_mobile' => 'viral_express_mh_bg_color_mobile',
        'viral_express_toggle_button_color' => 'viral_express_toggle_button_color',
        'viral_express_mh_border' => 'viral_express_mh_border',
        'viral_express_mh_border_color' => 'viral_express_mh_border_color',
        'viral_express_mh_menu_color' => 'viral_express_mh_menu_color',
        'viral_express_mh_menu_hover_color' => 'viral_express_mh_menu_hover_color',
        'viral_express_mh_submenu_bg_color' => 'viral_express_mh_submenu_bg_color',
        'viral_express_mh_submenu_color' => 'viral_express_mh_submenu_color',
        'viral_express_mh_submenu_hover_color' => 'viral_express_mh_submenu_hover_color',
        'viral_express_menu_dropdown_padding' => 'viral_express_menu_dropdown_padding',
        'viral_express_responsive_width' => 'viral_express_responsive_width',
        'viral_express_menu_family' => 'menu_font_family',
        'viral_express_menu_style' => 'menu_font_style',
        'viral_express_menu_text_decoration' => 'menu_text_decoration',
        'viral_express_menu_text_transform' => 'menu_text_transform',
        'viral_express_menu_size' => 'menu_font_size',
        'viral_express_menu_line_height' => 'menu_line_height',
        'viral_express_menu_letter_spacing' => 'menu_letter_spacing',
        'viral_express_show_title' => 'viral_express_show_title',
        'viral_express_breadcrumb' => 'viral_express_breadcrumb',
        'viral_express_page_title_family' => 'page_title_font_family',
        'viral_express_page_title_style' => 'page_title_font_style',
        'viral_express_page_title_text_decoration' => 'page_title_text_decoration',
        'viral_express_page_title_text_transform' => 'page_title_text_transform',
        'viral_express_page_title_size' => 'page_title_font_size',
        'viral_express_page_title_line_height' => 'page_title_line_height',
        'viral_express_page_title_letter_spacing' => 'page_title_letter_spacing',
        'viral_express_page_title_color' => 'page_title_color',
        'viral_express_sticky_sidebar' => 'viral_express_sticky_sidebar',
        'viral_express_page_layout' => 'viral_express_page_layout',
        'viral_express_post_layout' => 'viral_express_post_layout',
        'viral_express_archive_layout' => 'viral_express_archive_layout',
        'viral_express_home_blog_layout' => 'viral_express_home_blog_layout',
        'viral_express_search_layout' => 'viral_express_search_layout',
        'viral_express_shop_layout' => 'viral_express_shop_layout',
        'viral_express_sidebar_title_family' => 'sidebar_title_font_family',
        'viral_express_sidebar_title_style' => 'sidebar_title_font_style',
        'viral_express_sidebar_title_text_decoration' => 'sidebar_title_text_decoration',
        'viral_express_sidebar_title_text_transform' => 'sidebar_title_text_transform',
        'viral_express_sidebar_title_size' => 'sidebar_title_font_size',
        'viral_express_sidebar_title_line_height' => 'sidebar_title_line_height',
        'viral_express_sidebar_title_letter_spacing' => 'sidebar_title_letter_spacing',
        'viral_express_sidebar_style' => 'viral_express_sidebar_style',
        'viral_express_content_widget_title_color' => 'viral_express_content_widget_title_color',
        'viral_express_social_icons' => 'viral_express_social_icons',
        'viral_express_body_family' => 'body_font_family',
        'viral_express_body_style' => 'body_font_style',
        'viral_express_body_text_decoration' => 'body_text_decoration',
        'viral_express_body_text_transform' => 'body_text_transform',
        'viral_express_body_size' => 'body_font_size',
        'viral_express_body_line_height' => 'body_line_height',
        'viral_express_body_letter_spacing' => 'body_letter_spacing',
        'viral_express_body_color' => 'body_color',
        'viral_express_common_header_typography' => 'common_header_typography',
        'viral_express_h_family' => 'h_font_family',
        'viral_express_h_style' => 'h_font_style',
        'viral_express_h_text_decoration' => 'h_text_decoration',
        'viral_express_h_text_transform' => 'h_text_transform',
        'viral_express_h_line_height' => 'h_line_height',
        'viral_express_h_letter_spacing' => 'h_letter_spacing',
        'viral_express_hh1_size' => 'hh1_font_size',
        'viral_express_hh2_size' => 'hh2_font_size',
        'viral_express_hh3_size' => 'hh3_font_size',
        'viral_express_hh4_size' => 'hh4_font_size',
        'viral_express_hh5_size' => 'hh5_font_size',
        'viral_express_hh6_size' => 'hh6_font_size',
        'viral_express_h1_family' => 'h1_font_family',
        'viral_express_h1_style' => 'h1_font_style',
        'viral_express_h1_text_decoration' => 'h1_text_decoration',
        'viral_express_h1_text_transform' => 'h1_text_transform',
        'viral_express_h1_size' => 'h1_font_size',
        'viral_express_h1_line_height' => 'h1_line_height',
        'viral_express_h1_letter_spacing' => 'h1_letter_spacing',
        'viral_express_h2_family' => 'h2_font_family',
        'viral_express_h2_style' => 'h2_font_style',
        'viral_express_h2_text_decoration' => 'h2_text_decoration',
        'viral_express_h2_text_transform' => 'h2_text_transform',
        'viral_express_h2_size' => 'h2_font_size',
        'viral_express_h2_line_height' => 'h2_line_height',
        'viral_express_h2_letter_spacing' => 'h2_letter_spacing',
        'viral_express_h3_family' => 'h3_font_family',
        'viral_express_h3_style' => 'h3_font_style',
        'viral_express_h3_text_decoration' => 'h3_text_decoration',
        'viral_express_h3_text_transform' => 'h3_text_transform',
        'viral_express_h3_size' => 'h3_font_size',
        'viral_express_h3_line_height' => 'h3_line_height',
        'viral_express_h3_letter_spacing' => 'h3_letter_spacing',
        'viral_express_h4_family' => 'h4_font_family',
        'viral_express_h4_style' => 'h4_font_style',
        'viral_express_h4_text_decoration' => '4_text_decoration',
        'viral_express_h4_text_transform' => 'h4_text_transform',
        'viral_express_h4_size' => 'h4_font_size',
        'viral_express_h4_line_height' => 'h4_line_height',
        'viral_express_h4_letter_spacing' => 'h4_letter_spacing',
        'viral_express_h5_family' => 'h5_font_family',
        'viral_express_h5_style' => 'h5_font_style',
        'viral_express_h5_text_decoration' => 'h5_text_decoration',
        'viral_express_h5_text_transform' => 'h5_text_transform',
        'viral_express_h5_size' => 'h5_font_size',
        'viral_express_h5_line_height' => 'h5_line_height',
        'viral_express_h5_letter_spacing' => 'h5_letter_spacing',
        'viral_express_h6_family' => 'h6_font_family',
        'viral_express_h6_style' => 'h6_font_style',
        'viral_express_h6_text_decoration' => 'h6_text_decoration',
        'viral_express_h6_text_transform' => 'h6_text_transform',
        'viral_express_h6_size' => 'h6_font_size',
        'viral_express_h6_line_height' => 'h6_line_height',
        'viral_express_h6_letter_spacing' => 'h6_letter_spacing',
        'viral_express_frontpage_block_title_family' => 'frontpage_block_title_font_family',
        'viral_express_frontpage_block_title_style' => 'frontpage_block_title_font_style',
        'viral_express_frontpage_block_title_text_decoration' => 'frontpage_block_title_text_decoration',
        'viral_express_frontpage_block_title_text_transform' => 'frontpage_block_title_text_transform',
        'viral_express_frontpage_block_title_size' => 'frontpage_block_title_font_size',
        'viral_express_frontpage_block_title_line_height' => 'frontpage_block_title_line_height',
        'viral_express_frontpage_block_title_letter_spacing' => 'frontpage_block_title_letter_spacing',
        'viral_express_frontpage_title_family' => 'frontpage_title_font_family',
        'viral_express_frontpage_title_style' => 'frontpage_title_font_style',
        'viral_express_frontpage_title_text_decoration' => 'frontpage_title_text_decoration',
        'viral_express_frontpage_title_text_transform' => 'frontpage_title_text_transform',
        'viral_express_frontpage_title_size' => 'frontpage_title_font_size',
        'viral_express_frontpage_title_line_height' => 'frontpage_title_line_height',
        'viral_express_frontpage_title_letter_spacing' => 'frontpage_title_letter_spacing',
    );

    foreach (viral_express_cat() as $cat_id => $cat_name) {
        $array_map['viral_express_category_' . $cat_id . '_color'] = 'viral_express_category_' . $cat_id . '_color';
    }

    $default = array(
        'viral_express_blog_layout' => 'layout1',
        'viral_express_blog_cat' => '',
        'viral_express_archive_content' => 'excerpt',
        'viral_express_archive_excerpt_length' => 100,
        'viral_express_archive_readmore' => 'Read More',
        'viral_express_blog_date' => true,
        'viral_express_blog_author' => true,
        'viral_express_blog_comment' => true,
        'viral_express_blog_category' => true,
        'viral_express_blog_tag' => true,
        'viral_express_single_layout' => 'layout1',
        'viral_express_single_categories' => true,
        'viral_express_single_author' => true,
        'viral_express_single_date' => true,
        'viral_express_single_comment_count' => true,
        'viral_express_single_tags' => true,
        'viral_express_single_author_box' => true,
        'viral_express_single_prev_next_post' => true,
        'viral_express_single_comments' => true,
        'viral_express_template_color' => '#cf0701',
        'viral_express_content_header_color' => '#000000',
        'viral_express_content_text_color' => '#333333',
        'viral_express_content_link_color' => '#000000',
        'viral_express_content_link_hov_color' => '#cf0701',
        'viral_express_website_layout' => 'wide',
        'viral_express_fluid_container_width' => 80,
        'viral_express_wide_container_width' => 1170,
        'viral_express_container_padding' => 80,
        'viral_express_sidebar_width' => 30,
        'viral_express_backtotop' => true,
        'viral_express_load_google_font_locally' => false,
        'viral_express_hide_title' => false,
        'viral_express_hide_tagline' => false,
        'viral_express_tagline_position' => 'vm-tagline-inline-logo',
        'viral_express_title_color' => '#333333',
        'viral_express_logo_height' => 60,
        'viral_express_logo_padding' => 15,
        'viral_express_top_header' => 'on',
        'viral_express_th_disable_mobile' => false,
        'viral_express_th_left_display' => 'date',
        'viral_express_th_right_display' => 'social',
        'viral_express_th_menu' => 'none',
        'viral_express_th_widget' => 'none',
        'viral_express_th_text' => 'California, TX 70240 | (1800) 456 7890',
        'viral_express_th_height' => 45,
        'viral_express_th_bottom_border_color' => '',
        'viral_express_th_bg_color' => '#cf0701',
        'viral_express_th_text_color' => '#FFFFFF',
        'viral_express_th_anchor_color' => '#EEEEEE',
        'viral_express_sticky_header' => 'off',
        'viral_express_mh_layout' => 'header-style2',
        'viral_express_mh_show_search' => true,
        'viral_express_mh_show_cart' => false,
        'viral_express_mh_show_social' => false,
        'viral_express_mh_show_offcanvas' => true,
        'viral_express_mh_header_bg_url' => '',
        'viral_express_mh_header_bg_id' => '',
        'viral_express_mh_header_bg_repeat' => 'no-repeat',
        'viral_express_mh_header_bg_size' => 'cover',
        'viral_express_mh_header_bg_position' => 'center-center',
        'viral_express_mh_header_bg_attach' => 'scroll',
        'viral_express_mh_header_bg_color' => '',
        'viral_express_mh_button_color' => '#000000',
        'viral_express_mh_bg_color' => '#cf0701',
        'viral_express_mh_bg_color_mobile' => '#cf0701',
        'viral_express_toggle_button_color' => '#FFFFFF',
        'viral_express_mh_border' => 'vm-no-border',
        'viral_express_mh_border_color' => '#EEEEEE',
        'viral_express_mh_menu_color' => '#FFFFFF',
        'viral_express_mh_menu_hover_color' => '#FFFFFF',
        'viral_express_mh_submenu_bg_color' => '#F2F2F2',
        'viral_express_mh_submenu_color' => '#333333',
        'viral_express_mh_submenu_hover_color' => '#333333',
        'viral_express_menu_dropdown_padding' => 12,
        'viral_express_responsive_width' => 780,
        'viral_express_menu_family' => 'Poppins',
        'viral_express_menu_style' => '400',
        'viral_express_menu_text_decoration' => 'none',
        'viral_express_menu_text_transform' => 'uppercase',
        'viral_express_menu_size' => '14',
        'viral_express_menu_line_height' => '3',
        'viral_express_menu_letter_spacing' => '0',
        'viral_express_show_title' => true,
        'viral_express_breadcrumb' => true,
        'viral_express_page_title_family' => 'Poppins',
        'viral_express_page_title_style' => '400',
        'viral_express_page_title_text_decoration' => 'none',
        'viral_express_page_title_text_transform' => 'none',
        'viral_express_page_title_size' => '40',
        'viral_express_page_title_line_height' => '1.3',
        'viral_express_page_title_letter_spacing' => '0',
        'viral_express_page_title_color' => '#333333',
        'viral_express_sticky_sidebar' => true,
        'viral_express_page_layout' => 'right-sidebar',
        'viral_express_post_layout' => 'right-sidebar',
        'viral_express_archive_layout' => 'right-sidebar',
        'viral_express_home_blog_layout' => 'right-sidebar',
        'viral_express_search_layout' => 'right-sidebar',
        'viral_express_shop_layout' => 'right-sidebar',
        'viral_express_sidebar_title_family' => 'Poppins',
        'viral_express_sidebar_title_style' => '500',
        'viral_express_sidebar_title_text_decoration' => 'none',
        'viral_express_sidebar_title_text_transform' => 'uppercase',
        'viral_express_sidebar_title_size' => '18',
        'viral_express_sidebar_title_line_height' => '1.3',
        'viral_express_sidebar_title_letter_spacing' => '0',
        'viral_express_sidebar_style' => 'sidebar-style2',
        'viral_express_content_widget_title_color' => '#000000',
        'viral_express_footer_col' => 'col-3-1-1-1',
        'viral_express_footer_bg_url' => '',
        'viral_express_footer_bg_id' => '',
        'viral_express_footer_bg_repeat' => 'no-repeat',
        'viral_express_footer_bg_size' => 'cover',
        'viral_express_footer_bg_position' => 'center-center',
        'viral_express_footer_bg_attach' => 'scroll',
        'viral_express_footer_bg_color' => '#333333',
        'viral_express_footer_title_color' => '#EEEEEE',
        'viral_express_footer_border_color' => '#444444',
        'viral_express_footer_text_color' => '#EEEEEE',
        'viral_express_footer_anchor_color' => '#EEEEEE',
        'viral_express_footer_copyright' => '© 2025. All Rights Reserved.',
        'viral_express_social_icons' => '[{"icon":"icofont-facebook","link":"#","enable":"yes"},{"icon":"icofont-x-twitter","link":"#","enable":"yes"},{"icon":"icofont-instagram","link":"#","enable":"yes"},{"icon":"icofont-youtube","link":"#","enable":"yes"}]',
        'viral_express_body_family' => 'Poppins',
        'viral_express_body_style' => '400',
        'viral_express_body_text_decoration' => 'none',
        'viral_express_body_text_transform' => 'none',
        'viral_express_body_size' => '15',
        'viral_express_body_line_height' => '1.6',
        'viral_express_body_letter_spacing' => '0',
        'viral_express_body_color' => '#333333',
        'viral_express_common_header_typography' => true,
        'viral_express_h_family' => 'Poppins',
        'viral_express_h_style' => '400',
        'viral_express_h_text_decoration' => 'none',
        'viral_express_h_text_transform' => 'none',
        'viral_express_h_line_height' => '1.3',
        'viral_express_h_letter_spacing' => '0',
        'viral_express_hh1_size' => 38,
        'viral_express_hh2_size' => 34,
        'viral_express_hh3_size' => 30,
        'viral_express_hh4_size' => 26,
        'viral_express_hh5_size' => 22,
        'viral_express_hh6_size' => 18,
        'viral_express_h1_family' => 'Poppins',
        'viral_express_h1_style' => '400',
        'viral_express_h1_text_decoration' => 'none',
        'viral_express_h1_text_transform' => 'none',
        'viral_express_h1_size' => '38',
        'viral_express_h1_line_height' => '1.3',
        'viral_express_h1_letter_spacing' => '0',
        'viral_express_h2_family' => 'Poppins',
        'viral_express_h2_style' => '400',
        'viral_express_h2_text_decoration' => 'none',
        'viral_express_h2_text_transform' => 'none',
        'viral_express_h2_size' => '34',
        'viral_express_h2_line_height' => '1.3',
        'viral_express_h2_letter_spacing' => '0',
        'viral_express_h3_family' => 'Poppins',
        'viral_express_h3_style' => '400',
        'viral_express_h3_text_decoration' => 'none',
        'viral_express_h3_text_transform' => 'none',
        'viral_express_h3_size' => '30',
        'viral_express_h3_line_height' => '1.3',
        'viral_express_h3_letter_spacing' => '0',
        'viral_express_h4_family' => 'Poppins',
        'viral_express_h4_style' => '400',
        'viral_express_h4_text_decoration' => 'none',
        'viral_express_h4_text_transform' => 'none',
        'viral_express_h4_size' => '26',
        'viral_express_h4_line_height' => '1.3',
        'viral_express_h4_letter_spacing' => '0',
        'viral_express_h5_family' => 'Poppins',
        'viral_express_h5_style' => '400',
        'viral_express_h5_text_decoration' => 'none',
        'viral_express_h5_text_transform' => 'none',
        'viral_express_h5_size' => '22',
        'viral_express_h5_line_height' => '1.3',
        'viral_express_h5_letter_spacing' => '0',
        'viral_express_h6_family' => 'Poppins',
        'viral_express_h6_style' => '400',
        'viral_express_h6_text_decoration' => 'none',
        'viral_express_h6_text_transform' => 'none',
        'viral_express_h6_size' => '18',
        'viral_express_h6_line_height' => '1.3',
        'viral_express_h6_letter_spacing' => '0',
        'viral_express_frontpage_block_title_family' => 'Poppins',
        'viral_express_frontpage_block_title_style' => '500',
        'viral_express_frontpage_block_title_text_decoration' => 'none',
        'viral_express_frontpage_block_title_text_transform' => 'uppercase',
        'viral_express_frontpage_block_title_size' => '20',
        'viral_express_frontpage_block_title_line_height' => '1.1',
        'viral_express_frontpage_block_title_letter_spacing' => '0',
        'viral_express_frontpage_title_family' => 'Poppins',
        'viral_express_frontpage_title_style' => '500',
        'viral_express_frontpage_title_text_decoration' => 'none',
        'viral_express_frontpage_title_text_transform' => 'capitalize',
        'viral_express_frontpage_title_size' => '16',
        'viral_express_frontpage_title_line_height' => '1.3',
        'viral_express_frontpage_title_letter_spacing' => '0',
    );

    foreach (viral_express_cat() as $cat_id => $cat_name) {
        $default['viral_express_category_' . $cat_id . '_color'] = '';
    }

    if ($viral_express_mods) {
        foreach ($array_map as $viral_express_key => $viral_express_key) {
            $viral_express_value = isset($viral_express_mods[$viral_express_key]) ? $viral_express_mods[$viral_express_key] : (isset($default[$viral_express_key]) ? $default[$viral_express_key] : null);
            if ($viral_express_key == 'viral_express_tagline_position' || $viral_express_key == 'viral_express_mh_border') {
                $viral_express_value = str_replace('vm-', 'ht-', $viral_express_value);
            } else if ($viral_express_key == 'viral_express_social_icons') {
                $viral_express_value = str_replace('yes', 'on', $viral_express_value);
            }
            set_theme_mod($viral_express_key, $viral_express_value);
        }

        $new_widget = array();
        foreach ($viral_express_mods['sidebars_widgets']['data'] as $widget_id => $widget) {
            $new_widget[str_replace('viral-mag', 'viral-express', $widget_id)] = $widget;
        }

        update_option('sidebars_widgets', $new_widget);
    }

    if (did_action('elementor/loaded')) {
        \Elementor\Plugin::instance()->files_manager->clear_cache();
    }

    set_theme_mod('viral_express_is_setting_transferred', true);
}
