WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 7 months ago

#17302 closed enhancement (fixed)

Add get_previous_post_link(), get_next_post_link(), and get_adjacent_post_link()

Reported by: yoavf Owned by: westi
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.1
Component: Template Keywords: has-patch
Focuses: Cc:

Description

Unlike many other template tags, he functions adjacent_post_link(), next_post_link(), and previous_post_link() are missing their get_ counterparts.
Included patch adds those.

Attachments (6)

get_adjacent_post_link.diff (4.3 KB) - added by yoavf 3 years ago.
17302.1.diff (4.4 KB) - added by johnpbloch 3 years ago.
Refreshed on trunk
17302.2.diff (5.5 KB) - added by markjaquith 3 years ago.
return instead of echo in the get function
17302.3.diff (5.1 KB) - added by SergeyBiryukov 21 months ago.
17302.4.diff (5.1 KB) - added by yoavf 8 months ago.
refreshed for 3.7
17302.diff (5.1 KB) - added by wonderboymusic 7 months ago.

Download all attachments as: .zip

Change History (24)

comment:1 westi3 years ago

  • Milestone changed from Awaiting Review to 3.2
  • Owner set to westi
  • Status changed from new to reviewing

comment:2 jane3 years ago

  • Milestone changed from 3.2 to Future Release

Missed feature freeze, consider in 3.3.

comment:3 SergeyBiryukov3 years ago

  • Keywords needs-refresh added
  • Milestone changed from Future Release to 3.3

johnpbloch3 years ago

Refreshed on trunk

comment:4 johnpbloch3 years ago

  • Keywords needs-refresh removed

markjaquith3 years ago

return instead of echo in the get function

comment:5 ryan3 years ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3

comment:6 ocean902 years ago

Duplicate: #19652

comment:7 ocean902 years ago

For get_adjacent_post_link() #13489

comment:8 ryanduff2 years ago

  • Cc ryan@… added

Any reason we can't get this in for 3.4 before freeze? Don't really see any issues with it.

comment:9 nacin2 years ago

  • Milestone changed from Future Release to 3.4

OK here. Jaquith?

comment:10 markjaquith2 years ago

  • Keywords needs-refresh added; has-patch removed
  • Milestone changed from 3.4 to Future Release

Needs a refresh.

comment:11 sscovil21 months ago

Any idea when this will be added? As a theme developer, I think it's pretty important...

SergeyBiryukov21 months ago

comment:12 SergeyBiryukov21 months ago

  • Keywords has-patch added; needs-refresh removed

comment:14 pauldewouters14 months ago

  • Cc pauldewouters@… added

comment:15 yoavf8 months ago

  • Keywords needs-refresh added

yoavf8 months ago

refreshed for 3.7

comment:16 yoavf8 months ago

  • Keywords needs-refresh removed
  • Milestone changed from Future Release to 3.7
  • Version 3.2 deleted

comment:17 DrewAPicture8 months ago

  • Version set to 3.1

The enhancement was suggested in 3.1.

wonderboymusic7 months ago

comment:18 wonderboymusic7 months ago

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

In 25327:

Introduce get_previous_post_link(), get_next_post_link(), and get_adjacent_post_link(). Allows developers to retrieve the value without echoing.

Props yoavf, markjaquith, SergeyBiryukov.
Fixes #17302.

Note: See TracTickets for help on using tickets.