force_ssl_content

函式
force_ssl_content ( $force = '' )
引數
  • (bool) $force
    Required:
    Default: (empty)
返回值
  • (bool) True if forced, false if not forced.
定義位置
相關方法
force_ssl_loginforce_ssl_adminwp_ssl_constantsthe_contentget_the_content
引入
2.8.5
棄用
-

force_ssl_content: 這個函式用於強制對WordPress網站上的所有內容進行SSL加密。這對於確保敏感的使用者資料,如登入憑證和個人資訊,被安全地傳輸是很重要的。

決定是否對內容強制使用SSL。

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

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

	return $forced_content;
}

常見問題

FAQs
檢視更多 >