update_network_cache()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
update_network_cache( array $networks )
Описание
Добавляет сети из $networks в кэш. Если ID сети уже есть в кэше сетей, он не будет обновлён. Сеть добавляется в кэш с использованием группы сетей и ключа, равного ID сети.
Оригинал (английский)
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
обязательный
Исходный код
wp-includes/ms-network.php:113
function update_network_cache( $networks ) {
$data = array();
foreach ( (array) $networks as $network ) {
$data[ $network->id ] = $network;
}
wp_cache_add_multiple( $data, 'networks' );
}
История изменений
| Версия | Описание |
|---|---|
| 4.6.0 | Introduced. |

