Skip to content

Commit

Permalink
Lib.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardokraus committed Dec 2, 2024
1 parent c786684 commit 382f0e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

0 comments on commit 382f0e7

Please sign in to comment.