WP_Users_List_Table::get_sortable_columns() WordPress Method

The WP_Users_List_Table::get_sortable_columns() method allows you to define which columns are sortable in the WordPress user list table. By default, the columns that are sortable are the user ID, username, name, email, and registered date.

WP_Users_List_Table::get_sortable_columns() #

Get a list of sortable columns for the list table.


Return

(array) Array of sortable columns.


Top ↑

Source

File: wp-admin/includes/class-wp-users-list-table.php

	protected function get_sortable_columns() {
		$c = array(
			'username' => 'login',
			'email'    => 'email',
		);

		return $c;
	}

Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.