<?php

/**
 * WordPress functions
 * @category Functions
 * @author Krik
 */

// Krik framework
$krik_framework = [
	'acf/acf',
	'auto-login',
	'branding',
	'cleaning',
	'comments',
	'content',
	'debugger',
	'gravity-forms',
	'gutenberg',
	'helpers',
	'menus',
	'mix',
	'nas',
	'plugins',
	'post-types',
	'scripts',
	'search',
	'styles',
	'taxonomies',
	'theme',
	'updates'
];

foreach ($krik_framework as $framework) {
	require_once(__DIR__ . '/framework/' . $framework . '.php');
}

// Blade views templates folder
add_filter('blade/view/paths', 'krik_blade_views');

function krik_blade_views()
{
	return __DIR__ . '/resources/views';
}

// Blade cache folder
add_filter('blade/cache/path', 'krik_blade_cache');

function krik_blade_cache()
{
	$uploadDir = wp_upload_dir();
	return $uploadDir['basedir'] . '/.bladecache/';
}
