wp_should_replace_insecure_home_url WordPress Filter Hook

This hook allows you to determine whether or not the home URL should be replaced with the secure URL.

apply_filters( 'wp_should_replace_insecure_home_url', bool $should_replace_insecure_home_url ) #

Filters whether WordPress should replace old HTTP URLs to the site with their HTTPS counterpart.


Description

If a WordPress site had its URL changed from HTTP to HTTPS, by default this will return true. This filter can be used to disable that behavior, e.g. after having replaced URLs manually in the database.


Top ↑

Parameters

$should_replace_insecure_home_url

(bool)Whether insecure HTTP URLs to the site should be replaced.


Top ↑

Source

File: wp-includes/https-migration.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.