是否强制使用用于管理屏幕的SSL。
原型
force_ssl_admin( string|bool $force = null )
参数
$force
(string|bool)
(Optional)
是否在管理员屏幕中强制使用SSL。
返回值
(bool)
如果强迫则为真,如果不强迫则为假。
源文件
路径:wp-includes/functions.php
<?php
...
function force_ssl_admin( $force = null ) {
static $forced = false;
if ( !is_null( $force ) ) {
$old_forced = $forced;
$forced = $force;
return $old_forced;
}
return $forced;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/force_ssl_admin/