Open janwirth opened 9 years ago
definitely :)
On my WP themes, body_class is just not used.
How do you see body_class can be correctly called in jade?
I think, this particular case needs a workaround.
For example, using &attributes, body&attributes(bodyAttributes)
, where bodyAttributes is passed into template.
what about =body_class()
escaped and !=body_class()
unescaped. Seems like the most logical succession to me.
or maybe
#{body_class()}
I'd like to try it out, but i barely have any brain juice left for today.
Brain juice ;)
As for me, Jade have no direct equialent to <body <?php body_class() ?>>
code.
Actually, one possible direct workaround is:
doctype html
html
head
title An ugly workaround with WP's body_class()
| <body !{body_class()}>
h1 Eh?
| </body>
Supposably, my previous suggestion with &attributes is better.
So if I am getting this right, a tag using this feature may look like this
a(href='#')&(phpFunction()).linkClass A link
as supposed to this
a(href='#' =phpFunction()).linkClass A link
a(href='#' =phpFunction()).linkClass A link
isn't correct Jade code.
a(href='#')&(phpFunction()).linkClass A link
possible, but if phpFunction()
return data in some special format. I think body_class()
is not applicable here. I'll think about this.
P.S.: I am also using jade2php on WordPress templates, I need to share my work :)
There is no way to do this: http://codex.wordpress.org/Function_Reference/body_class