get_blog_count()
get_blog_count( int|null $network_id = null )
安装中活动站点的数目。
The number of active sites on your installation.
说明(Description)
每天缓存和更新两次计数。这不是现场清点。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$network_id | (int | null) | 可选 | 网络的ID。默认为当前网络。 |
返回(Return)
(int)网络上活动站点的数量。
源码(Source)
/** * The number of active sites on your installation. * * The count is cached and updated twice daily. This is not a live count. * * @since MU 1.0 * * @param int $network_id Deprecated, not supported. * @return int */ function get_blog_count( $network_id = 0 ) { if ( func_num_args() ) _deprecated_argument( __FUNCTION__, '3.1' ); return get_site_option( 'blog_count' ); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
MU (3.0.0) | wp-includes/ms-functions.php:130 | 5 | 1 function |
get_blog_count() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_blog_count/