wp_get_sites()返回多站点信息

目录

描述

Return an array of sites in a WordPress Multisite network.

wp_get_sites() 描述

用法

 <?php wp_get_sites$args ); ?> 

Default Usage

wp_get_sites() 用法

参数

$args

(array) (可选) An array of arguments.

默认值: null

wp_get_sites() 参数

注意

If wp_is_large_network() returns TRUE, wp_get_sites() will return an empty array. By default wp_is_large_network() returns TRUE if there are 10,000 or more sites in your network. This can be 过滤器ed using the wp_is_large_network 过滤器.

Each site's array is composed entirely of string values, even for numeric values. This means that == or !=, not === or !==, should be used to compare [blog_id] to get_current_blog_id(), which returns an integer value.

wp_get_sites() 注意

历史

添加于 版本: 3.7

wp_get_sites() 历史

源文件

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

wp_get_sites() 源文件

相关