Opened 9 years ago
Closed 9 years ago
#41924 closed enhancement (fixed)
get_{$adjacent}_post_sort filter should have $order parameter
| Reported by: | manchumahara | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Posts, Post Types | Version: | |
| Severity: | normal | Keywords: | good-first-bug needs-refresh |
| Cc: | Focuses: |
Description
get_{$adjacent}_post_sort code looks like below
$sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post );
I think it should have the $order as parameter after $post, my proposed code is
$sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1", $post, $order );
as $order is missing as filter parameter it's not possible to understand what's the current $order from the the first parameter "ORDER BY p.post_date $order LIMIT 1"
Attachments (2)
Change History (9)
#1
@
9 years ago
- Component General → Posts, Post Types
- Keywords needs-patch good-first-bug added
- Milestone Awaiting Review → Future Release
#2
follow-up:
↓ 3
@
9 years ago
- Keywords needs-refresh added; needs-patch removed
Hallo @manchumahara
thanks for your patch. You also have to add the @since tag in the filter comment.
#3
in reply to: ↑ 2
@
9 years ago
Hi,
What should be the version number in the since tag or How I can know what will be the next version in which this patch will be merged. Sorry for my ignorance. Can you please suggest me the ?
Replying to Soean:
Hallo @manchumahara
thanks for your patch. You also have to add the@sincetag in the filter comment.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
added a patch for the changes need