格式化URL以使用https。
原型
filter_SSL( string $url )
描述
有用的过滤器。
参数
$url
(string)
(Required)
网址
返回值
(string)
以https作为方案的URL
源文件
路径:wp-includes/ms-functions.php
<?php
...
function filter_SSL( $url ) {
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;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/filter_ssl/