[wp-trac] [WordPress Trac] #64362: Support for Faux WP_Post Objects

WordPress Trac noreply at wordpress.org
Mon Dec 8 19:25:31 UTC 2025


#64362: Support for Faux WP_Post Objects
-----------------------------------+------------------------------
 Reporter:  Howdy_McGee            |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Posts, Post Types      |     Version:  6.9
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------

Comment (by Howdy_McGee):

 @westonruter Whoops!

 > I'm unsure if this is the right approach or something core should
 support. There is a related very old ticket #12955 which is to add a
 filter for get_post but it has not yet been resolved.

 I sorta of agree. It is niche, but if we cannot provide a Faux WP_Post,
 that forces Endpoints to use multiple points of entry (filters) to
 integrate easily into templates and themes. Endpoints IMO should be a
 high-level object, so it seems to me that it would be confusing track the
 multiple hooks a WP_Post may be attached to via themes **and** plugins.
 Having a centralized place to provide this information up-front just seems
 beneficiary.

 Otherwise, on Endpoints, WordPress could end up with a global WP_Post
 Object that isn't necessarily attached to the Endpoint itself which
 further complicates how WordPress handles Endpoints.

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


More information about the wp-trac mailing list