Skip to content

Feature/improve template body class#166

Merged
elseloop merged 3 commits intodevelopmentfrom
feature/Improve_template_body_class
Aug 20, 2015
Merged

Feature/improve template body class#166
elseloop merged 3 commits intodevelopmentfrom
feature/Improve_template_body_class

Conversation

@elseloop
Copy link
Copy Markdown
Contributor

(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
Copy link
Copy Markdown
Contributor

stoff commented Aug 20, 2015

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.

Because fatal errors are bad, @stoff. They're just bad. 💩
elseloop added a commit that referenced this pull request Aug 20, 2015
@elseloop elseloop merged commit 27d2e1a into development Aug 20, 2015
@elseloop
Copy link
Copy Markdown
Contributor Author

Seal of Approval

@elseloop elseloop deleted the feature/Improve_template_body_class branch August 31, 2015 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants