Changeset 31156
- Timestamp:
- 01/12/2015 01:56:04 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/site-info.php
r30578 r31156 51 51 switch_to_blog( $id ); 52 52 53 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) {54 $blog_address = esc_url_raw( $_POST['blog']['domain'] . $_POST['blog']['path'] );55 if ( get_option( 'siteurl' ) != $blog_address )56 update_option( 'siteurl', $blog_address );57 58 if ( get_option( 'home' ) != $blog_address )59 update_option( 'home', $blog_address );60 }61 62 53 // Rewrite rules can't be flushed during switch to blog. 63 54 delete_option( 'rewrite_rules' ); … … 74 65 } 75 66 update_blog_details( $id, $blog_data ); 67 68 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { 69 $new_details = get_blog_details( $id, false ); 70 $blog_address = esc_url_raw( $new_details->domain . $new_details->path ); 71 if ( get_option( 'siteurl' ) != $blog_address ) { 72 update_option( 'siteurl', $blog_address ); 73 } 74 if ( get_option( 'home' ) != $blog_address ) { 75 update_option( 'home', $blog_address ); 76 } 77 } 76 78 77 79 restore_current_blog();
Note: See TracChangeset
for help on using the changeset viewer.