[wp-trac] [WordPress Trac] #34479: New get_orderby() method of class-wp-posts-list-table.class doesn't allow query orderby var to be an array

WordPress Trac noreply at wordpress.org
Wed Nov 4 01:20:51 UTC 2015


#34479: New get_orderby() method of class-wp-posts-list-table.class doesn't allow
query orderby var to be an array
-------------------------------+------------------------------
 Reporter:  szaqal21           |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:  administration
-------------------------------+------------------------------

Comment (by bradyvercher):

 I just ran into a similar issue today where
 `WP_Posts_List_Table::get_orderby()` method doesn't work when doing
 `$wp_query->set( 'orderby', 'meta_value' )`. The list is sorted correctly
 when clicking a column header the first time, but reversing the direction
 doesn't work since it looks like the `orderby` query var needs to match
 the column key here: https://core.trac.wordpress.org/browser/trunk/src/wp-
 admin/includes/class-wp-list-table.php?rev=35489#L1112

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34479#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list