WP_Users_List_Table::display_rows() WordPress Method

The WP_Users_List_Table::display_rows() method is used to display the rows of users in a list table. The method takes two arguments: the user object and the list table object. The method first calls the parent::display_rows() method to display the header and footer rows. Then, the method loops through the user object and displays each user in a new row.

WP_Users_List_Table::display_rows() #

Generate the list table rows.


Source

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

	public function display_rows() {
		// Query the post counts for this page.
		if ( ! $this->is_site_users ) {
			$post_counts = count_many_users_posts( array_keys( $this->items ) );
		}

		foreach ( $this->items as $userid => $user_object ) {
			echo "\n\t" . $this->single_row( $user_object, '', '', isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
		}
	}


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.