get_body_class() breaks the loop_start and loop_end hooks
|Reported by:||Denis-de-Bernardy||Owned by:||anonymous|
|Severity:||blocker||Keywords:||has-patch tested commit|
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.