X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8a4706fdeb1ae30268e510df6ccf3c39b3028059..4713a14935b83517997f3c88f808eb41da55033d:/wp-admin/network.php diff --git a/wp-admin/network.php b/wp-admin/network.php index d5549145..c7b115f6 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -13,7 +13,7 @@ define( 'WP_INSTALLING_NETWORK', true ); /** WordPress Administration Bootstrap */ -require_once( './admin.php' ); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! is_super_admin() ) wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); @@ -58,13 +58,20 @@ function allow_subdomain_install() { return true; } /** - * Allow subdirectory install + * Allow subdirectory install. * * @since 3.0.0 * @return bool Whether subdirectory install is allowed */ function allow_subdirectory_install() { global $wpdb; + /** + * Filter whether to enable the subdirectory install feature in Multisite. + * + * @since 3.0.0 + * + * @param bool true Whether to enable the subdirectory install feature in Multisite. Default is false. + */ if ( apply_filters( 'allow_subdirectory_install', false ) ) return true; @@ -123,13 +130,12 @@ get_current_screen()->set_help_sidebar( '
' . __('For more information:') . '
' . '' . __('Documentation on Creating a Network') . '
' . '' . __('Documentation on the Network Screen') . '
' . - '' . __('Support Forums') . '
' + '' . __('Support Forums') . '
' ); include( ABSPATH . 'wp-admin/admin-header.php' ); ?>+ +
+ +
web.config file in %s
, replacing other WordPress rules:' ), $home_path ); ?>
';
+ /* translators: 1: a filename like .htaccess. 2: a file path. */
+ printf( __( '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.' ) . '
'; ?> @@ -492,9 +505,11 @@ RewriteRule ^{$subdir_match}(.*\.php)$ {$rewrite_base}$subdir_replacement_12 [L] RewriteRule . index.php [L] EOF; - ?> -.htaccess file in %s
, replacing other WordPress rules:' ), $home_path ); ?>
';
+ /* translators: 1: a filename like .htaccess. 2: a file path. */
+ printf( __( '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.' ) . '
'; ?> @@ -520,7 +535,7 @@ if ( $_POST ) { $base = parse_url( trailingslashit( get_option( 'home' ) ), PHP_URL_PATH ); $subdomain_install = allow_subdomain_install() ? !empty( $_POST['subdomain_install'] ) : false; if ( ! network_domain_check() ) { - $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), stripslashes( $_POST['sitename'] ), $base, $subdomain_install ); + $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install ); if ( is_wp_error( $result ) ) { if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' == $result->get_error_code() ) network_step2( $result );