[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> https-detection.php (summary)

HTTPS detection functions.

File Size: 190 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  wp_is_using_https()
  wp_is_home_url_using_https()
  wp_is_site_url_using_https()
  wp_is_https_supported()
  wp_get_https_detection_errors()
  wp_is_local_html_output()

Functions
Functions that are not part of a class:

wp_is_using_https()   X-Ref
Checks whether the website is using HTTPS.

This is based on whether both the home and site URL are using HTTPS.

return: bool True if using HTTPS, false otherwise.

wp_is_home_url_using_https()   X-Ref
Checks whether the current site URL is using HTTPS.

return: bool True if using HTTPS, false otherwise.

wp_is_site_url_using_https()   X-Ref
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.

return: bool True if using HTTPS, false otherwise.

wp_is_https_supported()   X-Ref
Checks whether HTTPS is supported for the server and domain.

This function makes an HTTP request through `wp_get_https_detection_errors()`
to check for HTTPS support. As this process can be resource-intensive,
it should be used cautiously, especially in performance-sensitive environments,
to avoid potential latency issues.

return: bool True if HTTPS is supported, false otherwise.

wp_get_https_detection_errors()   X-Ref
Runs a remote HTTPS request to detect whether HTTPS supported, and stores potential errors.

This function checks for HTTPS support by making an HTTP request. As this process can be resource-intensive,
it should be used cautiously, especially in performance-sensitive environments.
It is called when HTTPS support needs to be validated.

return: array An array containing potential detection errors related to HTTPS, or an empty array if no errors are found.

wp_is_local_html_output( $html )   X-Ref
Checks whether a given HTML string is likely an output from this WordPress site.

This function attempts to check for various common WordPress patterns whether they are included in the HTML string.
Since any of these actions may be disabled through third-party code, this function may also return null to indicate
that it was not possible to determine ownership.

return: bool|null True/false for whether HTML was generated by this site, null if unable to determine.
param: string $html Full HTML output string, e.g. from a HTTP response.



Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref