Opened 12 years ago
Closed 12 years ago
#30440 closed enhancement (fixed)
{$adjacent}_post_link filter should pass $adjacent variable itself as parameter.
| Reported by: | Owned by: | SergeyBiryukov | |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | Posts, Post Types | Version: | 2.6 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
12 years ago
- Keywords needs-docs added
- Milestone Awaiting Review → Future Release
- Type defect (bug) → enhancement
#3
@
12 years ago
Hi John,
New diff file has been added, It contains new parameter in docblock as per your suggestion.
#5
@
12 years ago
30440.3.diff contains parameter formatting fixes, and adds the changelog entry.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looks good. The new parameter needs adding to the filter docblock though.