1. 首页
  2. WordPress 函数手册

get_sitestats()

get_sitestats()

获取网络的站点和用户计数。
Gets the network’s site and user counts.

目录锚点:#返回#源码


返回(Return)

(int[])网络的站点和用户计数。’blogs’(int[])网络上的站点数。


源码(Source)

/**
 * Gets the network's site and user counts.
 *
 * @since MU 1.0
 *
 * @return array Site and user count for the network.
 */
function get_sitestats() {
	$stats = array(
		'blogs' => get_blog_count(),
		'users' => get_user_count(),
	);

	return $stats;
}
更新版本 源码位置 使用 被使用
MU (3.0.0) wp-includes/ms-functions.php:22 0 2

get_sitestats() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_sitestats/