From 2509bd4a981dd9326f6b00963053b5ee59016706 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Sat, 24 Jul 2021 20:25:13 +0200 Subject: [PATCH] Add brand new legacy theme helpers --- includes/helper/legacy_helper.php | 33 +++++++++++++++++++++++++++++++ includes/includes.php | 1 + 2 files changed, 34 insertions(+) create mode 100644 includes/helper/legacy_helper.php diff --git a/includes/helper/legacy_helper.php b/includes/helper/legacy_helper.php new file mode 100644 index 00000000..ca70ad0e --- /dev/null +++ b/includes/helper/legacy_helper.php @@ -0,0 +1,33 @@ +getGlobals(); + return $globals['themeId']; +} + +/** + * @return array + */ +function theme(): array +{ + $theme_id = theme_id(); + return config('themes')[$theme_id]; +} + +/** + * @return string + */ +function theme_type(): string +{ + return theme()['type']; +} diff --git a/includes/includes.php b/includes/includes.php index 061619dd..b94ef70d 100644 --- a/includes/includes.php +++ b/includes/includes.php @@ -57,6 +57,7 @@ $includeFiles = [ __DIR__ . '/../includes/controller/user_worklog_controller.php', __DIR__ . '/../includes/helper/graph_helper.php', + __DIR__ . '/../includes/helper/legacy_helper.php', __DIR__ . '/../includes/helper/message_helper.php', __DIR__ . '/../includes/helper/email_helper.php',