Opened 10 years ago
Closed 10 years ago
#30440 closed enhancement (fixed)
{$adjacent}_post_link filter should pass $adjacent variable itself as parameter.
Reported by: | Owned by: | SergeyBiryukov | |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 2.6 |
Component: | Posts, Post Types | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
{$adjacent}_post_link filter should pass $adjacent variable itself as parameter to the callback function. This will be useful in scenario where I am using same callback function for previous_post_link and next_post_link filters.
If this variable is not passed, I will be unable to determine whether given post is previous or next to current post. Moreover, I will have to write nearly same code twice.
Attachments (3)
Change History (12)
#2
@
10 years ago
- Keywords needs-docs added
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect (bug) to enhancement
#3
@
10 years ago
Hi John,
New diff file has been added, It contains new parameter in docblock as per your suggestion.
#5
@
10 years ago
30440.3.diff contains parameter formatting fixes, and adds the changelog entry.
This ticket was mentioned in Slack in #core by wpgeeko. View the logs.
10 years ago
Note: See
TracTickets for help on using
tickets.
Looks good. The new parameter needs adding to the filter docblock though.