update_home_siteurl( string $old_value, string $value )

In this article

Flushes rewrite rules if siteurl, home or page_on_front changed.

Parameters

$old_valuestringrequired
$valuestringrequired

Source

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

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.