wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_is_site_url_using_https › WordPress Function
Since5.7.0
已弃用n/a
› wp_is_site_url_using_https ( 没有参数 )
查看: |
|
返回: |
|
定义在: |
|
文档: |
Checks whether the current site's URL where WordPress is stored is using HTTPS.
This checks the URL where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.Related Functions: wp_is_home_url_using_https, wp_is_using_https, wp_update_urls_to_https, wp_is_site_initialized, wp_set_link_cats
源码
function wp_is_site_url_using_https() { /* * Use direct option access for 'siteurl' and manually run the 'site_url' * filter because `site_url()` will adjust the scheme based on what the * current request is using. */ /** This filter is documented in wp-includes/link-template.php */ $site_url = apply_filters( 'site_url', get_option( 'siteurl' ), '', null, null ); return 'https' === wp_parse_url( $site_url, PHP_URL_SCHEME ); }