Make WordPress Core

Opened 11 years ago

Last modified 6 years ago

#34638 new feature request

New function for retrieving previous and next adjacent image

Reported by: solidcolour Owned by:
Priority: normal Milestone: Future Release
Component: Media Version: 4.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

There are previous_image_link() and next_image_link() functions. But there are no functions that only return true and false, which would works similarly to get_previous_post() and get_next_post() but for images. It would be very helpful to have that, so we can easily to control whether to output the pagination HTML markup in image.php.

Attachments (1)

34638.diff​ (4.4 KB ) - added by markparnell 7 years ago.

Download all attachments as: .zip

Change History (5)

This ticket was mentioned in ​Slack in #core by noisysocks. ​View the logs.


7 years ago

#2 @isabel_brison
7 years ago

  • Component General → Media
  • Keywords needs-patch added
  • Milestone → Future Release

@markparnell
7 years ago

#3 @markparnell
7 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Patch adds get_previous_image_link(), get_next_image_link() and get_adjacent_image_link() which return the link instead of echoing it.

#4 @markparnell
6 years ago

  • Keywords needs-testing removed
Note: See TracTickets for help on using tickets.