示例#1
0
 */
//homepage
$td_homepage_id = td_demo_content::add_page(array('title' => 'Home', 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/homepage.txt', 'template' => 'page.php', 'td_layout' => '', 'homepage' => true));
$td_blog_id = td_demo_content::add_page(array('title' => 'Travel blog', 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/travel-blog.txt', 'template' => 'page-pagebuilder-latest.php', 'td_layout' => '12', 'homepage' => false));
/*  ----------------------------------------------------------------------------
    menu
 */
//add the homepage to the menu
td_demo_menus::add_page(array('title' => 'Start here', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_id, 'parent_id' => ''));
td_demo_menus::add_page(array('title' => 'Travel blog', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_blog_id, 'parent_id' => ''));
// mega menu multiple subcateg
td_demo_menus::add_mega_menu(array('title' => 'Destinations', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Trip ideas', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_9_id));
td_demo_menus::add_mega_menu(array('title' => 'Culture', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
td_demo_menus::add_mega_menu(array('title' => 'Guides', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => '8 Incredible Pictures From The Travel Photographer', 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_smart.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_3_id), 'featured_image_td_id' => 'td_pic_1', 'template' => 'single_template_12', 'smart_list' => 'td_smart_list_6'));
td_demo_content::add_post(array('title' => '10 Landscapes You Won’t Have Even Imagined Exist', 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_8'));
td_demo_content::add_post(array('title' => 'Top Most Beautiful Islands In The World', 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_5_id), 'featured_image_td_id' => 'td_pic_3'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "10 Hotels That Are Perfect for Solo Travelers", 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_smart.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_2', 'template' => 'single_template_12', 'smart_list' => 'td_smart_list_7'));
td_demo_content::add_post(array('title' => "Top Reasons to Go to Barcelona", 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_smart.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_4', 'template' => 'single_template_12', 'smart_list' => 'td_smart_list_6'));
td_demo_content::add_post(array('title' => "Paris's 10 Best New Boutiques", 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_smart.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_5', 'template' => 'single_template_12', 'smart_list' => 'td_smart_list_7'));
td_demo_content::add_post(array('title' => "World's 15 Best Summer Music Festivals", 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_smart.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_6', 'template' => 'single_template_12', 'smart_list' => 'td_smart_list_6'));
td_demo_content::add_post(array('title' => "10 Things Not to Do in Bangkok", 'file' => td_global::$get_template_directory . '/includes/demos/travel/pages/post_smart.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_7', 'template' => 'single_template_12', 'smart_list' => 'td_smart_list_6'));
//  ----------------------------------------------------------------------------
//  Mix Cat
示例#2
0
 */
//add the homepage to the menu
td_demo_menus::add_page(array('title' => 'News', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_id, 'parent_id' => ''));
// mega menu multiple subcateg
td_demo_menus::add_mega_menu(array('title' => 'Mobile', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Gadgets', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_6_id));
td_demo_menus::add_mega_menu(array('title' => 'Design', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
td_demo_menus::add_mega_menu(array('title' => 'Photography', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id));
td_demo_menus::add_mega_menu(array('title' => 'Reviews', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_9_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'More', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_category(array('title' => 'Apple', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_10_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Android', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_2_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Windows Phone', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_5_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Iphone', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_4_id, 'parent_id' => $parent_submenu_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'Apple sells 10 million iPhone 6 and iPhone 6 Pluses', 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_3_id), 'featured_image_td_id' => 'td_pic_1', 'template' => 'single_template_6'));
td_demo_content::add_post(array('title' => 'Experiencing the new Oculus Rift VR headset', 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_2', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'Canon XC10 4K Digital Camcorder Is Out: Versatile And For Only $2,500', 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_5_id), 'featured_image_td_id' => 'td_pic_3', 'template' => 'single_template_8'));
td_demo_content::add_post(array('title' => 'Simple form creation and storage, built for developers.', 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_2_id), 'featured_image_td_id' => 'td_pic_4', 'template' => 'single_template_3'));
td_demo_content::add_post(array('title' => "Robots helped inspire deep learning might become", 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_6_id), 'featured_image_td_id' => 'td_pic_13', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "Huawei’s just bought an internet-of-things startup", 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_5', 'template' => ''));
td_demo_content::add_post(array('title' => "Apple Server Most Powerful rack optimized server", 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_4_id), 'featured_image_td_id' => 'td_pic_7', 'template' => 'single_template_8'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "I can’t browse the sites I like at work because company firewall policy is too strict", 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_9'));
td_demo_content::add_post(array('title' => "Client-side vs Server-side Validation in Web Applications", 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_10'));
td_demo_content::add_post(array('title' => "My microwave is too small to fit the microwave popcorn bag", 'file' => td_global::$get_template_directory . '/includes/demos/tech/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_12'));
示例#3
0
    menu
 */
//add the homepage to the menu
td_demo_menus::add_page(array('title' => 'News', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_id, 'parent_id' => ''));
// mega menu multiple subcateg
td_demo_menus::add_mega_menu(array('title' => 'Sport Today', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Tennis', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_6_id));
td_demo_menus::add_mega_menu(array('title' => 'Billiard', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
td_demo_menus::add_mega_menu(array('title' => 'WRC', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id));
td_demo_menus::add_mega_menu(array('title' => 'Video', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_9_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'More', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_category(array('title' => 'Football', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_3_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Golf', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_4_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Horse Racing', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_5_id, 'parent_id' => $parent_submenu_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'Best Sports Bloopers 2015 Funny Sport Fails Compilation', 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_5_id), 'featured_image_td_id' => 'td_pic_3', 'template' => ''));
td_demo_content::add_post(array('title' => 'Best Funny Wins & Fails Compilation February 2015', 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_2_id), 'featured_image_td_id' => 'td_pic_4', 'template' => ''));
td_demo_content::add_post(array('title' => "Kim Kardashian Shows Off Deep Cleavage In Plunging Top & Mini", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_6_id), 'featured_image_td_id' => 'td_pic_13', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "Taylor Swift’s Stylish Separates In Germany – Shop Them Here", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_5', 'template' => ''));
td_demo_content::add_post(array('title' => "Hard time ahead for Hodgson as England start Euro 2016", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_4_id), 'featured_image_td_id' => 'td_pic_7', 'template' => ''));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "Man United skipper again boosted for first goal", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_9'));
td_demo_content::add_post(array('title' => "Albatec Racing Geared-Up For World RX Of France in Europe", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_10'));
td_demo_content::add_post(array('title' => "VIDEO: Neil Simpson impresses at Barum Czech Rally Zlín", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_12'));
td_demo_content::add_post(array('title' => "M-Sport Hits 250 At Happy Hunting Ground", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_1', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "Pedal power sees Amy complete world toughest cycle challenge", 'file' => td_global::$get_template_directory . '/includes/demos/sport/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_3'));
$td_homepage_id = td_demo_content::add_page(array(
    'title' => 'Newseeeeeeeexxxx',
    'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/homepage.txt',
    'template' => 'page-pagebuilder-latest.php',   // the page template full file name with .php
    'homepage' => true,
    'td_layout' => 5
));

die;
*/
if (isset($_GET['puiu_test']) and TD_DEPLOY_MODE == 'dev') {
    // clean the user settings
    //td_demo_media::remove();
    td_demo_content::remove();
    td_demo_category::remove();
    td_demo_menus::remove();
    td_demo_widgets::remove();
    $td_demo_installer = new td_demo_installer();
    // remove panel settings and recompile the css as empty
    foreach (td_global::$td_options as $option_id => $option_value) {
        td_global::$td_options[$option_id] = '';
    }
    //typography settings
    td_global::$td_options['td_fonts'] = '';
    //css font files (google) buffer
    td_global::$td_options['td_fonts_css_files'] = '';
    //compile user css if any
    td_global::$td_options['tds_user_compile_css'] = td_css_generator();
    update_option(TD_THEME_OPTIONS_NAME, td_global::$td_options);
    td_demo_state::update_state($_GET['puiu_test'], 'full');
    // load panel settings
示例#5
0
 */
//add the homepage to the menu
td_demo_menus::add_page(array('title' => 'News', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_id, 'parent_id' => ''));
// mega menu multiple subcateg
td_demo_menus::add_mega_menu(array('title' => 'Fashion Today', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Cosmopolitan', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'Celebrity Style', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_category(array('title' => 'Fashion Shows', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_2_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Lingerie Fashion', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_3_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Milano Trends', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_4_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => "Victoria's Secret", 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_6_id, 'parent_id' => $parent_submenu_id));
// add a category to the menu
td_demo_menus::add_category(array('title' => 'Beauty', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_9_id));
td_demo_menus::add_category(array('title' => 'Street Style', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_10_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'Are You Already Wearing the Hottest Brands in Your City?', 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_3_id), 'featured_image_td_id' => 'td_pic_1', 'template' => 'single_template_6'));
td_demo_content::add_post(array('title' => 'Vintage Fashion: 3 Modern Ways To Shop The Decades', 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_2', 'template' => 'single_template_7'));
td_demo_content::add_post(array('title' => 'Top Stylists Share Their Secrets For RED CARPET', 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_5_id), 'featured_image_td_id' => 'td_pic_3', 'template' => 'single_template_8'));
td_demo_content::add_post(array('title' => 'The True Story About How Fashion Trends Are Born', 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_2_id), 'featured_image_td_id' => 'td_pic_4', 'template' => 'single_template_3'));
td_demo_content::add_post(array('title' => "History of Victoria’s Secret’s Sexiest Angels", 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_6_id), 'featured_image_td_id' => 'td_pic_13', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "The 10 Runway Trends You’ll Be Wearing This Year", 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_5', 'template' => ''));
td_demo_content::add_post(array('title' => "Your Hottest Spring Accessory & Personality", 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_4_id), 'featured_image_td_id' => 'td_pic_7', 'template' => 'single_template_8'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "Cheryl Steals Kate Middleton’s Beauty Icon Status", 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_9'));
td_demo_content::add_post(array('title' => "Alexa Chung and Sofia Vergara Don’t Play by the Red Carpet Rules", 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_10'));
td_demo_content::add_post(array('title' => "The 5 New Watch Trends To Try Now", 'file' => td_global::$get_template_directory . '/includes/demos/fashion/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_12'));
示例#6
0
td_demo_menus::add_page(array('title' => 'News', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_id, 'parent_id' => ''));
// mega menu multiple subcateg
td_demo_menus::add_mega_menu(array('title' => 'Videos', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Series', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Game Reviews', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id));
// add a category to the menu
td_demo_menus::add_category(array('title' => 'Top Ads', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_9_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'Best Of', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_category(array('title' => 'Movie Trailers', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_2_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Music', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_3_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'GamePlay', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_4_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => "Animations", 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_5_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => "Tutorials", 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_6_id, 'parent_id' => $parent_submenu_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'Kit Kat Double Act, My Life as Splactor', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_1', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'Game of Thrones: Watchers of the Wall', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_7_id), 'featured_image_td_id' => 'td_pic_2', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'Mass Effect 4 Dreams - Beyond Imagination', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_6_id), 'featured_image_td_id' => 'td_pic_3', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'Avengers: Age of Ultron Official Extended Trailer', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_4_id), 'featured_image_td_id' => 'td_pic_4', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => '1 Hour Music Mix for Gaming - Melodic', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_7', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'Game Scoop - 42 Reason We Would Miss Konami', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_3_id), 'featured_image_td_id' => 'td_pic_13', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'Starcraft 2: Legacy of the Void is Faster and More Aggressive', 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_5', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video', 'template' => 'single_template_11'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "Daredevil Series Will Change the Marvel Cinematic Universe", 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_9', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "Gaming Drum and Bass Mix – Fast Breaks", 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_10', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "Mad Max: Fury Road Heads Up May’s Must See Movies", 'file' => td_global::$get_template_directory . '/includes/demos/video/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_12', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
示例#7
0
td_demo_menus::add_mega_menu(array('title' => 'Video', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_12_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'Homepages', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_page(array('title' => 'Homepage - Fashion', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_fashion_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Blog', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_blog_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Video', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_video_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Tech', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_tech_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Sport', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_sport_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Full Post Featured', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_full_post_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Infinite Scroll', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_infinite_scroll_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Newspaper', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_newspaper_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Newsmag', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_newsmag_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Magazine', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_magazine_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Loop', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_loop_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Big Slide', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_big_slide_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_page(array('title' => 'Homepage - Less Images', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_less_images_id, 'parent_id' => $parent_submenu_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'Five things you may have missed over the weekend', 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_12_id), 'featured_image_td_id' => 'td_pic_3', 'template' => 'single_template_6'));
td_demo_content::add_post(array('title' => 'Apple sells 10 million iPhone 6 and iPhone 6 Pluses', 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_6_id), 'featured_image_td_id' => 'td_pic_11', 'template' => 'single_template_6'));
td_demo_content::add_post(array('title' => 'Experiencing the new Oculus Rift VR headset', 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_7_id), 'featured_image_td_id' => 'td_pic_4', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => 'What Do I Need To Make It In Business?', 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_5', 'template' => 'single_template_8'));
td_demo_content::add_post(array('title' => 'Simple form creation and storage, built for developers.', 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_13', 'template' => 'single_template_3'));
td_demo_content::add_post(array('title' => "Robots helped inspire deep learning might become", 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_9', 'template' => 'single_template_11', 'featured_video_url' => 'https://www.youtube.com/watch?v=o7JSltCqpCI', 'post_format' => 'video'));
td_demo_content::add_post(array('title' => "Express Recipes: How to make Creamy Papaya Raita", 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_11_id), 'featured_image_td_id' => 'td_pic_15', 'template' => ''));
td_demo_content::add_post(array('title' => "Apple Server Most Powerful rack optimized server", 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_1_id), 'featured_image_td_id' => 'td_pic_10', 'template' => 'single_template_8'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "Starbucks secret menu the drinks you didn’t know you can ask for", 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id, $demo_cat_11_id, $demo_cat_12_id), 'featured_image_td_id' => 'td_pic_9'));
td_demo_content::add_post(array('title' => "Designer fashion show kicks off Variety Week", 'file' => td_global::$get_template_directory . '/includes/demos/default/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id, $demo_cat_11_id, $demo_cat_12_id), 'featured_image_td_id' => 'td_pic_10'));
示例#8
0
$td_homepage_id = td_demo_content::add_page(array('title' => 'Home', 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/homepage.txt', 'template' => 'page.php', 'td_layout' => '', 'homepage' => true));
/*  ----------------------------------------------------------------------------
    menu
 */
//add the homepage to the menu
td_demo_menus::add_page(array('title' => 'Home', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_homepage_id, 'parent_id' => ''));
// mega menu multiple subcateg
td_demo_menus::add_mega_menu(array('title' => 'Fitness', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Food', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_6_id));
td_demo_menus::add_mega_menu(array('title' => 'Health', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'Other', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_category(array('title' => 'Lifestyle', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Science', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_9_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Gadgets', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_10_id, 'parent_id' => $parent_submenu_id));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'Do I Need a Doctor?', 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_3_id), 'featured_image_td_id' => 'td_pic_1'));
td_demo_content::add_post(array('title' => '8 Easy Steps to Eat Better', 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_9_id), 'featured_image_td_id' => 'td_pic_2'));
td_demo_content::add_post(array('title' => '12 Classic Pilates Moves', 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_5_id), 'featured_image_td_id' => 'td_pic_3'));
td_demo_content::add_post(array('title' => '8 Weight Loss Mistakes', 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_6_id), 'featured_image_td_id' => 'td_pic_4'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "How Many Calories Does CrossFit REALLY Burn?", 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_5'));
td_demo_content::add_post(array('title' => "The Summer Abs Workout", 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_6'));
td_demo_content::add_post(array('title' => "11 Awesome Benefits of Stretching", 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_7'));
td_demo_content::add_post(array('title' => "5 Adventurous Things to Do This Summer", 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_8'));
td_demo_content::add_post(array('title' => "10 Foods That Promote Weight Loss", 'file' => td_global::$get_template_directory . '/includes/demos/health/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id, $demo_cat_9_id, $demo_cat_10_id), 'featured_image_td_id' => 'td_pic_9'));
//  ----------------------------------------------------------------------------
示例#9
0
td_demo_menus::add_mega_menu(array('title' => 'Lifestyle', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_1_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Inspiration', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_5_id));
// mega menu one subcateg
td_demo_menus::add_mega_menu(array('title' => 'Food', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_6_id));
// add a category to the menu
td_demo_menus::add_category(array('title' => 'Photography', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id));
// add a category to the menu
td_demo_menus::add_category(array('title' => 'Travel', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id));
// add a subcategory to the sub-menu
$parent_submenu_id = td_demo_menus::add_link(array('title' => 'Categories', 'add_to_menu_id' => $td_demo_header_menu_id, 'url' => '#', 'parent_id' => ''));
td_demo_menus::add_category(array('title' => 'Inspiration', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_5_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Travel', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_8_id, 'parent_id' => $parent_submenu_id));
td_demo_menus::add_category(array('title' => 'Photography', 'add_to_menu_id' => $td_demo_header_menu_id, 'category_id' => $demo_cat_7_id, 'parent_id' => $parent_submenu_id));
//page
td_demo_menus::add_page(array('title' => 'About Me', 'add_to_menu_id' => $td_demo_header_menu_id, 'page_id' => $td_aboutme_id, 'parent_id' => ''));
/*  ---------------------------------------------------------------------------
    posts
*/
// post in featured category
td_demo_content::add_post(array('title' => 'My Favourite Books', 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_7_id), 'featured_image_td_id' => 'td_pic_6'));
td_demo_content::add_post(array('title' => 'Where The Magic Happens', 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_6_id), 'featured_image_td_id' => 'td_pic_7'));
td_demo_content::add_post(array('title' => 'Every Colour Please', 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_4_id), 'featured_image_td_id' => 'td_pic_4'));
td_demo_content::add_post(array('title' => 'Simple Things Makes Me Happy', 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_3_id), 'featured_image_td_id' => 'td_pic_1'));
td_demo_content::add_post(array('title' => 'Back On The Road', 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array(get_cat_ID(TD_FEATURED_CAT), $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_2'));
//  ----------------------------------------------------------------------------
td_demo_content::add_post(array('title' => "Things I Like – My Favourites", 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_9'));
td_demo_content::add_post(array('title' => "The Glamour Gift Guide", 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_10'));
td_demo_content::add_post(array('title' => "Best Ingredients To Have For Cooking", 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_12'));
td_demo_content::add_post(array('title' => "Reading In The Morning?", 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_1'));
td_demo_content::add_post(array('title' => "Back To Basics", 'file' => td_global::$get_template_directory . '/includes/demos/blog/pages/post_default.txt', 'categories_id_array' => array($demo_cat_2_id, $demo_cat_3_id, $demo_cat_4_id, $demo_cat_5_id, $demo_cat_6_id, $demo_cat_7_id, $demo_cat_8_id), 'featured_image_td_id' => 'td_pic_3'));
示例#10
0
 function ajax_stacks_controller()
 {
     if (!current_user_can('switch_themes')) {
         echo 'Permission denied!';
     }
     // try to extend the time limit
     @set_time_limit(240);
     $td_demo_action = td_util::get_http_post_val('td_demo_action');
     $td_demo_id = td_util::get_http_post_val('td_demo_id');
     /*  ----------------------------------------------------------------------------
            Uninstall button - do uninstall with content
         */
     if ($td_demo_action == 'uninstall_demo') {
         // remove our content
         td_demo_media::remove();
         td_demo_content::remove();
         td_demo_category::remove();
         td_demo_menus::remove();
         td_demo_widgets::remove();
         // restore all settings to the state before a demo was loaded
         $td_demo_history = new td_demo_history();
         $td_demo_history->restore_all();
         // update our state - no stack installed
         td_demo_state::update_state('', '');
     } else {
         if ($td_demo_action == 'remove_content_before_install_no_content') {
             // save the history - this class will save the history only when going from user settings -> stack
             $td_demo_history = new td_demo_history();
             $td_demo_history->save_all();
             // clean the user settings
             td_demo_media::remove();
             td_demo_content::remove();
             td_demo_category::remove();
             td_demo_menus::remove();
             td_demo_widgets::remove();
             // remove panel settings and recompile the css as empty
             foreach (td_global::$td_options as $option_id => $option_value) {
                 td_global::$td_options[$option_id] = '';
             }
             //typography settings
             td_global::$td_options['td_fonts'] = '';
             //css font files (google) buffer
             td_global::$td_options['td_fonts_css_files'] = '';
             //compile user css if any
             td_global::$td_options['tds_user_compile_css'] = td_css_generator();
             update_option(TD_THEME_OPTIONS_NAME, td_global::$td_options);
         } else {
             if ($td_demo_action == 'install_no_content_demo') {
                 td_demo_state::update_state($td_demo_id, 'no_content');
                 // load panel settings - this will also recompile the css
                 $this->import_panel_settings(td_global::$demo_list[$td_demo_id]['folder'] . 'td_panel_settings.txt', false);
             } else {
                 if ($td_demo_action == 'remove_content_before_install') {
                     // save the history - this class will save the history only when going from user settings -> stack
                     $td_demo_history = new td_demo_history();
                     $td_demo_history->save_all();
                     // clean the user settings
                     td_demo_media::remove();
                     td_demo_content::remove();
                     td_demo_category::remove();
                     td_demo_menus::remove();
                     td_demo_widgets::remove();
                 } else {
                     if ($td_demo_action == 'td_media_1') {
                         // change our state
                         td_demo_state::update_state($td_demo_id, 'full');
                         // load panel settings
                         $this->import_panel_settings(td_global::$demo_list[$td_demo_id]['folder'] . 'td_panel_settings.txt', true);
                         // load the media import script
                         require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_1.php';
                     } else {
                         if ($td_demo_action == 'td_media_2') {
                             // load the media import script
                             require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_2.php';
                         } else {
                             if ($td_demo_action == 'td_media_3') {
                                 // load the media import script
                                 require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_3.php';
                             } else {
                                 if ($td_demo_action == 'td_media_4') {
                                     // load the media import script
                                     require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_4.php';
                                 } else {
                                     if ($td_demo_action == 'td_media_5') {
                                         // load the media import script
                                         require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_5.php';
                                     } else {
                                         if ($td_demo_action == 'td_media_6') {
                                             // load the media import script
                                             require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_media_6.php';
                                         } else {
                                             if ($td_demo_action == 'td_import') {
                                                 require_once td_global::$demo_list[$td_demo_id]['folder'] . 'td_import.php';
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }