Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32618 closed enhancement (fixed)

Additional args for get_the_post_navigation()

Reported by: chasewiseman's profile ChaseWiseman Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Themes Keywords: has-patch
Focuses: template Cc:


It would be awesome if get_the_post_navigation() accepted and passed along all of the parameters available to the get_next_post_link() and get_previous_post_link() functions that are used within. This would allow developers to still use the function in cases where limiting navigation by taxonomy/term is desired. Namely $in_same_term, $excluded_terms, and $taxonomy.

This was first mentioned in

Attachments (2)

32618.diff (2.4 KB) - added by ChaseWiseman 9 years ago.
32618.2.diff (2.6 KB) - added by DrewAPicture 9 years ago.
Docs fixes + spacing

Download all attachments as: .zip

Change History (7)

9 years ago

#1 @ChaseWiseman
9 years ago

  • Keywords has-patch added

#2 @obenland
9 years ago

  • Milestone changed from Awaiting Review to Future Release

Let's tackle the completion of that API in 4.4.

#3 @wonderboymusic
9 years ago

  • Milestone changed from Future Release to 4.4
  • Owner set to DrewAPicture
  • Status changed from new to assigned

check out the docs

#4 @DrewAPicture
9 years ago

  • Status changed from assigned to accepted

9 years ago

Docs fixes + spacing

#5 @DrewAPicture
9 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 34715:

Themes: Introduce three new arguments for get_the_post_navigation(), in_same_term, excluded_terms, and taxonomy.

The addition of these new arguments brings get_the_post_navigation() into argument parity with get_previous_post_link() and get_next_post_link(), both of which it wraps, and will allow for more flexibility in configuring the next and previous post links for simultaneous display in themes.

Props ChaseWiseman.
Fixes #32618.

Note: See TracTickets for help on using tickets.