W3cubDocs

/WordPress

update_home_siteurl( string $old_value, string $value )

Flushes rewrite rules if siteurl, home or page_on_front changed.

Parameters

$old_value

(string) (Required)

$value

(string) (Required)

Source

File: wp-admin/includes/misc.php

function update_home_siteurl( $old_value, $value ) {
	if ( wp_installing() ) {
		return;
	}

	if ( is_multisite() && ms_is_switched() ) {
		delete_option( 'rewrite_rules' );
	} else {
		flush_rewrite_rules();
	}
}

Changelog

Version Description
2.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/update_home_siteurl