Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
update_site_option() - 更新已为当前网络添加的选项的值 - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / update_site_option()

update_site_option( string $option, mixed $value )

更新已为当前网络添加的选项的值


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 3 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "925eb4dd112d310a212174f2ce78e60e" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "4febbaed98554de8e100d42aba840671" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "695e26344bf6b93a90c09638f4de9e10" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

option 选项more...

sitemore...

updatemore...


描述

另见


参数

$option

(string)(必填) 选项的名称。预期不会进行SQL转义。

$value

(mixed)(必填) 选项值。预期不会进行SQL转义。


返回

(bool) 如果值已更新,则为true,否则为false。



源码

查看源码 官方文档


更新日志

版本描述
4.4.0已修改为update_network_option()的封装器
2.8.0开始引入

使用示例

  • 示例1

    从4.0开始,不管函数名如何,该值都存储在网络的sitemeta表中,而不是站点的options表中。