home/wwgoat/public_html/blog/wp-admin/network.php 0000644 00000012622 14720640347 0016161 0 ustar 00 tables( 'ms_global' ) as $table => $prefixed_table ) {
$wpdb->$table = $prefixed_table;
}
if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) {
wp_die(
printf(
/* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */
__( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ),
'WP_ALLOW_MULTISITE
',
'wp-config.php
'
)
);
}
if ( is_network_admin() ) {
// Used in the HTML title tag.
$title = __( 'Network Setup' );
$parent_file = 'settings.php';
} else {
// Used in the HTML title tag.
$title = __( 'Create a Network of WordPress Sites' );
$parent_file = 'tools.php';
}
$network_help = '
' . __( 'This screen allows you to configure a network as having subdomains (site1.example.com
) or subdirectories (example.com/site1
). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.' ) . '
' . __( '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).' ) . '
' . '' . __( '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.' ) . '
' . '' . __( 'Add the designated lines of code to wp-config.php (just before /*...stop editing...*/
) and .htaccess
(replacing the existing WordPress rules).' ) . '
' . __( '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.' ) . '
' . '' . __( '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.' ) . '
' . '' . __( 'For more information:' ) . '
' . '' . __( 'Documentation on Creating a Network' ) . '
' . '' . __( 'Documentation on the Network Screen' ) . '
'; get_current_screen()->add_help_tab( array( 'id' => 'network', 'title' => __( 'Network' ), 'content' => $network_help, ) ); get_current_screen()->set_help_sidebar( '' . __( 'For more information:' ) . '
' . '' . __( 'Documentation on Creating a Network' ) . '
' . '' . __( 'Documentation on the Network Screen' ) . '
' . '' . __( 'Support forums' ) . '
' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?>DO_NOT_UPGRADE_GLOBAL_TABLES
'
);
wp_admin_notice(
$cannot_define_constant_message,
array(
'additional_classes' => array( 'error' ),
)
);
echo '';
require_once ABSPATH . 'wp-admin/admin-footer.php';
die();
}
$active_plugins = get_option( 'active_plugins' );
if ( ! empty( $active_plugins ) ) {
wp_admin_notice(
'' . __( 'Warning:' ) . ' ' . sprintf(
/* translators: %s: URL to Plugins screen. */
__( 'Please deactivate your plugins before enabling the Network feature.' ),
admin_url( 'plugins.php?plugin_status=active' )
),
array( 'type' => 'warning' )
);
echo '' . __( 'Once the network is created, you may reactivate your plugins.' ) . '
'; echo ''; require_once ABSPATH . 'wp-admin/admin-footer.php'; die(); } // Strip standard port from hostname. $hostname = preg_replace( '/(?::80|:443)$/', '', get_clean_basedomain() ); echo ' get_error_message(), array( 'additional_classes' => array( 'error' ), ) ); } if ( $_POST ) { if ( allow_subdomain_install() ) { $subdomain_install = allow_subdirectory_install() ? ! empty( $_POST['subdomain_install'] ) : true; } else { $subdomain_install = false; } } else { if ( is_multisite() ) { $subdomain_install = is_subdomain_install(); ?> get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" ); wp_admin_notice( '' . __( 'Warning:' ) . ' ' . __( 'An existing WordPress network was detected.' ), array( 'additional_classes' => array( 'error' ), ) ); ?> ' . __( 'Caution:' ) . ' '; $notice_args = array( 'type' => 'warning', 'additional_classes' => array( 'inline' ), ); if ( file_exists( $home_path . '.htaccess' ) ) { $notice_message .= sprintf( /* translators: 1: wp-config.php, 2: .htaccess */ __( 'You should back up your existing %1$s and %2$s files.' ), 'wp-config.php
',
'.htaccess
'
);
} elseif ( file_exists( $home_path . 'web.config' ) ) {
$notice_message .= sprintf(
/* translators: 1: wp-config.php, 2: web.config */
__( 'You should back up your existing %1$s and %2$s files.' ),
'wp-config.php
',
'web.config
'
);
} else {
$notice_message .= sprintf(
/* translators: %s: wp-config.php */
__( 'You should back up your existing %s file.' ),
'wp-config.php
'
);
}
wp_admin_notice( $notice_message, $notice_args );
}
?>
above the line reading %3$s:' ),
'wp-config.php
',
'' . $location_of_wp_config . '
',
/*
* translators: This string should only be translated if wp-config-sample.php is localized.
* You can check the localized release package or
* https://i18n.svn.wordpress.org//* ' . __( 'That’s all, stop editing! Happy publishing.' ) . ' */
'
);
?>
wp-config.php'
);
} else {
printf(
/* translators: %s: wp-config.php */
__( 'These unique authentication keys are also missing from your %s file.' ),
'wp-config.php
'
);
}
?>
';
printf(
/* translators: 1: File name (.htaccess or web.config), 2: File path. */
__( 'Add the following to your %1$s file in %2$s, replacing other WordPress rules:' ),
'web.config
',
'' . $home_path . '
'
);
echo '
' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
'; } ?>'; printf( /* translators: %s: Documentation URL. */ __( 'It seems your network is running with Nginx web server. Learn more about further configuration.' ), __( 'https://developer.wordpress.org/advanced-administration/server/web-server/nginx/' ) ); echo '
'; else : // End $is_nginx. Construct an .htaccess file instead: $ms_files_rewriting = ''; if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { $ms_files_rewriting = "\n# uploaded files\nRewriteRule ^"; $ms_files_rewriting .= $subdir_match . "files/(.+) {$rewrite_base}" . WPINC . "/ms-files.php?file={$subdir_replacement_12} [L]" . "\n"; } $htaccess_file = <<';
printf(
/* translators: 1: File name (.htaccess or web.config), 2: File path. */
__( 'Add the following to your %1$s file in %2$s, replacing other WordPress rules:' ),
'.htaccess
',
'' . $home_path . '
'
);
echo '
' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
'; } ?>