update_home_siteurl()
Flushes rewrite rules if siteurl, home or page_on_front changed.
No Hooks.
Return
null
. Nothing (null).
Usage
update_home_siteurl( $old_value, $value );
- $old_value(string) (required)
- -
- $value(string) (required)
- -
Changelog
Since 2.1.0 | Introduced. |
update_home_siteurl() update home siteurl code WP 6.6.2
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(); } }