update_home_siteurl

Advertisement

Summery Summery

Flushes rewrite rules if siteurl, home or page_on_front changed.

Syntax Syntax

update_home_siteurl( string $old_value, string $value )

Parameters Parameters

$old_value

(string) (Required)

$value

(string) (Required)

Source 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();
	}
}

Advertisement

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.