get_sitestats() WordPress Function

The get_sitestats() function is used to retrieve the statistics for a WordPress site. The function accepts two parameters: the first is the blog ID, and the second is a Boolean value that determines whether to include the blog's internal search engine statistics.

get_sitestats() #

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.


Top ↑

Source

File: wp-includes/ms-functions.php

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

	return $stats;
}


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

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.

Show More
Show More