[Resolved] Sort Order on Original Sorted Column always Descending
Great example of how to implement wp_List_Table class. Really helpful thank you for putting this together. I found an issue/bug: After changing the sort order to a different column than the original column if you wish to sort the original column it always sorts in descending order.
To recreate this issue 1. run the given example code and open the ‘List Table Example’ tab. 2. Click the Rating column to change the sort order to Rating, now change try to change the sort order on the Title to be ascending. You will find that you must fist sort Title to Descending before you can sort that column in ascending order.
Fix: To correct this simply change line 256 to read `’title’ => array(‘title’,false), (change true to false) then sorting behaves as one would expect.
- The topic ‘[Resolved] Sort Order on Original Sorted Column always Descending’ is closed to new replies.