<?php



/*  ---------------------------------------------------------------------------- 
	CATEGORIES
*/
$cat_athletics_id = td_demo_category::add_category(array(
	'category_name' => 'ورزشکار',
	'parent_id' => 0,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_cycling_id = td_demo_category::add_category(array(
	'category_name' => 'دوچرخه سواری',
	'parent_id' => 0,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_featured_id = td_demo_category::add_category(array(
	'category_name' => 'ویژه',
	'parent_id' => 0,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_football_id = td_demo_category::add_category(array(
	'category_name' => 'فوتبال',
	'parent_id' => 0,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_formula_1_id = td_demo_category::add_category(array(
	'category_name' => 'فرمول یک',
	'parent_id' => 0,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_gossip_id = td_demo_category::add_category(array(
	'category_name' => 'شایعات',
	'parent_id' => $cat_football_id,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_leagues_cups_id = td_demo_category::add_category(array(
	'category_name' => 'لیگ‌ها و جام‌ها',
	'parent_id' => $cat_football_id,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));

$cat_womens_id = td_demo_category::add_category(array(
	'category_name' => 'بانوان',
	'parent_id' => $cat_football_id,
	'category_template' => '',
	'top_posts_style' => '',
	'description' => '',
	'background_td_pic_id' => '',
	'boxed_layout' => 'hide',
	'sidebar_id' => '',
	'tdc_layout' => '', //THE MODULE ID 1 2 3 NO NAME JUST ID 
	'tdc_sidebar_pos' => '', //sidebar_left, sidebar_right, no_sidebar 
));


/*  ---------------------------------------------------------------------------- 
	ATTACHMMENTS
*/

/*  ---------------------------------------------------------------------------- 
	POSTS
*/
$post_td_post_froome_close_to_return_after_crash_id = td_demo_content::add_post(array(
	'title' => 'خرید هاست و دامنه مطمئن از میهن گیگ',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_1',
	'categories_id_array' => array($cat_cycling_id,),
));

$post_td_post_the_cyclist_who_turns_pain_into_triumph_id = td_demo_content::add_post(array(
	'title' => 'در زمان آلودگی هوا چه چیزهایی بخوریم؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_2',
	'categories_id_array' => array($cat_cycling_id,),
));

$post_td_post_wrong_to_use_rio_experience_as_guide_for_tokyo_id = td_demo_content::add_post(array(
	'title' => 'اندروید 8 برای گوشی HTC U11 Life عرضه شد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_3',
	'categories_id_array' => array($cat_cycling_id,),
));

$post_td_post_koren_and_bozic_banned_for_two_years_id = td_demo_content::add_post(array(
	'title' => 'آیفون 10 به این زودی‌ها از رده خارج نمی‌شود',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_4',
	'categories_id_array' => array($cat_cycling_id,),
));

$post_td_post_simmons_wins_mens_junior_road_title_id = td_demo_content::add_post(array(
	'title' => 'گوشی Nova 2S به‌زودی معرفی می‌شود',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_5',
	'categories_id_array' => array($cat_cycling_id,),
));

$post_td_post_mollema_captures_tour_of_lombardy_id = td_demo_content::add_post(array(
	'title' => 'بهترین گوشی‌های اندرویدی برای عکاسی',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_6',
	'categories_id_array' => array($cat_cycling_id,),
));

$post_td_post_do_you_know_these_sporting_records_id = td_demo_content::add_post(array(
	'title' => 'نسخه نهایی مایکروسافت اج برای اندروید منتشر شد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_7',
	'categories_id_array' => array($cat_athletics_id,),
));

$post_td_post_hughes_flying_high_on_and_off_the_track_id = td_demo_content::add_post(array(
	'title' => 'محیط‌ زیستی به سبک گربه‌های اشرافی',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_8',
	'categories_id_array' => array($cat_athletics_id,),
));

$post_td_post_usain_bolt_the_race_that_shook_the_world_id = td_demo_content::add_post(array(
	'title' => 'چه چیز جایگزین گوشی هوشمند خواهد شد؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_9',
	'categories_id_array' => array($cat_athletics_id,),
));

$post_td_post_the_inside_story_of_salazars_downfall_id = td_demo_content::add_post(array(
	'title' => 'نگاهی به خودروهای جدید بورگوارد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_10',
	'categories_id_array' => array($cat_athletics_id,),
));

$post_td_post_kosgei_shatters_womens_marathon_record_id = td_demo_content::add_post(array(
	'title' => 'چرا گوشی ریزر جک هدفون ندارد؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_1',
	'categories_id_array' => array($cat_athletics_id,),
));

$post_td_post_kipchoge_breaks_two_hour_marathon_mark_id = td_demo_content::add_post(array(
	'title' => 'با ویژگی جدید اینستاگرام آشنا شوید',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_2',
	'categories_id_array' => array($cat_athletics_id,),
));

$post_td_post_ferraris_vettel_leclerc_say_dispute_is_over_id = td_demo_content::add_post(array(
	'title' => 'نگاهی به فولکس تیگوان',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_3',
	'categories_id_array' => array($cat_formula_1_id,),
));

$post_td_post_for_leclerc_success_comes_with_a_darker_side_id = td_demo_content::add_post(array(
	'title' => 'اپل 15 میلیون آیفون 10 فروخته است',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_4',
	'categories_id_array' => array($cat_formula_1_id,),
));

$post_td_post_bottas_wins_in_japan_and_mercedes_sixth_title_id = td_demo_content::add_post(array(
	'title' => 'آنر V10 رسما معرفی شد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_5',
	'categories_id_array' => array($cat_formula_1_id,),
));

$post_td_post_bottas_gets_ahead_of_vettel_off_the_line_id = td_demo_content::add_post(array(
	'title' => 'هوش مصنوعی گوگل مچ مزاحم‌ها را می‌گیرد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_6',
	'categories_id_array' => array($cat_formula_1_id,),
));

$post_td_post_mercedes_gain_greatest_label_id = td_demo_content::add_post(array(
	'title' => 'ممکن است معده‌ی کسی از پرخوری بترکد؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_7',
	'categories_id_array' => array($cat_formula_1_id,),
));

$post_td_post_how_florsch_came_back_from_her_170mph_crash_id = td_demo_content::add_post(array(
	'title' => 'باکس‌آفیس در تصاحب پیکسار',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_8',
	'categories_id_array' => array($cat_formula_1_id,),
));

$post_td_post_james_player_of_match_before_being_sent_off_id = td_demo_content::add_post(array(
	'title' => 'هواوی گوشی میت 10 را در ایران رونمایی کرد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_9',
	'categories_id_array' => array($cat_womens_id,),
));

$post_td_post_thomas_shines_as_west_ham_beat_brighton_id = td_demo_content::add_post(array(
	'title' => 'نگاهی به فولکس پاسات',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_10',
	'categories_id_array' => array($cat_womens_id,),
));

$post_td_post_who_will_win_the_womens_super_league_id = td_demo_content::add_post(array(
	'title' => 'HTC U11 به اندروید 8.0 بروزرسانی شد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_1',
	'categories_id_array' => array($cat_womens_id,),
));

$post_td_post_theres_a_lot_more_to_life_than_football_id = td_demo_content::add_post(array(
	'title' => 'اپل گوشی یا تبلت با نمایشگر تاشو می‌سازد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_2',
	'categories_id_array' => array($cat_womens_id,),
));

$post_td_post_manchester_united_win_handsomely_at_spurs_id = td_demo_content::add_post(array(
	'title' => 'گوگل اپلیکیشن‌هایش را برای آیفون 10 به‌روز کرد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_3',
	'categories_id_array' => array($cat_womens_id,),
));

$post_td_post_chelsea_comeback_ends_arsenals_unbeaten_run_id = td_demo_content::add_post(array(
	'title' => '5+1 تصمیم برتر در بازی‌های ویدیویی',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_4',
	'categories_id_array' => array($cat_womens_id,),
));

$post_td_post_how_england_players_rated_in_bulgaria_id = td_demo_content::add_post(array(
	'title' => 'گوشی اوپو A79 معرفی شد',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_5',
	'categories_id_array' => array($cat_leagues_cups_id,),
));

$post_td_post_spain_wanted_benitez_at_world_cup_2_id = td_demo_content::add_post(array(
	'title' => 'فایرفاکس کوانتوم یا گوگل کروم؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_6',
	'categories_id_array' => array($cat_leagues_cups_id,),
));

$post_td_post_neymar_limps_off_as_brazil_held_by_nigeria_id = td_demo_content::add_post(array(
	'title' => 'آیا مایکروسافت به سمت اندروید می‌رود؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_7',
	'categories_id_array' => array($cat_leagues_cups_id,),
));

$post_td_post_goalkeeper_vorm_rejoins_tottenham_id = td_demo_content::add_post(array(
	'title' => 'تبلت Surface Pro 3 ارزان می‌شود',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_8',
	'categories_id_array' => array($cat_leagues_cups_id,),
));

$post_td_post_football_suspended_in_catalonia_id = td_demo_content::add_post(array(
	'title' => 'با تبلت جدید هوآوی آشنا شوید',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_9',
	'categories_id_array' => array($cat_leagues_cups_id,),
));

$post_td_post_ronaldo_scores_700th_career_goal_id = td_demo_content::add_post(array(
	'title' => 'پدیده‌ای به نام «اسکرین‌شات»',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_10',
	'categories_id_array' => array($cat_leagues_cups_id,),
));

$post_td_post_christian_eriksen_wants_real_madrid_move_in_summer_id = td_demo_content::add_post(array(
	'title' => 'نکسوس بعدی بر اساس LG G4 نخواهد بود',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_1',
	'categories_id_array' => array($cat_gossip_id,),
));

$post_td_post_spain_wanted_benitez_at_world_cup_id = td_demo_content::add_post(array(
	'title' => 'مایکروسافت درحال خرید AMD',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_2',
	'categories_id_array' => array($cat_gossip_id,),
));

$post_td_post_investor_can_get_leeds_up_to_level_of_man_city_id = td_demo_content::add_post(array(
	'title' => 'عبور تاریخی از نقطه‌ی بی‌بازگشت',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_3',
	'categories_id_array' => array($cat_gossip_id,),
));

$post_td_post_olivier_giroud_cannot_accept_frank_lampard_snub_id = td_demo_content::add_post(array(
	'title' => 'چرا آدرس‌های اینترنتی به زبان انگلیسی هستند؟',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_4',
	'categories_id_array' => array($cat_gossip_id,),
));

$post_td_post_tottenham_keeps_bruno_fernandes_under_the_eye_id = td_demo_content::add_post(array(
	'title' => 'بازی مافیا 3 در راه است',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_5',
	'categories_id_array' => array($cat_gossip_id,),
));

$post_td_post_man_utd_reach_verbal_agreement_with_mario_mandzukic_id = td_demo_content::add_post(array(
	'title' => 'دوازده ترفند عمومی اندروید',
	'file' => 'post_default.txt',
	'featured_image_td_id' => 'td_pic_6',
	'categories_id_array' => array($cat_gossip_id,),
));


/*  ---------------------------------------------------------------------------- 
	MENUS
*/
$menu_td_demo_header_menu_id = td_demo_menus::create_menu('td-demo-header-menu', '');
$menu_td_demo_custom_menu_id = td_demo_menus::create_menu('td-demo-custom-menu', '');


/*  ----------------------------------------------------------------------------
	CLOUD TEMPLATES
*/
$template_tag_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب برچسب',
    'file' => 'tag_cloud_template.txt',
    'template_type' => 'tag',
));

td_demo_misc::update_global_tag_template( 'tdb_template_' . $template_tag_template_id);


$template_date_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب تاریخ',
    'file' => 'date_cloud_template.txt',
    'template_type' => 'date',
));

td_demo_misc::update_global_date_template( 'tdb_template_' . $template_date_template_id);


$template_404_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب 404',
    'file' => '404_cloud_template.txt',
    'template_type' => '404',
));

td_demo_misc::update_global_404_template( 'tdb_template_' . $template_404_template_id);


$template_search_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب جستجو',
    'file' => 'search_cloud_template.txt',
    'template_type' => 'search',
));

td_demo_misc::update_global_search_template( 'tdb_template_' . $template_search_template_id);


$template_author_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب نویسنده',
    'file' => 'author_cloud_template.txt',
    'template_type' => 'author',
));

td_demo_misc::update_global_author_template( 'tdb_template_' . $template_author_template_id);


$template_category_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب دسته‌بندی',
    'file' => 'cat_cloud_template.txt',
    'template_type' => 'category',
));

