From 9fef770143c2bf1988bdad3c0e635534b66ca6a1 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 30 Jun 2020 16:53:52 +0100 Subject: [PATCH] Create getThemeOpt --- includes/functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 55d1d1f7..a4945016 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -417,3 +417,14 @@ function formatDateAgo($datetime, $full = false) if (!$full) $string = array_slice($string, 0, 1); return $string ? implode(', ', $string) . ' ago' : 'just now'; } + +function getThemeOpt() +{ + if (!isset($_COOKIE['theme'])) { + $theme = "custom.php"; + } else { + $theme = $_COOKIE['theme']; + } + return 'app/css/'.htmlspecialchars($theme, ENT_QUOTES); +} +