update_network_cache
函数
update_network_cache ( $networks )
- 参数
-
-
(array)
$networks
Array of network row objects.- Required: 是
-
(array)
- 定义位置
-
-
wp-includes/ms-network.php
, line 113
-
wp-includes/ms-network.php
- 引入
- 4.6.0
- 弃用
- –
Updates the network cache of given networks.
Will add the networks in $networks to the cache. If network ID already exists
in the network cache then it will not be updated. The network is added to the
cache using the network group with the key using the ID of the networks.
function update_network_cache( $networks ) { $data = array(); foreach ( (array) $networks as $network ) { $data[ $network->id ] = $network; } wp_cache_add_multiple( $data, 'networks' ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。