WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#33568 closed enhancement (fixed)

add $taxonomy parameter to filters in get_adjacent_post

Reported by: sboisvert Owned by: boonebgorges
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

In #17807 the taxonomy parameter was added to get_adjacent_post, but that parameter wasn't added to the filters.

The ability to filter is limited if we don't know the values passed.
(The filter I'm doing will change the query to run only for one term not all terms (for performance reasons), but I need to know the taxonomy to run it against)

Thanks!

Attachments (2)

get_adjacent_post.txt (1.4 KB) - added by sboisvert 6 years ago.
get_{$adjacent}_post_join and get_{$adjacent}_post_where
get_adjacent_post.2.txt (1.7 KB) - added by sboisvert 6 years ago.
Patch, now with docs.

Download all attachments as: .zip

Change History (7)

@sboisvert
6 years ago

get_{$adjacent}_post_join and get_{$adjacent}_post_where

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to Posts, Post Types
  • Focuses docs added

The filter docs need to be updated as well.

#2 @DrewAPicture
6 years ago

  • Focuses docs removed
  • Keywords needs-docs added

@sboisvert
6 years ago

Patch, now with docs.

#3 @boonebgorges
6 years ago

  • Keywords needs-docs removed
  • Milestone changed from Awaiting Review to 4.4

Thanks for the patch, sboisvert. Could I ask you, in the future, to generate your patches from the root of your WP checkout (and call them .patch instead of .txt)? Makes testing/applying just a bit easier.

We also need changelog entries for these. I'll add them.

#4 @boonebgorges
6 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 33805:

Pass taxonomy name to filters in get_adjacent_post().

Props sboisvert.
Fixes #33568.

#5 @sboisvert
6 years ago

Thanks for the patch, sboisvert. Could I ask you, in the future, to generate your patches from the root of your WP checkout (and call them .patch instead of .txt)? Makes testing/applying just a bit easier.

Will do, I'll also try to attach a commit message next time.

Note: See TracTickets for help on using tickets.