[wp-trac] [WordPress Trac] #21766: modify body_class function to allow non-class items
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 1 18:59:24 UTC 2012
#21766: modify body_class function to allow non-class items
------------------------------------------------+--------------------------
Reporter: norcross | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting
Component: General | Review
Severity: normal | Version: trunk
Keywords: has-patch dev-feedback 2nd-opinion | Resolution:
------------------------------------------------+--------------------------
Comment (by norcross):
Replying to [comment:1 xenlab]:
> I see value in having a way to add new attributes to the {{{<body>}}}
tag, this approach still seems kind of scoped to the example use case.
>
> I'm not a fan of having to piggy back on {{{body_class()}}}, but I see
why -- {{{body_class}}} is widely deployed and integrated into many
themes. However, I still think there is a cleaner approach to this problem
that allows {{{body_class}}} to still work while also introducing a new
filter to add attributes.
based on the method outlined, you could add stand-alone elements as well,
not just the item-foo=item-bar setup.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21766#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list