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

返回介绍

wp_cache_switch_to_blog()

发布于 2017-09-11 字数1257 浏览 860 评论 0

wp_cache_switch_to_blog( int $blog_id )

Switches the internal blog ID.


描述

This changes the blog id used to create keys in blog specific groups.


参数

$blog_id

(int)
(Required)
Site ID.


源代码

File: wp-includes/cache.php

function wp_cache_switch_to_blog( $blog_id ) {
	global $wp_object_cache;

	$wp_object_cache->switch_to_blog( $blog_id );
}

更新日志

Version 描述
3.5.0 Introduced.

相关函数

Uses

  • wp-includes/cache.php:
    WP_Object_Cache::switch_to_blog()

Used By

  • wp-includes/load.php:
    wp_start_object_cache()
  • wp-includes/ms-blogs.php:
    switch_to_blog()
  • wp-includes/ms-blogs.php:
    restore_current_blog()

User Contributed Notes

上一篇:wp_cache_set()

下一篇:wp_calculate_image_sizes()

发布评论

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

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