Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33568 closed enhancement (fixed)

add $taxonomy parameter to filters in get_adjacent_post

Reported by: sboisvert's profile sboisvert Owned by: boonebgorges's profile 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 9 years ago.
get_{$adjacent}_post_join and get_{$adjacent}_post_where
get_adjacent_post.2.txt (1.7 KB) - added by sboisvert 9 years ago.
Patch, now with docs.

Download all attachments as: .zip

Change History (7)

@sboisvert
9 years ago

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

#1 @SergeyBiryukov
9 years ago

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

The filter docs need to be updated as well.

#2 @DrewAPicture
9 years ago

  • Focuses docs removed
  • Keywords needs-docs added

@sboisvert
9 years ago

Patch, now with docs.

#3 @boonebgorges
9 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
9 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
9 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.