get_site_option()
最后更新于:2021-11-27 00:28:04
get_site_option( string$option, mixed$default=false, bool$deprecated=true)Retrieve an option value for the current network based on name of option.
参数
- $option
-
(string) (Required) Name of the option to retrieve. Expected to not be SQL-escaped.
- $default
-
(mixed) (Optional) Value to return if the option doesn’t exist.
Default value: false
- $deprecated
-
(bool) (Optional) Whether to use cache. Multisite only. Always set to true.
Default value: true
响应
(mixed) Value set for the option.
源文件
文件: gc-includes/option.php
function get_site_option( $option, $default = false, $deprecated = true ) {
return get_network_option( null, $option, $default );
}