From 382f0e7696ae054809a920f7b189de3bb4fc1bd9 Mon Sep 17 00:00:00 2001 From: Eduardo Kraus Date: Sun, 1 Dec 2024 22:19:30 -0300 Subject: [PATCH] Lib.php --- lib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib.php b/lib.php index efe8f83..f0df11c 100755 --- a/lib.php +++ b/lib.php @@ -733,5 +733,11 @@ function theme_degrade_process_css($css, $theme) { * @return array */ function theme_degrade_add_htmlattributes() { - // \theme_degrade\core_hook_output::before_html_attributes(); + $layout = get_user_preferences("layout", "light"); + $layouturl = optional_param("layout", false, PARAM_TEXT); + if ($layouturl) { + $layout = $layouturl; + set_user_preference("layout", $layout); + } + return ['data-bs-theme' => $layout]; }