WP_Users_List_Table::get_columns() WordPress Method

The WP_Users_List_Table::get_columns() method is used to get the columns for the users list table.

WP_Users_List_Table::get_columns() #

Get a list of columns for the list table.


Return

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


Top ↑

Source

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

	public function get_columns() {
		$c = 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( $c['posts'] );
		}

		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.