Changeset 42343 for trunk/src/wp-admin/network.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network.php
r41289 r42343 50 50 51 51 if ( is_network_admin() ) { 52 $title = __( 'Network Setup' );52 $title = __( 'Network Setup' ); 53 53 $parent_file = 'settings.php'; 54 54 } else { 55 $title = __( 'Create a Network of WordPress Sites' );55 $title = __( 'Create a Network of WordPress Sites' ); 56 56 $parent_file = 'tools.php'; 57 57 } 58 58 59 $network_help = '<p>' . __( 'This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '</p>' .60 '<p>' . __( 'Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your installation. Fill out the network details, and click Install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).') . '</p>' .61 '<p>' . __( 'The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.') . '</p>' .62 '<p>' . __( 'Add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).') . '</p>' .63 '<p>' . __( 'Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.') . '</p>' .64 '<p>' . __( 'The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed in a future version.') . '</p>' .65 '<p><strong>' . __( 'For more information:') . '</strong></p>' .59 $network_help = '<p>' . __( 'This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.' ) . '</p>' . 60 '<p>' . __( 'Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your installation. Fill out the network details, and click Install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).' ) . '</p>' . 61 '<p>' . __( 'The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.' ) . '</p>' . 62 '<p>' . __( 'Add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).' ) . '</p>' . 63 '<p>' . __( 'Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.' ) . '</p>' . 64 '<p>' . __( 'The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed in a future version.' ) . '</p>' . 65 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 66 66 '<p>' . __( '<a href="https://codex.wordpress.org/Create_A_Network">Documentation on Creating a Network</a>' ) . '</p>' . 67 67 '<p>' . __( '<a href="https://codex.wordpress.org/Tools_Network_Screen">Documentation on the Network Screen</a>' ) . '</p>'; 68 68 69 get_current_screen()->add_help_tab( array( 70 'id' => 'network', 71 'title' => __('Network'), 72 'content' => $network_help, 73 ) ); 69 get_current_screen()->add_help_tab( 70 array( 71 'id' => 'network', 72 'title' => __( 'Network' ), 73 'content' => $network_help, 74 ) 75 ); 74 76 75 77 get_current_screen()->set_help_sidebar( 76 '<p><strong>' . __( 'For more information:') . '</strong></p>' .78 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 77 79 '<p>' . __( '<a href="https://codex.wordpress.org/Create_A_Network">Documentation on Creating a Network</a>' ) . '</p>' . 78 80 '<p>' . __( '<a href="https://codex.wordpress.org/Tools_Network_Screen">Documentation on the Network Screen</a>' ) . '</p>' . … … 94 96 install_network(); 95 97 $base = parse_url( trailingslashit( get_option( 'home' ) ), PHP_URL_PATH ); 96 $subdomain_install = allow_subdomain_install() ? ! empty( $_POST['subdomain_install'] ) : false;98 $subdomain_install = allow_subdomain_install() ? ! empty( $_POST['subdomain_install'] ) : false; 97 99 if ( ! network_domain_check() ) { 98 100 $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install ); 99 101 if ( is_wp_error( $result ) ) { 100 if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' == $result->get_error_code() ) 102 if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' == $result->get_error_code() ) { 101 103 network_step2( $result ); 102 else104 } else { 103 105 network_step1( $result ); 106 } 104 107 } else { 105 108 network_step2();
Note: See TracChangeset
for help on using the changeset viewer.