Opened 7 years ago
Closed 7 years ago
#41924 closed enhancement (fixed)
get_{$adjacent}_post_sort filter should have $order parameter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | good-first-bug needs-refresh |
Focuses: | Cc: |
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
@
7 years ago
- Component changed from General to Posts, Post Types
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to Future Release
#2
follow-up:
↓ 3
@
7 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
@
7 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@since
tag in the filter comment.
added a patch for the changes need