Make WordPress Core

Opened 9 years ago

Last modified 4 years ago

#34638 new feature request

New function for retrieving previous and next adjacent image

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

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 4 years ago.

Download all attachments as: .zip

Change History (5)

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


4 years ago

#2 @isabel_brison
4 years ago

  • Component changed from General to Media
  • Keywords needs-patch added
  • Milestone set to Future Release

@markparnell
4 years ago

#3 @markparnell
4 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
4 years ago

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