' . sprintf(
/* translators: %s: Port number. */
__( 'You cannot use port numbers such as %s.' ),
@@ -160,11 +175,17 @@ function network_step1( $errors = false ) {
$error_codes = array();
if ( is_wp_error( $errors ) ) {
- echo '
' . __( 'Note:' ) . ' ';
- printf(
+ $message_class = 'updated';
+ $message = '
' . __( 'Warning:' ) . ' ';
+ $message .= '
' . sprintf(
/* translators: %s: mod_rewrite */
__( 'Please make sure the Apache %s module is installed as it will be used at the end of this installation.' ),
'mod_rewrite
'
- );
- echo '
';
+ ) . '';
} elseif ( $is_apache ) {
- echo '
' . __( 'Warning:' ) . ' ';
- printf(
+ $message_class = 'error';
+ $message = '
' . __( 'Warning:' ) . ' ';
+ $message .= sprintf(
/* translators: %s: mod_rewrite */
__( 'It looks like the Apache %s module is not installed.' ),
'mod_rewrite
'
- );
- echo '
';
+ ) . '';
}
if ( $got_mod_rewrite || $is_apache ) { // Protect against mod_rewrite mimicry (but ! Apache).
- echo '
';
- printf(
+ $message .= '
' . sprintf(
/* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */
__( 'If %1$s is disabled, ask your administrator to enable that module, or look at the Apache documentation or elsewhere for help setting it up.' ),
'mod_rewrite
',
'https://httpd.apache.org/docs/mod/mod_rewrite.html',
'https://www.google.com/search?q=apache+mod_rewrite'
+ ) . '
';
+
+ wp_admin_notice(
+ $message,
+ array(
+ 'additional_classes' => array( $message_class, 'inline' ),
+ 'paragraph_wrap' => false,
+ )
);
- echo '
';
}
}
@@ -263,7 +290,14 @@ function network_step1( $errors = false ) {
endif;
if ( WP_CONTENT_DIR !== ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
- echo '
' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
';
+ $subdirectory_warning_message = '
' . __( 'Warning:' ) . ' ';
+ $subdirectory_warning_message .= __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' );
+ wp_admin_notice(
+ $subdirectory_warning_message,
+ array(
+ 'additional_classes' => array( 'error', 'inline' ),
+ )
+ );
}
$is_www = str_starts_with( $hostname, 'www.' );
@@ -409,7 +443,12 @@ function network_step2( $errors = false ) {
// Wildcard DNS message.
if ( is_wp_error( $errors ) ) {
- echo '
' . $errors->get_error_message() . '
';
+ wp_admin_notice(
+ $errors->get_error_message(),
+ array(
+ 'additional_classes' => array( 'error' ),
+ )
+ );
}
if ( $_POST ) {
@@ -426,8 +465,14 @@ function network_step2( $errors = false ) {
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' ),
+ )
+ );
?>
-
-
- ' . __( 'Before you can upload your import file, you will need to fix the following error:' ) . '';
+ $upload_directory_error .= '
' . $upload_dir['error'] . '
';
+ wp_admin_notice(
+ $upload_directory_error,
+ array(
+ 'additonal_classes' => array( 'error' ),
+ 'paragraph_wrap' => false,
+ )
+ );
else :
?>