[wp-trac] [WordPress Trac] #42924: Current implementation of WP_Post::get_instance makes the_posts and posts_results filters useless
WordPress Trac
noreply at wordpress.org
Sun Dec 17 12:55:24 UTC 2017
#42924: Current implementation of WP_Post::get_instance makes the_posts and
posts_results filters useless
--------------------------+-----------------------------
Reporter: panbolec | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The only possible idea of the_posts and posts_results filters is to allow
post data modifications just after posts are fetched from database. But it
is useless if there are other ways to load posts without filtering. Since
WP_Post::get_instance does not pass its data through these filters (or any
other) it makes them useless. This may be seen for example on bbPress
topic page, where last reply is fetched separately (for any reason, I did
not make an investigation why its done this way).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42924>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list