network_step1

The timeline below displays how wordpress function network_step1 has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such.
 *       Navigating to Tools > Network should not be a sudden "Welcome to a new install process!
 *       Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param false|WP_Error $errors Optional. Error object. Default false.
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        $cannot_define_constant_message = '<strong>' . __('Error:') . '</strong> ';
        $cannot_define_constant_message .= sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        );
        wp_admin_notice($cannot_define_constant_message, array('additional_classes' => array('error')));
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        wp_admin_notice('<strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ), array('type' => 'warning'));
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        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;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        $network_created_error_message = '<p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            $network_created_error_message .= "<p>{$error}</p>";
        }
        wp_admin_notice($network_created_error_message, array('additional_classes' => array('error'), 'paragraph_wrap' => false));
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes, true)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes, true)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. Configuration files will be created in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            $message_class = 'updated';
            $message = '<p><strong>' . __('Warning:') . '</strong> ';
            $message .= '<p>' . sprintf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            ) . '</p>';
        } elseif ($is_apache) {
            $message_class = 'error';
            $message = '<p><strong>' . __('Warning:') . '</strong> ';
            $message .= sprintf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            ) . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            $message .= '<p>' . sprintf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            ) . '</p>';
            wp_admin_notice($message, array('additional_classes' => array($message_class, 'inline'), 'paragraph_wrap' => false));
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        $subdirectory_warning_message = '<strong>' . __('Warning:') . '</strong> ';
        $subdirectory_warning_message .= __('Subdirectory networks may not be fully compatible with custom wp-content directories.');
        wp_admin_notice($subdirectory_warning_message, array('additional_classes' => array('error', 'inline')));
    }
    $is_www = str_starts_with($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('You should consider changing your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 6.3

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such.
 *       Navigating to Tools > Network should not be a sudden "Welcome to a new install process!
 *       Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param false|WP_Error $errors Optional. Error object. Default false.
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="notice notice-warning"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'), true)) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes, true)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes, true)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. Configuration files will be created in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = str_starts_with($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('You should consider changing your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.9

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such.
 *       Navigating to Tools > Network should not be a sudden "Welcome to a new install process!
 *       Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param false|WP_Error $errors Optional. Error object. Default false.
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="notice notice-warning"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'), true)) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes, true)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes, true)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. Configuration files will be created in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('You should consider changing your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.7

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such.
 *       Navigating to Tools > Network should not be a sudden "Welcome to a new install process!
 *       Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param false|WP_Error $errors Optional. Error object. Default false.
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="notice notice-warning"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'), true)) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes, true)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes, true)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('We recommend you change your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.6

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such.
 *       Navigating to Tools > Network should not be a sudden "Welcome to a new install process!
 *       Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="notice notice-warning"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'), true)) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes, true)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes, true)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('We recommend you change your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.5

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such.
 *       Navigating to Tools > Network should not be a sudden "Welcome to a new install process!
 *       Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="notice notice-warning"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'), true)) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes, true)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes, true)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('We recommend you change your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.4

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 *  should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="notice notice-warning"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        require_once ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('Error: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // Assume nothing.
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // Dangerous assumptions.
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache).
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR !== ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('We recommend you change your site domain to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' === $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.3

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 *  should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: URL to Plugins screen. */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network title. */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        $got_mod_rewrite = got_mod_rewrite();
        if ($got_mod_rewrite) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            printf(
                /* translators: %s: mod_rewrite */
                __('It looks like the Apache %s module is not installed.'),
                '<code>mod_rewrite</code>'
            );
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            printf(
                /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
                __('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'),
                '<code>mod_rewrite</code>',
                'https://httpd.apache.org/docs/mod/mod_rewrite.html',
                'https://www.google.com/search?q=apache+mod_rewrite'
            );
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: Host name. */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: Site URL, 2: Host name, 3: www. */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: Host name. */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: .20

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 *  should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: Plugins screen URL */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network name */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: site url, 2: host name, 3: www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 2.2

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 *  should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: Plugins screen URL */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network name */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: site url, 2: host name, 3: www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: .10

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 *  should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: Plugins screen URL */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network name */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table" role="presentation">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: site url, 2: host name, 3: www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table" role="presentation">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table" role="presentation">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><label for="sitename"><?php 
    esc_html_e('Network Title');
    ?></label></th>
				<td>
					<input name='sitename' id='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><label for="email"><?php 
    esc_html_e('Network Admin Email');
    ?></label></th>
				<td>
					<input name='email' id='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 5.1

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 *  should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: Plugins screen URL */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network name */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td>
				<?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?>
				</td>
			</tr>
		</table>

		<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p>
		<?php 
        printf(
            /* translators: 1: site url, 2: host name, 3: www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?>
		</p>
		<table class="form-table">
			<tr>
			<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
			<td>
				<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        printf(
            /* translators: 1: localhost, 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?>
				</td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td>
				<?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.9

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . sprintf(
            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
            __('The constant %s cannot be defined when creating a network.'),
            '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
        ) . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(
            /* translators: %s: Plugins screen URL */
            __('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'),
            admin_url('plugins.php?plugin_status=active')
        ) . '</p></div>';
        echo '<p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network name */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning:') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(
            /* translators: 1: site url 2: host name 3. www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td><?php 
        printf(
            /* translators: 1: localhost 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Installation');
        ?></th>
				<td><?php 
        _e('Because your installation is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning:') . ' ' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Installation');
        ?></th>
				<td><?php 
        _e('Because your installation is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory installation will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.7

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    if (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) {
        $site_name = $_POST['sitename'];
    } else {
        /* translators: %s: Default network name */
        $site_name = sprintf(__('%s Sites'), get_option('blogname'));
    }
    if (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) {
        $admin_email = $_POST['email'];
    } else {
        $admin_email = get_option('admin_email');
    }
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(
            /* translators: 1: site url 2: host name 3. www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        printf(
            /* translators: 1: localhost 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.6

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 'https://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(
            /* translators: 1: site url 2: host name 3. www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        printf(
            /* translators: 1: localhost 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.4

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        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()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions 
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('Please make sure the Apache %s module is installed as it will be used at the end of this installation.'), '<code>mod_rewrite</code>');
            echo '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ';
            /* translators: %s: mod_rewrite */
            printf(__('It looks like the Apache %s module is not installed.'), '<code>mod_rewrite</code>');
            echo '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>';
            /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite */
            printf(__('If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.'), '<code>mod_rewrite</code>', 'http://httpd.apache.org/docs/mod/mod_rewrite.html', 'http://www.google.com/search?q=apache+mod_rewrite');
            echo '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.');
        ?>
			<strong><?php 
        _e('You cannot change this later.');
        ?></strong></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(
            /* translators: 1: site url 2: host name 3. www */
            __('We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.'),
            '<code>' . substr($hostname, 4) . '</code>',
            '<code>' . $hostname . '</code>',
            '<code>www</code>'
        );
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        printf(
            /* translators: 1: localhost 2: localhost.localdomain */
            __('Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.'),
            '<code>localhost</code>',
            '<code>localhost.localdomain</code>'
        );
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(
            /* translators: %s: host name */
            __('The internet address of your network will be %s.'),
            '<code>' . $hostname . '</code>'
        );
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.3

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 *
 * @global bool $is_apache
 *
 * @param WP_Error $errors
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        echo '<p>' . sprintf(__('You cannot use port numbers such as <code>%s</code>.'), $has_ports) . '</p>';
        echo '<a href="' . esc_url(admin_url()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ' . __('Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.') . '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('It looks like the Apache <code>mod_rewrite</code> module is not installed.') . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>' . __('If <code>mod_rewrite</code> is disabled, ask your administrator to enable that module, or look at the <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">Apache documentation</a> or <a href="http://www.google.com/search?q=apache+mod_rewrite">elsewhere</a> for help setting it up.') . '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>');
        ?></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(__('We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.'), substr($hostname, 4), $hostname);
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.2

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        echo '<p>' . sprintf(__('You cannot use port numbers such as <code>%s</code>.'), $has_ports) . '</p>';
        echo '<a href="' . esc_url(admin_url()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ' . __('Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.') . '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('It looks like the Apache <code>mod_rewrite</code> module is not installed.') . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>' . __('If <code>mod_rewrite</code> is disabled, ask your administrator to enable that module, or look at the <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">Apache documentation</a> or <a href="http://www.google.com/search?q=apache+mod_rewrite">elsewhere</a> for help setting it up.') . '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>');
        ?></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'),
            $hostname
        );
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(
            /* translators: 1: hostname */
            _x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'),
            $hostname
        );
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(__('We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.'), substr($hostname, 4), $hostname);
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 4.0

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        echo '<p>' . sprintf(__('You cannot use port numbers such as <code>%s</code>.'), $has_ports) . '</p>';
        echo '<a href="' . esc_url(admin_url()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post" action="">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ' . __('Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.') . '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('It looks like the Apache <code>mod_rewrite</code> module is not installed.') . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>' . __('If <code>mod_rewrite</code> is disabled, ask your administrator to enable that module, or look at the <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">Apache documentation</a> or <a href="http://www.google.com/search?q=apache+mod_rewrite">elsewhere</a> for help setting it up.') . '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>');
        ?></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="1"<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(_x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'), $hostname);
        ?></td>
			</tr>
			<tr>
				<th><label><input type="radio" name="subdomain_install" value="0"<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(_x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'), $hostname);
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(__('We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.'), substr($hostname, 4), $hostname);
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 3.8

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        echo '<p>' . sprintf(__('You cannot use port numbers such as <code>%s</code>.'), $has_ports) . '</p>';
        echo '<a href="' . esc_url(admin_url()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post" action="">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ' . __('Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.') . '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('It looks like the Apache <code>mod_rewrite</code> module is not installed.') . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>' . __('If <code>mod_rewrite</code> is disabled, ask your administrator to enable that module, or look at the <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">Apache documentation</a> or <a href="http://www.google.com/search?q=apache+mod_rewrite">elsewhere</a> for help setting it up.') . '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>');
        ?></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type='radio' name='subdomain_install' value='1'<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(_x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'), $hostname);
        ?></td>
			</tr>
			<tr>
				<th><label><input type='radio' name='subdomain_install' value='0'<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(_x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'), $hostname);
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(__('We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.'), substr($hostname, 4), $hostname);
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<p class="description">
						<?php 
    _e('What would you like to call your network?');
    ?>
					</p>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Admin Email');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<p class="description">
						<?php 
    _e('Your email address.');
    ?>
					</p>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}

WordPress Version: 3.7

/**
 * Prints step 1 for Network installation process.
 *
 * @todo Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network
 * 	should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo.
 *
 * @since 3.0.0
 */
function network_step1($errors = false)
{
    global $is_apache;
    if (defined('DO_NOT_UPGRADE_GLOBAL_TABLES')) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.') . '</p></div>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $active_plugins = get_option('active_plugins');
    if (!empty($active_plugins)) {
        echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf(__('Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.'), admin_url('plugins.php?plugin_status=active')) . '</p></div><p>' . __('Once the network is created, you may reactivate your plugins.') . '</p>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    $hostname = get_clean_basedomain();
    $has_ports = strstr($hostname, ':');
    if (false !== $has_ports && !in_array($has_ports, array(':80', ':443'))) {
        echo '<div class="error"><p><strong>' . __('ERROR:') . '</strong> ' . __('You cannot install a network of sites with your server address.') . '</p></div>';
        echo '<p>' . sprintf(__('You cannot use port numbers such as <code>%s</code>.'), $has_ports) . '</p>';
        echo '<a href="' . esc_url(admin_url()) . '">' . __('Return to Dashboard') . '</a>';
        echo '</div>';
        include ABSPATH . 'wp-admin/admin-footer.php';
        die;
    }
    echo '<form method="post" action="">';
    wp_nonce_field('install-network-1');
    $error_codes = array();
    if (is_wp_error($errors)) {
        echo '<div class="error"><p><strong>' . __('ERROR: The network could not be created.') . '</strong></p>';
        foreach ($errors->get_error_messages() as $error) {
            echo "<p>{$error}</p>";
        }
        echo '</div>';
        $error_codes = $errors->get_error_codes();
    }
    $site_name = (!empty($_POST['sitename']) && !in_array('empty_sitename', $error_codes)) ? $_POST['sitename'] : sprintf(_x('%s Sites', 'Default network name'), get_option('blogname'));
    $admin_email = (!empty($_POST['email']) && !in_array('invalid_email', $error_codes)) ? $_POST['email'] : get_option('admin_email');
    ?>
	<p><?php 
    _e('Welcome to the Network installation process!');
    ?></p>
	<p><?php 
    _e('Fill in the information below and you&#8217;ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');
    ?></p>
	<?php 
    if (isset($_POST['subdomain_install'])) {
        $subdomain_install = (bool) $_POST['subdomain_install'];
    } elseif (apache_mod_loaded('mod_rewrite')) {
        // assume nothing
        $subdomain_install = true;
    } elseif (!allow_subdirectory_install()) {
        $subdomain_install = true;
    } else {
        $subdomain_install = false;
        if ($got_mod_rewrite = got_mod_rewrite()) {
            // dangerous assumptions
            echo '<div class="updated inline"><p><strong>' . __('Note:') . '</strong> ' . __('Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.') . '</p>';
        } elseif ($is_apache) {
            echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('It looks like the Apache <code>mod_rewrite</code> module is not installed.') . '</p>';
        }
        if ($got_mod_rewrite || $is_apache) {
            // Protect against mod_rewrite mimicry (but ! Apache)
            echo '<p>' . __('If <code>mod_rewrite</code> is disabled, ask your administrator to enable that module, or look at the <a href="http://httpd.apache.org/docs/mod/mod_rewrite.html">Apache documentation</a> or <a href="http://www.google.com/search?q=apache+mod_rewrite">elsewhere</a> for help setting it up.') . '</p></div>';
        }
    }
    if (allow_subdomain_install() && allow_subdirectory_install()) {
        ?>
		<h3><?php 
        esc_html_e('Addresses of Sites in your Network');
        ?></h3>
		<p><?php 
        _e('Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>');
        ?></p>
		<p><?php 
        _e('You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.');
        ?></p>
		<?php 
        // @todo: Link to an MS readme? 
        ?>
		<table class="form-table">
			<tr>
				<th><label><input type='radio' name='subdomain_install' value='1'<?php 
        checked($subdomain_install);
        ?> /> <?php 
        _e('Sub-domains');
        ?></label></th>
				<td><?php 
        printf(_x('like <code>site1.%1$s</code> and <code>site2.%1$s</code>', 'subdomain examples'), $hostname);
        ?></td>
			</tr>
			<tr>
				<th><label><input type='radio' name='subdomain_install' value='0'<?php 
        checked(!$subdomain_install);
        ?> /> <?php 
        _e('Sub-directories');
        ?></label></th>
				<td><?php 
        printf(_x('like <code>%1$s/site1</code> and <code>%1$s/site2</code>', 'subdirectory examples'), $hostname);
        ?></td>
			</tr>
		</table>

<?php 
    }
    if (WP_CONTENT_DIR != ABSPATH . 'wp-content' && (allow_subdirectory_install() || !allow_subdomain_install())) {
        echo '<div class="error inline"><p><strong>' . __('Warning!') . '</strong> ' . __('Subdirectory networks may not be fully compatible with custom wp-content directories.') . '</p></div>';
    }
    $is_www = 0 === strpos($hostname, 'www.');
    if ($is_www) {
        ?>
		<h3><?php 
        esc_html_e('Server Address');
        ?></h3>
		<p><?php 
        printf(__('We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.'), substr($hostname, 4), $hostname);
        ?></p>
		<table class="form-table">
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		</table>
		<?php 
    }
    ?>

		<h3><?php 
    esc_html_e('Network Details');
    ?></h3>
		<table class="form-table">
		<?php 
    if ('localhost' == $hostname) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdomain_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-directory Install');
        ?></th>
				<td><?php 
        _e('Because your install is in a directory, the sites in your WordPress network must use sub-directories.');
        // Uh oh:
        if (!allow_subdirectory_install()) {
            echo ' <strong>' . __('Warning!') . ' ' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        }
        ?></td>
			</tr>
		<?php 
    } elseif (!allow_subdirectory_install()) {
        ?>
			<tr>
				<th scope="row"><?php 
        esc_html_e('Sub-domain Install');
        ?></th>
				<td><?php 
        _e('Because your install is not new, the sites in your WordPress network must use sub-domains.');
        echo ' <strong>' . __('The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.') . '</strong>';
        ?></td>
			</tr>
		<?php 
    }
    ?>
		<?php 
    if (!$is_www) {
        ?>
			<tr>
				<th scope='row'><?php 
        esc_html_e('Server Address');
        ?></th>
				<td>
					<?php 
        printf(__('The internet address of your network will be <code>%s</code>.'), $hostname);
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Network Title');
    ?></th>
				<td>
					<input name='sitename' type='text' size='45' value='<?php 
    echo esc_attr($site_name);
    ?>' />
					<br /><?php 
    _e('What would you like to call your network?');
    ?>
				</td>
			</tr>
			<tr>
				<th scope='row'><?php 
    esc_html_e('Admin E-mail Address');
    ?></th>
				<td>
					<input name='email' type='text' size='45' value='<?php 
    echo esc_attr($admin_email);
    ?>' />
					<br /><?php 
    _e('Your email address.');
    ?>
				</td>
			</tr>
		</table>
		<?php 
    submit_button(__('Install'), 'primary', 'submit');
    ?>
	</form>
	<?php 
}