[wp-trac] [WordPress Trac] #64362: Support for Faux WP_Post Objects
WordPress Trac
noreply at wordpress.org
Fri Dec 5 07:07:04 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 | Focuses:
-------------------------------+------------------------------
Changes (by iflairwebtechnologies):
* keywords: => has-patch
Comment:
**Title**
Introduce **pre_wp_post_get_instance** filter to allow short-circuiting
WP_Post creation for virtual/faux posts
**Description**
This patch introduces a new filter, **pre_wp_post_get_instance**, allowing
developers to short-circuit **WP_Post::get_instance()** and return a
virtual or faux post object before any database query is performed.
This restores compatibility with plugins and routing systems that rely on
dynamic content not stored in the WordPress posts table.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64362#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list