WordPress开发者和主题制作者的搜索引擎



get_site_option ›

Since2.8.0
已弃用n/a
get_site_option ( $option, $default = false, $deprecated = true )
参数: (3)
  • (string) $option Name of option to retrieve. Expected to not be SQL-escaped.
    Required: Yes
  • (mixed) $default Optional value to return if option doesn't exist. Default false.
    Required: No
    默认: false
  • (bool) $deprecated Whether to use cache. Multisite only. Always set to true.
    Required: No
    默认: true
查看:
返回:
  • (mixed) Value set for the option.
定义在:
文档:
Change Log:
  • 4.4.0
  • 4.4.0

Retrieve an option value for the current network based on name of option.



源码

function get_site_option( $option, $default = false, $deprecated = true ) {
	return get_network_option( null, $option, $default );
}