diff --git a/wp-admin/network.php b/wp-admin/network.php index 5b671e791..fc9080d90 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -49,6 +49,23 @@ function allow_subdomain_install() { return true; } +/** + * Allow folder install + * + * @since 3.0.0 + * @return bool Whether folder install is allowed + */ +function allow_folder_install() { + global $wpdb; + if ( apply_filters( 'allow_folder_install', false ) ) + return true; + + $post = $wpdb->get_row( "SELECT ID FROM $wpdb->posts WHERE post_date < DATE_SUB(NOW(), INTERVAL 1 MONTH) AND post_status = 'publish'" ); + if ( empty( $post ) ) + return true; + + return false; +} /** * Get base domain of network. * @@ -108,10 +125,7 @@ function network_step1( $errors = false ) { $has_ports = strstr( $hostname, ':' ); if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) { echo '
' . __( 'Error:') . ' ' . __( 'You cannot install a network of sites with your server address.' ) . '
' . __( 'You cannot use an IP address such as 127.0.0.1
.' ) . '
' . sprintf( __( 'You cannot use port numbers such as %s
.' ), $has_ports ) . '
' . sprintf( __( 'You cannot use port numbers such as %s
.' ), $has_ports ) . '
' . __( 'If mod_rewrite
is disabled, ask your administrator to enable that module, or look at the Apache documentation or elsewhere for help setting it up.' ) . '
You cannot change this later.' ); ?>
@@ -237,7 +253,7 @@ function network_step2( $errors = false ) { echo '