Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#17302 closed enhancement (fixed)

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

Reported by: yoavf's profile yoavf Owned by: westi's profile 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 13 years ago.
17302.1.diff (4.4 KB) - added by johnpbloch 13 years ago.
Refreshed on trunk
17302.2.diff (5.5 KB) - added by markjaquith 13 years ago.
return instead of echo in the get function
17302.3.diff (5.1 KB) - added by SergeyBiryukov 12 years ago.
17302.4.diff (5.1 KB) - added by yoavf 11 years ago.
refreshed for 3.7
17302.diff (5.1 KB) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (24)

#1 @westi
13 years ago

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

#2 @jane
13 years ago

  • Milestone changed from 3.2 to Future Release

Missed feature freeze, consider in 3.3.

#3 @SergeyBiryukov
13 years ago

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

@johnpbloch
13 years ago

Refreshed on trunk

#4 @johnpbloch
13 years ago

  • Keywords needs-refresh removed

@markjaquith
13 years ago

return instead of echo in the get function

#5 @ryan
12 years ago

  • Milestone changed from 3.3 to Future Release

Punting enhancements from 3.3

#6 @ocean90
12 years ago

Duplicate: #19652

#7 @ocean90
12 years ago

For get_adjacent_post_link() #13489

#8 @ryanduff
12 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.

#9 @nacin
12 years ago

  • Milestone changed from Future Release to 3.4

OK here. Jaquith?

#10 @markjaquith
12 years ago

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

Needs a refresh.

#11 @sscovil
12 years ago

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

#12 @SergeyBiryukov
12 years ago

  • Keywords has-patch added; needs-refresh removed

#14 @pauldewouters
11 years ago

  • Cc pauldewouters@… added

#15 @yoavf
11 years ago

  • Keywords needs-refresh added

@yoavf
11 years ago

refreshed for 3.7

#16 @yoavf
11 years ago

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

#17 @DrewAPicture
11 years ago

  • Version set to 3.1

The enhancement was suggested in 3.1.

#18 @wonderboymusic
11 years 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.