From 1872e759ea50a06f26f8f36bcab6c5303cc3c948 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 5 Aug 2015 03:33:53 +0000 Subject: [PATCH] Multisite: Use single URL input when editing sites in a subdirectory configuration In [32759], we adjusted `site-info.php` to display a single input for a site's full URL if the network was configured for subdomains. We also enforced path only editing for non-subdomain networks, which is a regression in expected behavior. The full URL of a site can now be edited in both subdomain and subdirectory configurations. Props @michaelryanmcneill. Fixes #22383. git-svn-id: https://develop.svn.wordpress.org/trunk@33586 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/network/site-info.php | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/src/wp-admin/network/site-info.php b/src/wp-admin/network/site-info.php index 08733f85fd..5e7e620a01 100644 --- a/src/wp-admin/network/site-info.php +++ b/src/wp-admin/network/site-info.php @@ -68,8 +68,8 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) { // On the network's main site, don't allow the domain or path to change. $blog_data['domain'] = $details->domain; $blog_data['path'] = $details->path; - } elseif ( is_subdomain_install() ) { - // All parts of a URL can be updated for a subdomain configuration. We first + } else { + // For any other site, the scheme, domain, and path can all be changed. We first // need to ensure a scheme has been provided, otherwise fallback to the existing. $new_url_scheme = parse_url( $blog_data['url'], PHP_URL_SCHEME ); @@ -81,9 +81,6 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) { $blog_data['scheme'] = $update_parsed_url['scheme']; $blog_data['domain'] = $update_parsed_url['host']; $blog_data['path'] = $update_parsed_url['path']; - } else { - // Only the path can be updated for a subdirectory configuration, so capture existing domain. - $blog_data['domain'] = $details->domain; } $existing_details = get_blog_details( $id, false ); @@ -174,26 +171,12 @@ if ( ! empty( $messages ) ) { siteurl ); ?> + // For any other site, the scheme, domain, and path can all be changed. + else : ?> - - - - domain ); ?> - - - - -
- -