Make WordPress Core

Ticket #54344: 54344.diff

File 54344.diff, 2.9 KB (added by henry.wright, 3 years ago)
  • src/wp-signup.php

    diff --git src/wp-signup.php src/wp-signup.php
    index 375dad9..b7f036e 100644
    function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) { 
    118118        }
    119119
    120120        if ( ! is_subdomain_install() ) {
    121                 echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" /><br />';
     121                echo '<span class="prefix_address">' . $current_network->domain . $current_network->path . '</span><input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" required="required" /><br />';
    122122        } else {
    123123                $site_domain = preg_replace( '|^www\.|', '', $current_network->domain );
    124                 echo '<input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" /><span class="suffix_address">.' . esc_html( $site_domain ) . '</span><br />';
     124                echo '<input name="blogname" type="text" id="blogname" value="' . esc_attr( $blogname ) . '" maxlength="60" required="required" /><span class="suffix_address">.' . esc_html( $site_domain ) . '</span><br />';
    125125        }
    126126
    127127        if ( ! is_user_logged_in() ) {
    function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) { 
    149149                <p class="error"><?php echo $errmsg; ?></p>
    150150                <?php
    151151        }
    152         echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" />';
     152        echo '<input name="blog_title" type="text" id="blog_title" value="' . esc_attr( $blog_title ) . '" required="required" />';
    153153        ?>
    154154
    155155        <?php
    function show_user_form( $user_name = '', $user_email = '', $errors = '' ) { 
    260260        if ( $errmsg ) {
    261261                echo '<p class="error">' . $errmsg . '</p>';
    262262        }
    263         echo '<input name="user_name" type="text" id="user_name" value="' . esc_attr( $user_name ) . '" autocapitalize="none" autocorrect="off" maxlength="60" /><br />';
     263        echo '<input name="user_name" type="text" id="user_name" value="' . esc_attr( $user_name ) . '" autocapitalize="none" autocorrect="off" maxlength="60" required="required" /><br />';
    264264        _e( '(Must be at least 4 characters, letters and numbers only.)' );
    265265        ?>
    266266
    function show_user_form( $user_name = '', $user_email = '', $errors = '' ) { 
    271271                ?>
    272272                <p class="error"><?php echo $errmsg; ?></p>
    273273        <?php } ?>
    274         <input name="user_email" type="email" id="user_email" value="<?php echo esc_attr( $user_email ); ?>" maxlength="200" /><br /><?php _e( 'We send your registration email to this address. (Double-check your email address before continuing.)' ); ?>
     274        <input name="user_email" type="email" id="user_email" value="<?php echo esc_attr( $user_email ); ?>" maxlength="200" required="required" /><br /><?php _e( 'We send your registration email to this address. (Double-check your email address before continuing.)' ); ?>
    275275        <?php
    276276        $errmsg = $errors->get_error_message( 'generic' );
    277277        if ( $errmsg ) {