Created
January 23, 2021 09:47
-
-
Save gvgvgvijayan/5e1cfc08746d47f02205688914816e84 to your computer and use it in GitHub Desktop.
This gist is used in the tutorial https://www.vijayan.in/how-to-create-custom-table-list-in-wordpress-admin-page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
/** | |
* Include the columns which can be sortable. | |
* | |
* @return Array $sortable_columns Return array of sortable columns. | |
*/ | |
public function get_sortable_columns() { | |
return array( | |
'title' => array( 'title', false ), | |
'type' => array( 'type', false ), | |
'date' => array( 'date', false ), | |
'author' => array( 'author', false ), | |
); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment