[wp-trac] [WordPress Trac] #26937: get_adjacent_post() should use WP_Query rather than build its own SQL query
WordPress Trac
noreply at wordpress.org
Tue Jan 28 05:06:24 UTC 2014
#26937: get_adjacent_post() should use WP_Query rather than build its own SQL query
-------------------------+------------------
Reporter: ethitter | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.9
Component: Query | Version: 3.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------
Changes (by nacin):
* milestone: Awaiting Review => 3.9
Comment:
This is awesome. Most excellent work.
The only thing I see is remove() should probably occur immediately, within
the post_clauses callback. This isn't just for academic or style reasons —
if someone else runs a WP_Query on a hook of WP_Query (careful to avoid
recursion, etc.), this would stomp over that.
I also could picture each clause manipulation being its own protected
method, with filter() handling the has_filter() checks. Just to split up
the logic a bit. If it doesn't make it easier to read/grok though, please
push back on it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26937#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list