<?php

//
// One click demo import
//
if ( ! function_exists( 'kenta_breeze_demo_slug' ) ) {
	function kenta_breeze_demo_slug() {
		return 'kenta-breeze';
	}
}
add_filter( 'kenta_welcome_demo_slug', 'kenta_breeze_demo_slug' );

if ( ! function_exists( 'kenta_breeze_demo_name' ) ) {
	function kenta_breeze_demo_name() {
		return __( 'Kenta Breeze', 'kenta-breeze' );
	}
}
add_filter( 'kenta_welcome_demo_name', 'kenta_breeze_demo_name' );

if ( ! function_exists( 'kenta_breeze_demo_screenshot' ) ) {
	function kenta_breeze_demo_screenshot() {
		return KENTA_BREEZE_URL . 'screenshot.png';
	}
}
add_filter( 'kenta_welcome_demo_screenshot', 'kenta_breeze_demo_screenshot' );

//
// Dynamic css cache
//
if ( ! function_exists( 'kenta_breeze_cache_key' ) ) {
	function kenta_breeze_cache_key() {
		return 'kenta_breeze_dynamic_css';
	}
}
add_filter( 'kenta_filter_dynamic_css_cache_key', 'kenta_breeze_cache_key' );

if ( ! function_exists( 'kenta_breeze_cache_version' ) ) {
	function kenta_breeze_cache_version() {
		return KENTA_BREEZE_VERSION;
	}
}
add_filter( 'kenta_filter_cached_dynamic_css_version', 'kenta_breeze_cache_version' );

//
// Starter content
//

if ( ! function_exists( 'kenta_breeze_starter_content' ) ) {
	/**
	 * Starter content
	 *
	 * @param $starter
	 *
	 * @return mixed
	 */
	function kenta_breeze_starter_content( $starter ) {
		$starter['widgets'] = array(
			'primary-sidebar'           => array(
				'search',
				'text_about',
				'text_business_info',
			),
			'kenta_footer_el_widgets_1' => array(
				'text_business_info',
			),
			'kenta_footer_el_widgets_2' => array(
				'text_about',
			),
			'kenta_footer_el_widgets_3' => array(
				'recent-posts',
				'categories',
			),
			'kenta_footer_el_widgets_4' => array(
				'search',
			),
		);

		$starter['posts'] = array(
			'front'   => array(
				'post_type'    => 'page',
				'post_title'   => esc_html__( 'Home', 'kenta-breeze' ),
				'thumbnail'    => '{{image-cup}}',
				'post_content' => kenta_breeze_starter_template( 'home' ),
				'template'     => 'templates/boxed-trans-header-page-narrow.php',
			),
			'about'   => array(
				'post_type'  => 'page',
				'post_title' => esc_html__( 'About', 'kenta-breeze' ),
				'thumbnail'  => '{{image-cup}}',
//				'post_content' => kenta_breeze_starter_template( 'about' ),
//				'template'     => 'templates/boxed-trans-header-page-builder.php',
			),
			'contact' => array(
				'post_type'  => 'page',
				'post_title' => esc_html__( 'Contact', 'kenta-breeze' ),
				'thumbnail'  => '{{image-cup}}',
//				'post_content' => kenta_breeze_starter_template( 'contact' ),
//				'template'     => 'templates/boxed-trans-header-page-builder.php',
			),
			'blog',
		);

		$starter['options'] = array(
			'show_on_front'  => 'page',
			'page_on_front'  => '{{front}}',
			'page_for_posts' => '{{blog}}',
		);

		return $starter;
	}
}
add_filter( 'kenta_filter_starter_content', 'kenta_breeze_starter_content' );
