[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
HTTPS migration functions.
File Size: | 140 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
wp_should_replace_insecure_home_url() X-Ref |
Checks whether WordPress should replace old HTTP URLs to the site with their HTTPS counterpart. If a WordPress site had its URL changed from HTTP to HTTPS, by default this will return `true`, causing WordPress to add frontend filters to replace insecure site URLs that may be present in older database content. The {@see 'wp_should_replace_insecure_home_url'} filter can be used to modify that behavior. return: bool True if insecure URLs should replaced, false otherwise. since: 5.7.0 |
wp_replace_insecure_home_url( $content ) X-Ref |
Replaces insecure HTTP URLs to the site in the given content, if configured to do so. This function replaces all occurrences of the HTTP version of the site's URL with its HTTPS counterpart, if determined via {@see wp_should_replace_insecure_home_url()}. param: string $content Content to replace URLs in. return: string Filtered content. since: 5.7.0 |
wp_update_urls_to_https() X-Ref |
Update the 'home' and 'siteurl' option to use the HTTPS variant of their URL. If this update does not result in WordPress recognizing that the site is now using HTTPS (e.g. due to constants overriding the URLs used), the changes will be reverted. In such a case the function will return false. return: bool True on success, false on failure. since: 5.7.0 |
wp_update_https_migration_required( $old_url, $new_url ) X-Ref |
Updates the 'https_migration_required' option if needed when the given URL has been updated from HTTP to HTTPS. If this is a fresh site, a migration will not be required, so the option will be set as `false`. This is hooked into the {@see 'update_option_home'} action. param: mixed $old_url Previous value of the URL option. param: mixed $new_url New value of the URL option. since: 5.7.0 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |