[wp-trac] [WordPress Trac] #41924: get_{$adjacent}_post_sort filter should have $order parameter

WordPress Trac noreply at wordpress.org
Wed Sep 20 04:57:28 UTC 2017


#41924: get_{$adjacent}_post_sort filter should have $order parameter
--------------------------+-----------------------------
 Reporter:  manchumahara  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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"

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41924>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list