force_ssl_admin

函数
force_ssl_admin ( $force = null )
参数
  • (string|bool) $force Optional. Whether to force SSL in admin screens. Default null.
    Required:
    Default: null
返回值
  • (bool) True if forced, false if not forced.
定义位置
相关方法
force_ssl_loginforce_ssl_contentis_adminrevoke_super_adminformat_code_lang
引入
2.6.0
弃用
-

force_ssl_admin: 这个函数用于强制对WordPress管理区进行SSL加密。这对于确保敏感的用户数据,如登录凭证,被安全地传输是很重要的。

决定是否强制为管理屏幕使用SSL。

function force_ssl_admin( $force = null ) {
	static $forced = false;

	if ( ! is_null( $force ) ) {
		$old_forced = $forced;
		$forced     = $force;
		return $old_forced;
	}

	return $forced;
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-06 11:33:17

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

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

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