get_site_option

函数
get_site_option ( $option, $default = false, $deprecated = true )
参数
  • (string) $option Name of the option to retrieve. Expected to not be SQL-escaped.
    Required:
  • (mixed) $default Optional. Value to return if the option doesn't exist. Default false.
    Required:
    Default: false
  • (bool) $deprecated Whether to use cache. Multisite only. Always set to true.
    Required:
    Default: true
返回值
  • (mixed) Value set for the option.
相关
  • get_network_option()
定义位置
相关方法
get_user_optiondelete_site_optionadd_site_optionget_optionupdate_site_option
引入
2.8.0
弃用
-

get_site_option: 该函数为一个站点检索一个特定的选项值。它需要两个参数:选项的名称和网站的ID。它返回选项值。

根据选项的名称,检索当前网络的选项值。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-06 03:33:08

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: