Current Path : /storage/v11800/lifespanstores/public_html/wp-content/plugins/glowme-demo-data/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/lifespanstores/public_html/wp-content/plugins/glowme-demo-data/demodata.php |
<?php
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
function la_glowme_get_demo_array($dir_url, $dir_path){
$demo_items = array(
'demo-plastic-surgery' => array(
'link' => 'https://glowme.la-studioweb.com/demo-plastic-surgery/',
'title' => 'Plastic Surgery Demo',
'title2' => 'Demo Plastic Surgery',
'data_elementor' => array(
'header' => array(
'location' => 'header',
'value' => array(
'glowme-header-01' => 'include/general',
),
),
'footer' => array(
'location' => 'footer',
'value' => array(
'glowme-footer-01' => 'include/general',
),
),
),
'category' => array(
0 => 'Demo',
),
'data_slider' => '',
),
'demo-cosmetic' => array(
'link' => 'https://glowme.la-studioweb.com/demo-cosmetic/',
'title' => 'Cosmetic & Beauty Demo',
'title2' => 'Demo Cosmetic',
'data_elementor' => array(
'header' => array(
'location' => 'header',
'value' => array(
'glowme-header-01' => 'include/general',
),
),
'footer' => array(
'location' => 'footer',
'value' => array(
'glowme-footer-01' => 'include/general',
),
),
),
'category' => array(
0 => 'Demo',
),
'data_slider' => '',
),
'demo-dermatology' => array(
'link' => 'https://glowme.la-studioweb.com/demo-dermatology/',
'title' => 'Dermatology Demo',
'title2' => 'Demo Dermatology',
'data_elementor' => array(
'header' => array(
'location' => 'header',
'value' => array(
'glowme-header-01' => 'include/general',
),
),
'footer' => array(
'location' => 'footer',
'value' => array(
'glowme-footer-01' => 'include/general',
),
),
),
'category' => array(
0 => 'Demo',
),
'data_slider' => '',
),
);
$default_image_setting = array(
'woocommerce_single_image_width' => 600,
'woocommerce_thumbnail_image_width' => 600,
'woocommerce_thumbnail_cropping' => 'custom',
'woocommerce_thumbnail_cropping_custom_width' => 4,
'woocommerce_thumbnail_cropping_custom_height' => 5,
'thumbnail_size_w' => 0,
'thumbnail_size_h' => 0,
'medium_size_w' => 0,
'medium_size_h' => 0,
'medium_large_size_w' => 0,
'medium_large_size_h' => 0,
'large_size_w' => 0,
'large_size_h' => 0,
);
$default_menu = array(
'main-nav' => 'GlowMe Primary Menu'
);
$default_page = array(
'page_for_posts' => 'Blog',
'woocommerce_shop_page_id' => 'Shop',
'woocommerce_cart_page_id' => 'Cart',
'woocommerce_checkout_page_id' => 'Checkout',
'woocommerce_myaccount_page_id' => 'My Account'
);
$slider = $dir_path . 'Slider/';
$content = $dir_path . 'Content/';
$product = $dir_path . 'Product/';
$widget = $dir_path . 'Widget/';
$setting = $dir_path . 'Setting/';
$preview = $dir_url;
$default_elementor = [
'single-post' => [
'location' => 'single',
'value' => [
'glowme-single-post-01' => 'include/singular/post',
],
],
'single-page' => [
'location' => 'single',
'value' => '',
'default' => [
'glowme-woopages' => [
'include/singular/page/wishlist',
'include/singular/page/compare',
'include/singular/page/cart',
'include/singular/page/checkout'
],
]
],
'archive' => [
'location' => 'archive',
'value' => [
'glowme-blog-sidebar' => 'include/archive',
'glowme-portfolio-03-columns' => 'include/archive/la_portfolio_category',
]
],
'search-results' => [
'location' => 'archive',
'value' => '',
'default' => [
'glowme-search' => 'include/archive/search'
],
],
'error-404' => [
'location' => 'single',
'value' => '',
'default' => [
'glowme-404' => 'include/singular/not_found404'
],
],
'product' => [
'location' => 'single',
'value' => [
'glowme-single-product-01' => 'include/product'
]
],
'product-archive' => [
'location' => 'archive',
'value' => [
'glowme-shop-sidebar' => 'include/product_archive'
]
],
];
$elementor_kit_settings = json_decode( file_get_contents( $setting . 'settings.json' ), true );
$data_return = array();
foreach ($demo_items as $demo_key => $demo_detail){
$value = array();
$value['title'] = $demo_detail['title'];
$value['category'] = !empty($demo_detail['category']) ? $demo_detail['category'] : array('Demo');
$value['demo_preset'] = $demo_key;
$value['demo_url'] = $demo_detail['link'];
$value['preview'] = !empty($demo_detail['preview']) ? $demo_detail['preview'] : ($preview . $demo_key . '.jpg');
$value['option'] = $setting . 'theme-setting.json';
$value['content'] = !empty($demo_detail['data_sample']) ? $content . $demo_detail['data_sample'] : $content . 'demo-data.json';
$value['product'] = !empty($demo_detail['data_product']) ? $product . $demo_detail['data_product'] : $product . 'products.csv';
$value['widget'] = !empty($demo_detail['data_widget']) ? $widget . $demo_detail['data_widget'] : $widget . 'widgets.json';
$value['pages'] = array_merge( $default_page, array( 'page_on_front' => $demo_detail['title2'] ));
$value['menu-locations'] = array_merge( $default_menu, isset($demo_detail['menu-locations']) ? $demo_detail['menu-locations'] : array());
$value['other_setting'] = array_merge( $default_image_setting, isset($demo_detail['other_setting']) ? $demo_detail['other_setting'] : array());
if(!empty($demo_detail['data_slider'])){
$value['slider'] = $slider . $demo_detail['data_slider'];
}
$value['elementor'] = array_merge( $default_elementor, isset($demo_detail['data_elementor']) ? $demo_detail['data_elementor'] : array());
$value['elementor_kit_settings'] = array_merge( $elementor_kit_settings, isset($demo_detail['elementor_kit_settings']) ? $demo_detail['elementor_kit_settings'] : array());
$data_return[$demo_key] = $value;
}
return $data_return;
}