wpseek.com
A WordPress-centric search engine for devs and theme authors



update_home_siteurl › WordPress Function

Since2.1.0
Deprecatedn/a
update_home_siteurl ( $old_value, $value )
Parameters: (2)
  • (string) $old_value
    Required: Yes
  • (string) $value
    Required: Yes
Defined at:
Codex:

Flushes rewrite rules if `siteurl`, `home` or `page_on_front` changed.



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