[wp-trac] [WordPress Trac] #9457: get_body_class() breaks the loop_start and loop_end hooks

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 4 18:06:29 GMT 2009


#9457: get_body_class() breaks the loop_start and loop_end hooks
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous              
     Type:  defect (bug)       |      Status:  new                    
 Priority:  high               |   Milestone:  2.8                    
Component:  Template           |     Version:  2.8                    
 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9457>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list