[wp-trac] [WordPress Trac] #32319: the_content filter should provide reference to post

WordPress Trac noreply at wordpress.org
Sat May 9 16:57:27 UTC 2015


#32319: the_content filter should provide reference to post
-------------------------------+----------------------
 Reporter:  shramee            |       Owner:
     Type:  enhancement        |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.2.2
 Severity:  normal             |  Resolution:  wontfix
 Keywords:                     |     Focuses:
-------------------------------+----------------------
Changes (by DrewAPicture):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 It's also worth mentioning that this a template tag, which is meant to be
 used in the loop where the `$post` global is accessible. In your filter
 callback, you can access the `$post` global with `$post = get_post()`.
 Closing as wontfix.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32319#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list