Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Sep 13, 2024
1 parent fe1996c commit 6c67522
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5135,6 +5135,36 @@ function getThemesSeparated()
}


function isCurrentThemeDark()
{
global $config;
$isDefaultThemeDark = $config->isDefaultThemeDark();
if (empty($_COOKIE['themeMode'])) {
// it is default theme
if($isDefaultThemeDark){
return true;
}else{
return false;
}
} else {
// it is alrernative theme
if(!$isDefaultThemeDark){
return true;
}else{
return false;
}
}
}

function getBodyClass()
{
$bodyClass = 'lightTheme';
if(isCurrentThemeDark()){
$bodyClass = 'darkTheme';
}
return $bodyClass;
}

function getCurrentTheme()
{
global $config;
Expand Down

0 comments on commit 6c67522

Please sign in to comment.