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。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function force_ssl_admin( $force = null ) {
static $forced = false;
if ( ! is_null( $force ) ) {
$old_forced = $forced;
$forced = $force;
return $old_forced;
}
return $forced;
}
function force_ssl_admin( $force = null ) { static $forced = false; if ( ! is_null( $force ) ) { $old_forced = $forced; $forced = $force; return $old_forced; } return $forced; }
function force_ssl_admin( $force = null ) {
	static $forced = false;

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

	return $forced;
}

常見問題

FAQs
檢視更多 >