--- a/wp/wp-admin/network/site-new.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-admin/network/site-new.php Fri Sep 05 18:40:08 2025 +0200
@@ -29,8 +29,8 @@
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
- '<p>' . __( '<a href="https://wordpress.org/support/article/network-admin-sites-screen/">Documentation on Site Management</a>' ) . '</p>' .
- '<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
+ '<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/admin/#network-admin-sites-screen">Documentation on Site Management</a>' ) . '</p>' .
+ '<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support forums</a>' ) . '</p>'
);
if ( isset( $_REQUEST['action'] ) && 'add-site' === $_REQUEST['action'] ) {
@@ -83,6 +83,10 @@
}
}
+ if ( empty( $title ) ) {
+ wp_die( __( 'Missing site title.' ) );
+ }
+
if ( empty( $domain ) ) {
wp_die( __( 'Missing or invalid site address.' ) );
}
@@ -188,25 +192,30 @@
<h1 id="add-new-site"><?php _e( 'Add New Site' ); ?></h1>
<?php
if ( ! empty( $messages ) ) {
+ $notice_args = array(
+ 'type' => 'success',
+ 'dismissible' => true,
+ 'id' => 'message',
+ );
+
foreach ( $messages as $msg ) {
- echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
+ wp_admin_notice( $msg, $notice_args );
}
}
?>
-<p>
-<?php
-printf(
- /* translators: %s: Asterisk symbol (*). */
- __( 'Required fields are marked %s' ),
- '<span class="required">*</span>'
-);
-?>
-</p>
+<p><?php echo wp_required_field_message(); ?></p>
<form method="post" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate">
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?>
<table class="form-table" role="presentation">
<tr class="form-field form-required">
- <th scope="row"><label for="site-address"><?php _e( 'Site Address (URL)' ); ?> <span class="required">*</span></label></th>
+ <th scope="row">
+ <label for="site-address">
+ <?php
+ _e( 'Site Address (URL)' );
+ echo ' ' . wp_required_field_indicator();
+ ?>
+ </label>
+ </th>
<td>
<?php if ( is_subdomain_install() ) { ?>
<input name="blog[domain]" type="text" class="regular-text ltr" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
@@ -222,7 +231,14 @@
</td>
</tr>
<tr class="form-field form-required">
- <th scope="row"><label for="site-title"><?php _e( 'Site Title' ); ?> <span class="required">*</span></label></th>
+ <th scope="row">
+ <label for="site-title">
+ <?php
+ _e( 'Site Title' );
+ echo ' ' . wp_required_field_indicator();
+ ?>
+ </label>
+ </th>
<td><input name="blog[title]" type="text" class="regular-text" id="site-title" required /></td>
</tr>
<?php
@@ -257,7 +273,14 @@
</tr>
<?php endif; // Languages. ?>
<tr class="form-field form-required">
- <th scope="row"><label for="admin-email"><?php _e( 'Admin Email' ); ?> <span class="required">*</span></label></th>
+ <th scope="row">
+ <label for="admin-email">
+ <?php
+ _e( 'Admin Email' );
+ echo ' ' . wp_required_field_indicator();
+ ?>
+ </label>
+ </th>
<td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" aria-describedby="site-admin-email" required /></td>
</tr>
<tr class="form-field">