Make WordPress Core

Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#14440 closed enhancement (invalid)

Override filter for adjacent_post_link()

Reported by: mfields's profile mfields Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Template Keywords: reporter-feedback
Focuses: Cc:

Description

I'm working on a plugin that needs to integrate with as many themes as possible. It's basically a plugin for creating portfolios of images. It uses a custom post_type "piece" and allows for each piece to have multiple images attached to it. I've created a widget that lists thumbnails for all attached images that link to the attachment page for each one. On the attachment page, I am querying for the parent piece to display the title, content, excerpt, edit link, etc.

I'm also trying to replace the previous and next links with the values that would be generated for the parent. I've gotten pretty far along when I noticed that adjacent_post_link() is set to display only a previous link when an attachment has been queried. I was wondering if a filter could put put in place somewhere before this conditional is defined. Please see attached file.

Thanks for reading!

Attachments (1)

adjacent_post_link.patch (628 bytes) - added by mfields 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @mfields
15 years ago

  • Keywords dev-feedback added
  • Version set to 3.0

#2 @nacin
14 years ago

  • Keywords reporter-feedback added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

That's not quite the logic. If it's an attachment and it's looking backward, it uses the post parent. Otherwise, it calls get_adjacent_post(). That function in turn makes some queries.

Can you re-evaluate?

#3 @iseulde
12 years ago

  • Resolution set to invalid
  • Status changed from new to closed

No feedback in over three years.

#4 @DrewAPicture
12 years ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.