Make WordPress Core

Ticket #15887: 15887.patch

File 15887.patch, 17.4 KB (added by SergeyBiryukov, 14 years ago)
  • wp-admin/import.php

     
    5353<?php screen_icon(); ?>
    5454<h2><?php echo esc_html( $title ); ?></h2>
    5555<?php if ( ! empty( $_GET['invalid'] ) ) : ?>
    56         <div class="error"><p><strong><?php _e('ERROR:')?></strong> <?php printf( __('The <strong>%s</strong> importer is invalid or is not installed.'), esc_html( $_GET['invalid'] ) ); ?></p></div>
     56        <div class="error"><p><strong><?php _e('Error:')?></strong> <?php printf( __('The <strong>%s</strong> importer is invalid or is not installed.'), esc_html( $_GET['invalid'] ) ); ?></p></div>
    5757<?php endif; ?>
    5858<p><?php _e('If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:'); ?></p>
    5959
  • wp-admin/includes/ms.php

     
    255255
    256256        if ( $current_user->user_email != $_POST['email'] ) {
    257257                if ( !is_email( $_POST['email'] ) ) {
    258                         $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address isn't correct." ), array( 'form-field' => 'email' ) );
     258                        $errors->add( 'user_email', __( "<strong>Error</strong>: The e-mail address isn't correct." ), array( 'form-field' => 'email' ) );
    259259                        return;
    260260                }
    261261
    262262                if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) {
    263                         $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address is already used." ), array( 'form-field' => 'email' ) );
     263                        $errors->add( 'user_email', __( "<strong>Error</strong>: The e-mail address is already used." ), array( 'form-field' => 'email' ) );
    264264                        delete_option( $current_user->ID . '_new_email' );
    265265                        return;
    266266                }
  • wp-admin/includes/user.php

     
    132132
    133133        /* checking that username has been typed */
    134134        if ( $user->user_login == '' )
    135                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ));
     135                $errors->add( 'user_login', __( '<strong>Error</strong>: Please enter a username.' ));
    136136
    137137        /* checking the password has been typed twice */
    138138        do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 ));
    139139
    140140        if ( $update ) {
    141141                if ( empty($pass1) && !empty($pass2) )
    142                         $errors->add( 'pass', __( '<strong>ERROR</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass1' ) );
     142                        $errors->add( 'pass', __( '<strong>Error</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass1' ) );
    143143                elseif ( !empty($pass1) && empty($pass2) )
    144                         $errors->add( 'pass', __( '<strong>ERROR</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass2' ) );
     144                        $errors->add( 'pass', __( '<strong>Error</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass2' ) );
    145145        } else {
    146146                if ( empty($pass1) )
    147                         $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password.' ), array( 'form-field' => 'pass1' ) );
     147                        $errors->add( 'pass', __( '<strong>Error</strong>: Please enter your password.' ), array( 'form-field' => 'pass1' ) );
    148148                elseif ( empty($pass2) )
    149                         $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password twice.' ), array( 'form-field' => 'pass2' ) );
     149                        $errors->add( 'pass', __( '<strong>Error</strong>: Please enter your password twice.' ), array( 'form-field' => 'pass2' ) );
    150150        }
    151151
    152152        /* Check for "\" in password */
    153153        if ( false !== strpos( stripslashes($pass1), "\\" ) )
    154                 $errors->add( 'pass', __( '<strong>ERROR</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
     154                $errors->add( 'pass', __( '<strong>Error</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
    155155
    156156        /* checking the password has been typed twice the same */
    157157        if ( $pass1 != $pass2 )
    158                 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in the two password fields.' ), array( 'form-field' => 'pass1' ) );
     158                $errors->add( 'pass', __( '<strong>Error</strong>: Please enter the same password in the two password fields.' ), array( 'form-field' => 'pass1' ) );
    159159
    160160        if ( !empty( $pass1 ) )
    161161                $user->user_pass = $pass1;
    162162
    163163        if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) )
    164                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
     164                $errors->add( 'user_login', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
    165165
    166166        if ( !$update && username_exists( $user->user_login ) )
    167                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ));
     167                $errors->add( 'user_login', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ));
    168168
    169169        /* checking e-mail address */
    170170        if ( empty( $user->user_email ) ) {
    171                 $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) );
     171                $errors->add( 'empty_email', __( '<strong>Error</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) );
    172172        } elseif ( !is_email( $user->user_email ) ) {
    173                 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
     173                $errors->add( 'invalid_email', __( '<strong>Error</strong>: The e-mail address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
    174174        } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) {
    175                 $errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
     175                $errors->add( 'email_exists', __('<strong>Error</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
    176176        }
    177177
    178178        // Allow plugins to return their own errors.
  • wp-admin/install.php

     
    8989
    9090        if ( ! is_null( $error ) ) {
    9191?>
    92 <p class="message"><?php printf( __( '<strong>ERROR</strong>: %s' ), $error ); ?></p>
     92<p class="message"><?php printf( __( '<strong>Error</strong>: %s' ), $error ); ?></p>
    9393<?php } ?>
    9494<form id="setup" method="post" action="install.php?step=2">
    9595        <table class="form-table">
  • wp-admin/network.php

     
    173173
    174174        $error_codes = array();
    175175        if ( is_wp_error( $errors ) ) {
    176                 echo '<div class="error"><p><strong>' . __( 'ERROR: The network could not be created.' ) . '</strong></p>';
     176                echo '<div class="error"><p><strong>' . __( 'Error: The network could not be created.' ) . '</strong></p>';
    177177                foreach ( $errors->get_error_messages() as $error )
    178178                        echo "<p>$error</p>";
    179179                echo '</div>';
  • wp-admin/setup-config.php

     
    162162
    163163        // Validate $prefix: it can only contain letters, numbers and underscores
    164164        if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
    165                 wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
     165                wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>Error</strong>: "Table Prefix" can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
    166166
    167167        // Test the db connection.
    168168        /**#@+
  • wp-includes/functions.php

     
    17371737
    17381738        $hook = 'do_feed_' . $feed;
    17391739        if ( !has_action($hook) ) {
    1740                 $message = sprintf( __( 'ERROR: %s is not a valid feed template.' ), esc_html($feed));
     1740                $message = sprintf( __( 'Error: %s is not a valid feed template.' ), esc_html($feed));
    17411741                wp_die( $message, '', array( 'response' => 404 ) );
    17421742        }
    17431743
  • wp-includes/load.php

     
    362362        $prefix = $wpdb->set_prefix( $table_prefix );
    363363
    364364        if ( is_wp_error( $prefix ) )
    365                 wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>ERROR</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
     365                wp_die( /*WP_I18N_BAD_PREFIX*/'<strong>Error</strong>: <code>$table_prefix</code> in <code>wp-config.php</code> can only contain numbers, letters, and underscores.'/*/WP_I18N_BAD_PREFIX*/ );
    366366}
    367367
    368368/**
  • wp-includes/pluggable.php

     
    487487        if ( $user == null ) {
    488488                // TODO what should the error message be? (Or would these even happen?)
    489489                // Only needed if all authentication handlers fail to return anything.
    490                 $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
     490                $user = new WP_Error('authentication_failed', __('<strong>Error</strong>: Invalid username or incorrect password.'));
    491491        }
    492492
    493493        $ignore_codes = array('empty_username', 'empty_password');
  • wp-includes/user.php

     
    7777                $error = new WP_Error();
    7878
    7979                if ( empty($username) )
    80                         $error->add('empty_username', __('<strong>ERROR</strong>: The username field is empty.'));
     80                        $error->add('empty_username', __('<strong>Error</strong>: The username field is empty.'));
    8181
    8282                if ( empty($password) )
    83                         $error->add('empty_password', __('<strong>ERROR</strong>: The password field is empty.'));
     83                        $error->add('empty_password', __('<strong>Error</strong>: The password field is empty.'));
    8484
    8585                return $error;
    8686        }
     
    8888        $userdata = get_user_by('login', $username);
    8989
    9090        if ( !$userdata )
    91                 return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login')));
     91                return new WP_Error('invalid_username', sprintf(__('<strong>Error</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login')));
    9292
    9393        if ( is_multisite() ) {
    9494                // Is user marked as spam?
    9595                if ( 1 == $userdata->spam)
    96                         return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Your account has been marked as a spammer.'));
     96                        return new WP_Error('invalid_username', __('<strong>Error</strong>: Your account has been marked as a spammer.'));
    9797
    9898                // Is a user's blog marked as spam?
    9999                if ( !is_super_admin( $userdata->ID ) && isset($userdata->primary_blog) ) {
     
    108108                return $userdata;
    109109
    110110        if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) )
    111                 return new WP_Error( 'incorrect_password', sprintf( __( '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?' ),
     111                return new WP_Error( 'incorrect_password', sprintf( __( '<strong>Error</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?' ),
    112112                $username, site_url( 'wp-login.php?action=lostpassword', 'login' ) ) );
    113113
    114114        $user =  new WP_User($userdata->ID);
  • wp-includes/wp-db.php

     
    14981498                global $wp_version, $required_mysql_version;
    14991499                // Make sure the server has the required MySQL version
    15001500                if ( version_compare($this->db_version(), $required_mysql_version, '<') )
    1501                         return new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
     1501                        return new WP_Error('database_version', sprintf( __( '<strong>Error</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
    15021502        }
    15031503
    15041504        /**
  • wp-login.php

     
    168168        $errors = new WP_Error();
    169169
    170170        if ( empty( $_POST['user_login'] ) && empty( $_POST['user_email'] ) )
    171                 $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.'));
     171                $errors->add('empty_username', __('<strong>Error</strong>: Enter a username or e-mail address.'));
    172172
    173173        if ( strpos($_POST['user_login'], '@') ) {
    174174                $user_data = get_user_by_email(trim($_POST['user_login']));
    175175                if ( empty($user_data) )
    176                         $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));
     176                        $errors->add('invalid_email', __('<strong>Error</strong>: There is no user registered with that email address.'));
    177177        } else {
    178178                $login = trim($_POST['user_login']);
    179179                $user_data = get_userdatabylogin($login);
     
    185185                return $errors;
    186186
    187187        if ( !$user_data ) {
    188                 $errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or e-mail.'));
     188                $errors->add('invalidcombo', __('<strong>Error</strong>: Invalid username or e-mail.'));
    189189                return $errors;
    190190        }
    191191
     
    295295
    296296        // Check the username
    297297        if ( $sanitized_user_login == '' ) {
    298                 $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
     298                $errors->add( 'empty_username', __( '<strong>Error</strong>: Please enter a username.' ) );
    299299        } elseif ( ! validate_username( $user_login ) ) {
    300                 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
     300                $errors->add( 'invalid_username', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
    301301                $sanitized_user_login = '';
    302302        } elseif ( username_exists( $sanitized_user_login ) ) {
    303                 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ) );
     303                $errors->add( 'username_exists', __( '<strong>Error</strong>: This username is already registered, please choose another one.' ) );
    304304        }
    305305
    306306        // Check the e-mail address
    307307        if ( $user_email == '' ) {
    308                 $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your e-mail address.' ) );
     308                $errors->add( 'empty_email', __( '<strong>Error</strong>: Please type your e-mail address.' ) );
    309309        } elseif ( ! is_email( $user_email ) ) {
    310                 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ) );
     310                $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn&#8217;t correct.' ) );
    311311                $user_email = '';
    312312        } elseif ( email_exists( $user_email ) ) {
    313                 $errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
     313                $errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered, please choose another one.' ) );
    314314        }
    315315
    316316        do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
     
    323323        $user_pass = wp_generate_password( 12, false);
    324324        $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
    325325        if ( ! $user_id ) {
    326                 $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
     326                $errors->add( 'registerfail', sprintf( __( '<strong>Error</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
    327327                return $errors;
    328328        }
    329329
     
    601601
    602602        // If cookies are disabled we can't log in even with a valid user+pass
    603603        if ( isset($_POST['testcookie']) && empty($_COOKIE[TEST_COOKIE]) )
    604                 $errors->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
     604                $errors->add('test_cookie', __("<strong>Error</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
    605605
    606606        // Some parts of this script use the main login form to display a message
    607607        if              ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] )