W3cubDocs

/WordPress

get_sitestats(): int[]

Gets the network’s site and user counts.

Return

int[] Site and user count for the network.
  • blogs int
    Number of sites on the network.
  • users int
    Number of users on the network.

Source

function get_sitestats() {
	$stats = array(
		'blogs' => get_blog_count(),
		'users' => get_user_count(),
	);

	return $stats;
}

Changelog

Version Description
MU (3.0.0) Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_sitestats