*shouldnotbeasudden"Welcome to a new install process! Fill this out and click here."Seealsocontextualhelptodo.
*
*@since3.0.0
*
*@globalbool$is_apache
*
*@paramWP_Error$errors
*/
functionnetwork_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>';
<p><?php_e('Welcome to the Network installation process!');?></p>
<p><?php_e('Fill in the information below and you’ll be on your way to creating a network of WordPress sites. We will create configuration files in the next step.');?></p>
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>';
<h3><?phpesc_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>
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><?phpesc_html_e('Server Address');?></h3>
<p><?phpprintf(__('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>
_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>';
_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><?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>';
<h3><?phpesc_html_e('Enabling the Network');?></h3>
<p><?php_e('Complete the following steps to enable the features for creating a network of sites.');?></p>
<divclass="updated inline"><p><?php
if(file_exists($home_path.'.htaccess'))
printf(__('<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.'),'.htaccess');
elseif(file_exists($home_path.'web.config'))
printf(__('<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.'),'web.config');
else
_e('<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> file.');
?></p></div>
<?php
}
?>
<ol>
<li><p><?phpprintf(__('Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That’s all, stop editing! Happy blogging. */</code>:'),$location_of_wp_config);?></p>
<p><?php_e('Once you complete these steps, your network is enabled and configured. You will have to log in again.');?> <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log In' ); ?></a></p>