[wp-trac] [WordPress Trac] #43521: Excluded terms filter in get_adjacent_post is not executed if excluded_terms parameter is empty
WordPress Trac
noreply at wordpress.org
Mon Mar 12 08:32:16 UTC 2018
#43521: Excluded terms filter in get_adjacent_post is not executed if
excluded_terms parameter is empty
--------------------------------------+-----------------------------
Reporter: zottto | Owner: SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.0
Component: Posts, Post Types | Version: 4.9.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Changes (by zottto):
* status: closed => reopened
* resolution: fixed =>
Comment:
Hi, thanks for fixing the bug so fast.
But in my opinion there is now another change in the behaviour of the
filter.
Before the fix, the filter was applied only to an array of term IDs. Now
the filter is applied before the backwards compatibility part that changes
the old usage of term IDs concatenated with "and" to an array.
If the filter is executed now it could happen that the term IDs handled in
the filter are in the old style which was not possible before.
From my point of view it would be better to apply the filter after that
back-compat part (or to execute the back-compat part before the filter,
whatever makes more sense).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43521#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list