WP_Users_List_Table::get_columns(): string[]

In this article

Gets a list of columns for the list table.

Return

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

Source

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

Changelog

VersionDescription
3.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.