Closed elseloop closed 8 years ago
The question came up in an offline conversation: what prompted this?
When you're running PHP in dev mode (verbose errors) and have not set $bodyClass, the existing code will issue a PHP error inline into the class attribute. While most browsers will handle this without error, it still results in wildly invalid markup.
(From #164, originally opened by @stoff)
Minor improvement to add some logic between echoing a class in the head.php include and setting the body class in the template file.
getBodyClass tests isset on $bodyClass. if set, it echos the entire class attribute, concatenated with the body class.