td_demo_misc::update_global_category_template( 'tdb_template_' . $template_category_template_id);


$template_header_template_normal_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب هدر - نرمال',
    'file' => 'header_normal_cloud_template.txt',
    'template_type' => 'header',
));
td_demo_misc::update_global_header_template( 'tdb_template_' . $template_header_template_normal_id);
//update mobile menu id in cloud header template
update_post_meta( $template_header_template_normal_id, 'header_mobile_menu_id', $menu_td_demo_header_menu_id );


$template_header_template_overlay_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب هدر - پوششی',
    'file' => 'header_overlay_cloud_template.txt',
    'template_type' => 'header',
));
//update mobile menu id in cloud header template
update_post_meta( $template_header_template_overlay_id, 'header_mobile_menu_id', $menu_td_demo_header_menu_id );


$template_single_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب نوشته',
    'file' => 'post_cloud_template.txt',
    'template_type' => 'single',
));

td_util::update_option('td_default_site_post_template', 'tdb_template_' . $template_single_template_id);


$template_footer_template_id = td_demo_content::add_cloud_template(array(
    'title' => 'قالب فوتر',
    'file' => 'footer_cloud_template.txt',
    'template_type' => 'footer',
));

td_demo_misc::update_global_footer_template('tdb_template_' . $template_footer_template_id);


