connectivedx / Phoenix

http://connectivedx.github.io/Phoenix/
33 stars 5 forks source link

Feature/improve template body class #166

Closed elseloop closed 8 years ago

elseloop commented 8 years ago

(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.

stoff commented 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.

elseloop commented 8 years ago

Seal of Approval