[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
Sat Jan 25 18:51:48 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: Awaiting Review
Component: Query | Version: 3.7
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
With the introduction of the `WP_Date_Query` through r25139,
`get_adjacent_post()` no longer needs to build its own SQL to retrieve
adjacent posts. By switching to `WP_Query`, we gain the benefit of its
performance improvements, including native caching.
The trickiest part of this change is maintaining support for the
`get_{$adjacent}_post_join` and `get_{$adjacent}_post_where` filters
currently applied to the SQL built in `get_adjacent_post()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26937>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list