Changeset 58097 for trunk/src/wp-admin/network/site-info.php
- Timestamp:
- 05/04/2024 07:23:31 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/site-info.php
r56409 r58097 67 67 68 68 $blog_data['scheme'] = $update_parsed_url['scheme']; 69 70 // Make sure to not lose the port if it was provided. 69 71 $blog_data['domain'] = $update_parsed_url['host']; 70 $blog_data['path'] = $update_parsed_url['path']; 72 if ( isset( $update_parsed_url['port'] ) ) { 73 $blog_data['domain'] .= ':' . $update_parsed_url['port']; 74 } 75 76 $blog_data['path'] = $update_parsed_url['path']; 71 77 } 72 78 … … 89 95 $old_home_url = trailingslashit( esc_url( get_option( 'home' ) ) ); 90 96 $old_home_parsed = parse_url( $old_home_url ); 91 92 if ( $old_home_parsed['host'] === $existing_details->domain && $old_home_parsed['path'] === $existing_details->path ) { 97 $old_home_host = $old_home_parsed['host'] . ( isset( $old_home_parsed['port'] ) ? ':' . $old_home_parsed['port'] : '' ); 98 99 if ( $old_home_host === $existing_details->domain && $old_home_parsed['path'] === $existing_details->path ) { 93 100 $new_home_url = untrailingslashit( sanitize_url( $blog_data['scheme'] . '://' . $new_details->domain . $new_details->path ) ); 94 101 update_option( 'home', $new_home_url ); … … 97 104 $old_site_url = trailingslashit( esc_url( get_option( 'siteurl' ) ) ); 98 105 $old_site_parsed = parse_url( $old_site_url ); 99 100 if ( $old_site_parsed['host'] === $existing_details->domain && $old_site_parsed['path'] === $existing_details->path ) { 106 $old_site_host = $old_site_parsed['host'] . ( isset( $old_site_parsed['port'] ) ? ':' . $old_site_parsed['port'] : '' ); 107 108 if ( $old_site_host === $existing_details->domain && $old_site_parsed['path'] === $existing_details->path ) { 101 109 $new_site_url = untrailingslashit( sanitize_url( $blog_data['scheme'] . '://' . $new_details->domain . $new_details->path ) ); 102 110 update_option( 'siteurl', $new_site_url );
Note: See TracChangeset
for help on using the changeset viewer.