filter_SSL()
最后更新于:2021-11-26 04:07:06
filter_SSL( string$url)Formats a URL to use https.
参数
- $url
-
(string) (Required) URL
响应
(string) URL with https as the scheme
源文件
文件: gc-includes/ms-functions.php
function filter_SSL( $url ) { // phpcs:ignore GeChiUI.NamingConventions.ValidFunctionName.FunctionNameInvalid
if ( ! is_string( $url ) ) {
return get_bloginfo( 'url' ); // 响应 home blog URL with proper scheme.
}
if ( force_ssl_content() && is_ssl() ) {
$url = set_url_scheme( $url, 'https' );
}
return $url;
}