函数原型
filter_SSL( string $url ): string
函数描述
Formats a URL to use https.
是否弃用
未弃用
函数参数
-
$url
string
Required - URL
函数返回值
string URL with https as the scheme
函数位置
File: wp-includes/ms-functions.php.
函数源码
function filter_SSL( $url ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
if ( ! is_string( $url ) ) {
return get_bloginfo( 'url' ); // Return home blog URL with proper scheme.
}
if ( force_ssl_content() && is_ssl() ) {
$url = set_url_scheme( $url, 'https' );
}
return $url;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.8.5 | Introduced. |

