diff --git a/wp-admin/network.php b/wp-admin/network.php index 4a41dbea5..3413cba05 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -53,15 +53,21 @@ function network_step1() { $active_plugins = get_option( 'active_plugins' ); if ( ! empty( $active_plugins ) ) { - printf( '

' . __( 'Please deactivate your plugins before enabling the Network feature. Once the network is created, you may reactivate your plugins.' ) . '

', admin_url( 'plugins.php' ) ); + echo '

' . __('Warning:') . ' ' . sprintf( __( 'Please deactivate your plugins before enabling the Network feature.' ), admin_url( 'plugins.php' ) ) . '

' . __(' Once the network is created, you may reactivate your plugins.' ) . '

'; include( './admin-footer.php' ); die(); } $hostname = get_clean_basedomain(); - if ( preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) { - echo '

' . __('You cannot install a network of sites with your server address.' ) . '

'; - echo '

' . __('You cannot use an IP address such as 127.0.0.1.' ) . '

'; + $has_ports = strstr( $hostname, ':' ); + if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) + || ( $no_ip = preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $hostname ) ) ) { + echo '

' . __( 'Error:') . ' ' . __( 'You cannot install a network of sites with your server address.' ) . '

'; + if ( $no_ip ) + echo '

' . __('You cannot use an IP address such as 127.0.0.1.' ) . '

'; + else + echo '

' . sprintf( __('You cannot use port numbers such as %s.' ), $has_ports ) . '

'; + echo '' . __( 'Return to Dashboard' ) . ''; include( './admin-footer.php' ); die(); } @@ -244,7 +250,7 @@ RewriteRule . index.php [L]'; -

Once you complete these steps, your network is enabled and configured. Return to Dashboard

+