WordPress at Your Fingertips
function is not described

WP_MS_Sites_List_Table::column_users() public WP 4.3.0

Handles the users column output.

{} It's a method of the class: WP_MS_Sites_List_Table{}

No Hooks.

Return

null. Nothing.

Usage

$WP_MS_Sites_List_Table = new WP_MS_Sites_List_Table();
$WP_MS_Sites_List_Table->column_users( $blog );
$blog(array) (required)
Current site.

Changelog

Since 4.3.0 Introduced.

Code of WP_MS_Sites_List_Table::column_users() WP 5.8.2

public function column_users( $blog ) {
	$user_count = wp_cache_get( $blog['blog_id'] . '_user_count', 'blog-details' );
	if ( ! $user_count ) {
		$blog_users = new WP_User_Query(
			array(
				'blog_id'     => $blog['blog_id'],
				'fields'      => 'ID',
				'number'      => 1,
				'count_total' => true,
			)
		);
		$user_count = $blog_users->get_total();
		wp_cache_set( $blog['blog_id'] . '_user_count', $user_count, 'blog-details', 12 * HOUR_IN_SECONDS );
	}

	printf(
		'<a href="%s">%s</a>',
		esc_url( network_admin_url( 'site-users.php?id=' . $blog['blog_id'] ) ),
		number_format_i18n( $user_count )
	);
}