#9457 closed defect (bug) (fixed)
get_body_class() breaks the loop_start and loop_end hooks
Reported by: | Denis-de-Bernardy | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | high |
Severity: | blocker | Version: | 2.8 |
Component: | Template | Keywords: | has-patch tested commit |
Focuses: | Cc: |
Description
I've a couple of plugins that rely on loop_start and loop_end to start and end an output buffer to re-do the full loop with different formatting.
In its current implementation, get_body_class() triggers loop_start without triggering loop_end, you end up "in the loop" until the actual loop ends. And my plugins end up haplessly spewing their content in the body tag on the default WP theme.
The attached patch makes get_body_class() return the same results without wrecking havoc all over the place.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [10877]) Don't trigger loop start in get_body_class(). Props Denis-de-Bernardy. fixes #9457