WP_Privacy_Requests_Table::get_sortable_columns()protectedWP 4.9.6

Gets a list of sortable columns.

Метод класса: WP_Privacy_Requests_Table{}

Хуков нет.

Возвращает

Массив. Default sortable columns.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_sortable_columns();

Список изменений

С версии 4.9.6 Введена.

Код WP_Privacy_Requests_Table::get_sortable_columns() WP 6.5.2

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