[wp-trac] Re: [WordPress Trac] #4514: could we add a plugin hook?

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 29 19:37:16 GMT 2007


#4514: could we add a plugin hook?
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  anonymous
     Type:  enhancement        |       Status:  reopened 
 Priority:  lowest             |    Milestone:           
Component:  General            |      Version:           
 Severity:  trivial            |   Resolution:           
 Keywords:  has-patch          |  
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 There are times where you need the 'init' hook to be fired before starting
 the output buffer (e.g. you do or don't want to trigger an event on admin
 screens, or you need the wp_query to have run so internals are properly
 set), but before the template_redirect.

 One could arguably use the template_redirect hook with an extremely low
 priority, e.g. -1000000. In practice, however, I've found (I've a bunch of
 plugins that start output buffers on this hook) that conflicts arise
 because an odd plugin here or there hooks into the template_redirect
 plugin before I do, and things end up not working together.

 In these cases, I end up checking on wp_head if the output buffer has been
 started or not. And in the end I find it rather annoying.

 D.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4514#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list