From c02241509b98c7efb35c29d8ebb04438c504ae21 Mon Sep 17 00:00:00 2001 From: danpros Date: Sun, 10 Dec 2023 10:29:15 +0700 Subject: [PATCH] Add theme_path() for easy theming --- system/includes/dispatch.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/includes/dispatch.php b/system/includes/dispatch.php index 7bb9b16..833a829 100644 --- a/system/includes/dispatch.php +++ b/system/includes/dispatch.php @@ -34,6 +34,16 @@ function site_path() return $_path; } +function theme_path() +{ + + if (config('views.root') == null) + error(500, '[views.root] is not set'); + + return site_url() . rtrim(config('views.root'), '/') . '/'; + +} + function error($code, $message) { @header("HTTP/1.0 {$code} {$message}", true, $code);