/*  ----------------------------------------------------------------------------
	PAGES
*/
$page_football_menu_page_id = td_demo_content::add_page(array(
    'title' => 'برگه منو فوتبال',
    'file' => 'football_menu_page.txt',
));

$page_home_id = td_demo_content::add_page(array(
    'title' => 'صفحه اصلی',
    'file' => 'home.txt',
    'homepage' => true,
    'header_template_id' => $template_header_template_overlay_id
));


/*  ---------------------------------------------------------------------------- 
	MENUS ITEMS
*/
$menu_item_0_id = td_demo_menus::add_page(array(
	'title' => 'صفحه اصلی',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'page_id' => $page_home_id,
	'parent_id' => ''
));

$menu_item_1_id = td_demo_menus::add_category(array(
	'title' => 'فوتبال',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_football_id,
	'parent_id' => ''
));

$menu_item_2_id = td_demo_menus::add_category(array(
	'title' => 'شایعات',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_gossip_id,
	'parent_id' => $menu_item_1_id
));

$menu_item_3_id = td_demo_menus::add_category(array(
	'title' => 'لیگ‌ها و جام‌ها',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_leagues_cups_id,
	'parent_id' => $menu_item_1_id
));

$menu_item_4_id = td_demo_menus::add_category(array(
	'title' => 'بانوان',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_womens_id,
	'parent_id' => $menu_item_1_id
));

