the_networks
云策文档标注
概述
the_networks 是一个 WordPress 过滤器,用于修改网络查询结果。它允许开发者在获取网络列表时自定义返回的 WP_Network 对象数组。
关键要点
- 过滤器名称:the_networks
- 参数:$_networks(WP_Network 对象数组)和 $query(WP_Network_Query 实例引用)
- 用途:过滤 WP_Network_Query::get_networks() 返回的网络查询结果
- 引入版本:WordPress 4.6.0
原文内容
Filters the network query results.
Parameters
$_networksWP_Network[]-
An array of WP_Network objects.
$queryWP_Network_Query-
Current instance of WP_Network_Query (passed by reference).
Source
$_networks = apply_filters_ref_array( 'the_networks', array( $_networks, &$this ) );
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |