[wp-trac] Re: [WordPress Trac] #6284: add a the_post hook

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 20 09:30:40 GMT 2009


#6284: add a the_post hook
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous       
     Type:  enhancement        |      Status:  new             
 Priority:  normal             |   Milestone:  2.8             
Component:  Optimization       |     Version:  2.5             
 Severity:  normal             |    Keywords:  has-patch tested
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  => has-patch tested
  * milestone:  2.9 => 2.8


Comment:

 The purpose was (and still is) to apply filters conditionally on the post.

 As a temporary workaround, I end up doing something like this:

 on loop start, look at first post. if condition is met, remove all filters
 on the_content, except the one that checks the next post.

 on the_content, look at next post, if condition is met, remove all filters
 on the_content, except the one that checks the next post, else restore the
 filters on the_content.

 on loop end, restore all filters on the_content.

 it's actually not all the filters, but much about. my purpose in doing so
 is to conditionally disable wpautop, texturize, etc. based on a postmeta's
 value.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/6284#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list