$menu_item_5_id = td_demo_menus::add_category(array(
	'title' => 'فرمول یک',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_formula_1_id,
	'parent_id' => ''
));

$menu_item_6_id = td_demo_menus::add_category(array(
	'title' => 'ورزشکار',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_athletics_id,
	'parent_id' => ''
));

$menu_item_7_id = td_demo_menus::add_category(array(
	'title' => 'دوچرخه سواری',
	'add_to_menu_id' => $menu_td_demo_custom_menu_id,
	'category_id' => $cat_cycling_id,
	'parent_id' => ''
));


/*  ---------------------------------------------------------------------------- 
	MENUS ITEMS
*/
$menu_item_0_id = td_demo_menus::add_page(array(
	'title' => 'صفحه اصلی',
	'add_to_menu_id' => $menu_td_demo_header_menu_id,
	'page_id' => $page_home_id,
	'parent_id' => ''
));

$menu_item_1_id = td_demo_menus::add_category(array(
	'title' => 'فوتبال',
	'add_to_menu_id' => $menu_td_demo_header_menu_id,
	'category_id' => $cat_football_id,
	'parent_id' => ''
));

$menu_item_2_id = td_demo_menus::add_mega_menu(array(
	'title' => 'فرمول یک',
	'add_to_menu_id' => $menu_td_demo_header_menu_id,
	'category_id' => $cat_formula_1_id,
	'parent_id' => ''
));

$menu_item_3_id = td_demo_menus::add_mega_menu(array(
	'title' => 'ورزشکار',
	'add_to_menu_id' => $menu_td_demo_header_menu_id,
	'category_id' => $cat_athletics_id,
	'parent_id' => ''
));

$menu_item_4_id = td_demo_menus::add_mega_menu(array(
	'title' => 'دوچرخه سواری',
	'add_to_menu_id' => $menu_td_demo_header_menu_id,
	'category_id' => $cat_cycling_id,
	'parent_id' => ''
));





/*  ---------------------------------------------------------------------------- 
	GENERAL SETTINGS
*/
td_util::update_option('tds_footer_page', $template_footer_template_id);

td_demo_misc::update_background('', false);

td_demo_misc::update_background_mobile('');

td_demo_misc::update_background_login('');

td_demo_misc::update_background_header('');

td_demo_misc::update_background_footer('');

td_demo_misc::update_footer_text('');

td_demo_misc::update_logo(array('normal' => '','retina' => '','mobile' => '',));

td_demo_misc::update_footer_logo(array('normal' => '','retina' => '',));

td_demo_misc::add_social_buttons(array());
