update_home_siteurl

Flushes rewrite rules if siteurl, home or page_on_front changed.

Description

update_home_siteurl( (string) $old_value, (string) $value ); 

Parameters (2)

0. $old_value (string)
The old value.
1. $value (string)
The value.

Usage

  1. if ( !function_exists( 'update_home_siteurl' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/misc.php'; 
  3.  
  4. // The old value. 
  5. $old_value = ''; 
  6.  
  7. // The value. 
  8. $value = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = update_home_siteurl($old_value, $value); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/misc.php  
  1. function update_home_siteurl( $old_value, $value ) { 
  2. if ( wp_installing() ) 
  3. return; 
  4.  
  5. if ( is_multisite() && ms_is_switched() ) { 
  6. delete_option( 'rewrite_rules' ); 
  7. } else {