update_network_cache() - WordPress 函数参考中文文档

返回介绍

update_network_cache()

发布于 2017-09-11 字数1340 浏览 863 评论 0

update_network_cache( array $networks )

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.


参数

$networks

(array)
(Required)
Array of network row objects.


源代码

File: wp-includes/ms-blogs.php

function update_network_cache( $networks ) {
	foreach ( (array) $networks as $network ) {
		wp_cache_add( $network->id, $network, 'networks' );
	}
}

更新日志

Version 描述
4.6.0 Introduced.

相关函数

Uses

  • wp-includes/cache.php:
    wp_cache_add()

Used By

  • wp-includes/ms-blogs.php:
    _prime_network_caches()

User Contributed Notes

上一篇:update_nag()

下一篇:update_network_option()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!