函数原型
get_blog_count( int|null $network_id = null ): int
函数描述
Gets the number of active sites on the installation.
是否弃用
未弃用
函数参数
-
$network_id
int|null
Optional - ID of the network. Default is the current network.
Default:
null
函数返回值
int Number of active sites on the network.
函数位置
File: wp-includes/ms-functions.php.
函数源码
function get_blog_count( $network_id = null ) {
return get_network_option( $network_id, 'blog_count' );
}
源码链接
变更日志
| Version | Description |
|---|---|
| MU (3.0.0) | MU (3.0.0) |
| 4.8.0 | The $network_id parameter is now being used. |
| 3.7.0 | Introduced. |

