[wp-trac] [WordPress Trac] #35082: get_adjacent_post() when using in term doesn't account for child terms

WordPress Trac noreply at wordpress.org
Thu Dec 17 15:59:34 UTC 2015


#35082: get_adjacent_post() when using in term doesn't account for child terms
--------------------------------------------+-----------------------------
 Reporter:  WazzaJB                         |       Owner:
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  Future Release
Component:  Posts, Post Types               |     Version:  trunk
 Severity:  normal                          |  Resolution:
 Keywords:  needs-refresh needs-unit-tests  |     Focuses:  template
--------------------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => needs-refresh needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 Hi @WazzaJB - Thanks for the ticket, and welcome to Trac!

 I am a bit on the fence about your proposal, though I think I lean toward
 agreeing with you. The `$in_same_term` parameter of `get_adjacent_post()`
 is (obviously) somewhat ambiguous. Given two terms `parent` and its child
 term `child`, it's not 100% clear whether a post belonging only to
 `parent` is "in the same term as" a post belonging only to `child`. In
 most places in WordPress, the answer is "no", so I suppose it makes sense
 to follow suit here, as you've suggested. We will need to spell out the
 implications with some automated tests, though, and announce the change in
 behavior.

 It looks like your patch may have been generated against an old version of
 WordPress. See [34088]. Can you refresh for current trunk?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35082#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list