WordPress.org

Make WordPress Core

Ticket #21728: 21728.2.patch

File 21728.2.patch, 8.2 KB (added by pavelevap, 19 months ago)
  • wp-admin/includes/ms.php

     
    224224 
    225225        if ( $current_user->user_email != $_POST['email'] ) { 
    226226                if ( !is_email( $_POST['email'] ) ) { 
    227                         $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address isn't correct." ), array( 'form-field' => 'email' ) ); 
     227                        $errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address isn&#8217;t correct." ), array( 'form-field' => 'email' ) ); 
    228228                        return; 
    229229                } 
    230230 
    231231                if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) { 
    232                         $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address is already used." ), array( 'form-field' => 'email' ) ); 
     232                        $errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address is already used." ), array( 'form-field' => 'email' ) ); 
    233233                        delete_option( $current_user->ID . '_new_email' ); 
    234234                        return; 
    235235                } 
  • wp-admin/includes/user.php

     
    144144        if ( empty( $user->user_email ) ) { 
    145145                $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); 
    146146        } elseif ( !is_email( $user->user_email ) ) { 
    147                 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) ); 
     147                $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) ); 
    148148        } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) { 
    149149                $errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) ); 
    150150        } 
  • wp-admin/network/site-new.php

     
    127127                        <?php } else { 
    128128                                echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/> 
    129129                        <?php } 
    130                         echo '<p>' . __( 'Only the characters a-z and 0-9 recommended.' ) . '</p>'; 
     130                        echo '<p>' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>'; 
    131131                        ?> 
    132132                        </td> 
    133133                </tr> 
  • wp-admin/setup-config.php

     
    165165        foreach ( array( 'dbname', 'uname', 'pwd', 'dbhost', 'prefix' ) as $key ) 
    166166                $$key = trim( stripslashes( $_POST[ $key ] ) ); 
    167167 
    168         $tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">' . __( 'Try Again' ) . '</a>'; 
     168        $tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button">' . __( 'Try again' ) . '</a>'; 
    169169 
    170170        if ( empty( $prefix ) ) 
    171171                wp_die( __( '<strong>ERROR</strong>: "Table Prefix" must not be empty.' . $tryagain_link ) ); 
  • wp-includes/ms-functions.php

     
    182182 
    183183        if ( ! $user ) { 
    184184                restore_current_blog(); 
    185                 return new WP_Error('user_does_not_exist', __('That user does not exist.')); 
     185                return new WP_Error( 'user_does_not_exist', __( 'The requested user does not exist.' ) ); 
    186186        } 
    187187 
    188188        if ( !get_user_meta($user_id, 'primary_blog', true) ) { 
     
    462462                $errors->add('user_name', __('Sorry, usernames must have letters too!')); 
    463463 
    464464        if ( !is_email( $user_email ) ) 
    465                 $errors->add('user_email', __( 'Please enter a correct email address.' ) ); 
     465                $errors->add('user_email', __( 'Please enter a valid email address.' ) ); 
    466466 
    467467        $limited_email_domains = get_site_option( 'limited_email_domains' ); 
    468468        if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) { 
     
    473473 
    474474        // Check if the username has been used already. 
    475475        if ( username_exists($user_name) ) 
    476                 $errors->add('user_name', __('Sorry, that username already exists!')); 
     476                $errors->add( 'user_name', __( 'Sorry, that username already exists!' ) ); 
    477477 
    478478        // Check if the email address has been used already. 
    479479        if ( email_exists($user_email) ) 
    480                 $errors->add('user_email', __('Sorry, that email address is already used!')); 
     480                $errors->add( 'user_email', __( 'Sorry, that email address is already used!' ) ); 
    481481 
    482482        // Has someone already signed up for this username? 
    483483        $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_login = %s", $user_name) ); 
     
    553553                $errors->add('blogname', __( 'Please enter a site name.' ) ); 
    554554 
    555555        if ( preg_match( '/[^a-z0-9]+/', $blogname ) ) 
    556                 $errors->add('blogname', __( 'Only lowercase letters and numbers allowed.' ) ); 
     556                $errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) ); 
    557557 
    558558        if ( in_array( $blogname, $illegal_names ) == true ) 
    559559                $errors->add('blogname',  __( 'That name is not allowed.' ) ); 
     
    590590                $path = $base.$blogname.'/'; 
    591591        } 
    592592        if ( domain_exists($mydomain, $path, $current_site->id) ) 
    593                 $errors->add('blogname', __('Sorry, that site already exists!')); 
     593                $errors->add( 'blogname', __( 'Sorry, that site already exists!' ) ); 
    594594 
    595595        if ( username_exists( $blogname ) ) { 
    596596                if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) ) 
     
    956956 
    957957        // Check if the domain has been used already. We should return an error message. 
    958958        if ( domain_exists($domain, $path, $site_id) ) 
    959                 return new WP_Error('blog_taken', __('Site already exists.')); 
     959                return new WP_Error( 'blog_taken', __( 'Sorry, that site already exists!' ) ); 
    960960 
    961961        if ( !defined('WP_INSTALLING') ) 
    962962                define( 'WP_INSTALLING', true ); 
     
    16291629                return $result; 
    16301630 
    16311631        if ( wp_create_nonce('signup_form_' . $_POST[ 'signup_form_id' ]) != $_POST['_signup_form'] ) 
    1632                 wp_die( __('Please try again!') ); 
     1632                wp_die( __( 'Please try again.' ) ); 
    16331633 
    16341634        return $result; 
    16351635} 
  • wp-includes/user.php

     
    13051305                return new WP_Error('empty_user_login', __('Cannot create a user with an empty login name.') ); 
    13061306 
    13071307        if ( !$update && username_exists( $user_login ) ) 
    1308                 return new WP_Error('existing_user_login', __('This username is already registered.') ); 
     1308                return new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) ); 
    13091309 
    13101310        if ( empty($user_nicename) ) 
    13111311                $user_nicename = sanitize_title( $user_login ); 
     
    13201320        $user_email = apply_filters('pre_user_email', $user_email); 
    13211321 
    13221322        if ( !$update && ! defined( 'WP_IMPORTING' ) && email_exists($user_email) ) 
    1323                 return new WP_Error('existing_user_email', __('This email address is already registered.') ); 
     1323                return new WP_Error( 'existing_user_email', __( 'Sorry, that email address is already used!' ) ); 
    13241324 
    13251325        if ( empty($nickname) ) 
    13261326                $nickname = $user_login; 
  • wp-login.php

     
    315315                $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 
    316316                $sanitized_user_login = ''; 
    317317        } elseif ( username_exists( $sanitized_user_login ) ) { 
    318                 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ) ); 
     318                $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) ); 
    319319        } 
    320320 
    321321        // Check the e-mail address