summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/network.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wp-admin/includes/network.php29
1 files changed, 6 insertions, 23 deletions
diff --git a/wp-admin/includes/network.php b/wp-admin/includes/network.php
index 6a85b6f..fb3d8d2 100644
--- a/wp-admin/includes/network.php
+++ b/wp-admin/includes/network.php
@@ -33,8 +33,9 @@ function network_domain_check() {
* @return bool Whether subdomain installation is allowed
*/
function allow_subdomain_install() {
- $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) );
- if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' === $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) {
+ $home = get_option( 'home' );
+ $domain = parse_url( $home, PHP_URL_HOST );
+ if ( parse_url( $home, PHP_URL_PATH ) || 'localhost' === $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) {
return false;
}
@@ -148,26 +149,8 @@ function network_step1( $errors = false ) {
die();
}
- $hostname = get_clean_basedomain();
- $has_ports = strstr( $hostname, ':' );
- if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ), true ) ) ) {
- wp_admin_notice(
- '<strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ),
- array(
- 'additional_classes' => array( 'error' ),
- )
- );
-
- echo '<p>' . sprintf(
- /* translators: %s: Port number. */
- __( 'You cannot use port numbers such as %s.' ),
- '<code>' . $has_ports . '</code>'
- ) . '</p>';
- echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Go to Dashboard' ) . '</a>';
- echo '</div>';
- require_once ABSPATH . 'wp-admin/admin-footer.php';
- die();
- }
+ // Strip standard port from hostname.
+ $hostname = preg_replace( '/(?::80|:443)$/', '', get_clean_basedomain() );
echo '<form method="post">';
@@ -694,7 +677,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 );
printf(
/* translators: %s: Documentation URL. */
__( 'It seems your network is running with Nginx web server. <a href="%s">Learn more about further configuration</a>.' ),
- __( 'https://wordpress.org/documentation/article/nginx/' )
+ __( 'https://developer.wordpress.org/advanced-administration/server/web-server/nginx/' )
);
echo '</p></li>';