From 1e5b0ff0fa740defeec1ee092ab875eb96dc46a5 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 5 Aug 2015 03:34:25 +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. Built from https://develop.svn.wordpress.org/trunk@33586 git-svn-id: http://core.svn.wordpress.org/trunk@33553 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/site-info.php | 25 ++++--------------------- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php index 08733f85fd..5e7e620a01 100644 --- a/wp-admin/network/site-info.php +++ b/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 ); ?> - - - - -
- - diff --git a/wp-includes/version.php b/wp-includes/version.php index 4e2e30cb08..f1531db02e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-RC2-33585'; +$wp_version = '4.3-RC2-33586'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.