Gets a list of sortable columns.
protected function get_sortable_columns() {
/*
* The initial sorting is by 'Requested' (post_date) and descending.
* With initial sorting, the first click on 'Requested' should be ascending.
* With 'Requester' sorting active, the next click on 'Requested' should be descending.
*/
$desc_first = isset( $_GET['orderby'] );
return array(
'email' => 'requester',
'created_timestamp' => array( 'requested', $desc_first ),
);
}
| Version | Description |
|---|---|
| 4.9.6 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns