From 3989ccad9d8d0b08ffb4c91e8720011032094967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Klockiewicz?= Date: Sun, 27 May 2018 18:51:59 +0200 Subject: [PATCH] Add batflat_dir() function --- inc/core/lib/functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inc/core/lib/functions.php b/inc/core/lib/functions.php index 12b2af3..26aaa8b 100644 --- a/inc/core/lib/functions.php +++ b/inc/core/lib/functions.php @@ -261,6 +261,15 @@ function domain($with_protocol = true) return $url['host']; } +/** + * Batflat dir name + * + * @return string + */ +function batflat_dir() { + return basename(str_replace(ADMIN, null, getcwd())); +} + /** * toggle empty variable *