<?php
/**
 * Theme functions
 *
 * @package Kenta Fast Blog
 */

// don't call the file directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! defined( 'KENTA_FAST_BLOG_VERSION' ) ) {
	// Replace the version number of the theme on each release.
	define( 'KENTA_FAST_BLOG_VERSION', '1.0.1' );
}

if ( ! defined( 'KENTA_FAST_BLOG_PATH' ) ) {
	define( 'KENTA_FAST_BLOG_PATH', trailingslashit( get_stylesheet_directory() ) );
}

if ( ! defined( 'KENTA_FAST_BLOG_URL' ) ) {
	define( 'KENTA_FAST_BLOG_URL', trailingslashit( get_stylesheet_directory_uri() ) );
}

// Helper functions
require_once KENTA_FAST_BLOG_PATH . 'helpers.php';
// Customizer settings hook
require_once KENTA_FAST_BLOG_PATH . 'customizer.php';

//
// One click demo import
//
if ( ! function_exists( 'kenta_fast_blog_demo_slug' ) ) {
	function kenta_fast_blog_demo_slug() {
		return 'fast-blog';
	}
}
add_filter( 'kenta_welcome_demo_slug', 'kenta_fast_blog_demo_slug' );

if ( ! function_exists( 'kenta_fast_blog_demo_name' ) ) {
	function kenta_fast_blog_demo_name() {
		return __( 'Kenta Fast Blog', 'kenta-fast-blog' );
	}
}
add_filter( 'kenta_welcome_demo_name', 'kenta_fast_blog_demo_name' );

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

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

if ( ! function_exists( 'kenta_fast_blog_cache_version' ) ) {
	function kenta_fast_blog_cache_version() {
		return KENTA_FAST_BLOG_VERSION;
	}
}
add_filter( 'kenta_filter_cached_dynamic_css_version', 'kenta_fast_blog_cache_version' );
