WordPress.org

Ready to get started?Download WordPress

Forums

Custom List Table Example
[resolved] Sort Order on Original Sorted Column always Descending (2 posts)

  1. AJ Mallory
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/custom-list-table-example/

  2. Matt van Andel
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Jason!

    I'll update the plugin ASAP.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic