WP HOOKS
filtrod 5.7.0

wp_should_replace_insecure_home_url

Args 1Plik wp-includes/https-migration.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters 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. This filter can be used to disable that behavior, e.g. after having replaced URLs manually in the database.

Parametry

ParametrTypOpis
$should_replace_insecure_home_urlboolWhether insecure HTTP URLs to the site should be replaced.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'wp_should_replace_insecure_home_url', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii