[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
Fri Mar 28 23:28:53 UTC 2014
#26937: get_adjacent_post() should use WP_Query rather than build its own SQL query
-------------------------+-----------------------
Reporter: ethitter | Owner: nacin
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.9
Component: Query | Version: 3.7
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------
Comment (by ethitter):
Replying to [comment:50 ethitter]:
It was silly of me not to realize that by simply reversing the aliasing,
the `split_the_query` issue resolves itself. At any rate, that's what I've
done in [attachment:26937.12.patch].
My concern at this point is that I've used simple `str_replace()`s so far,
but needed a `preg_replace()` to reverse the aliasing without clobbering
other table names. Perhaps some of the other string manipulations should
be regex-based instead? I tend to think it's unnecessary, given the types
of manipulations done and that any unintended replacements would've caused
SQL errors without the manipulations, but it's possible I'm missing some
case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26937#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list