[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

HTTPS detection functions.

File Size: 188 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.

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 internal function is called by a regular Cron hook to ensure HTTPS support is detected and maintained.


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 : Tue Dec 3 08:20:01 2024 Cross-referenced by PHPXref