WP_Users_List_Table::get_columns()publicWP 3.1.0

Gets a list of columns for the list table.

Method of the class: WP_Users_List_Table{}

No Hooks.

Return

String[]. Array of column titles keyed by their column name.

Usage

$WP_Users_List_Table = new WP_Users_List_Table();
$WP_Users_List_Table->get_columns();

Changelog

Since 3.1.0 Introduced.

WP_Users_List_Table::get_columns() code WP 6.6.2

public function get_columns() {
	$columns = array(
		'cb'       => '<input type="checkbox" />',
		'username' => __( 'Username' ),
		'name'     => __( 'Name' ),
		'email'    => __( 'Email' ),
		'role'     => __( 'Role' ),
		'posts'    => _x( 'Posts', 'post type general name' ),
	);

	if ( $this->is_site_users ) {
		unset( $columns['posts'] );
	}

	return $columns;
}