Title: WP_Privacy_Requests_Table::get_sortable_columns
Published: October 5, 2018
Last modified: May 20, 2026

---

# WP_Privacy_Requests_Table::get_sortable_columns(): array

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#wp--skip-link--target)

Gets a list of sortable columns.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#return)󠁿

 array Default sortable columns.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#source)󠁿

    ```php
    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 ),
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-privacy-requests-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-wp-privacy-requests-table.php#L75)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-wp-privacy-requests-table.php#L75-L87)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_privacy_requests_table/get_sortable_columns/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.9.6](https://developer.wordpress.org/reference/since/4.9.6/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_privacy_requests_table%2Fget_sortable_columns%2F)
before being able to contribute a note or feedback.