get_blog_count()

获取站点的总数(多站点)

描述

Get the number of active sites on your installation.

Note: The count is cached and updated twice daily. This is not a live count.

用法


 */<?php $blogs = get_blog_count( $id ) ?>

参数

$id

(integer) (可选) A site_id

默认值: 0

返回值

integer 

The number of active sites

历史

添加于 版本: 1.0

源文件

get_blog_count() 函数的代码位于 /wp-includes/ms-functions.php.

* 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’ );

}
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索