-
diff --git a/src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js b/src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js
index 9687041853..9fcb177736 100644
a
|
b
|
|
24 | 24 | clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.", |
25 | 25 | clipboard_no_support: "Currently not supported by your browser, use keyboard shortcuts instead.", |
26 | 26 | popup_blocked: "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", |
27 | | invalid_data: "Error: Invalid values entered, these are marked in red.", |
| 27 | invalid_data: "Invalid values entered, these are marked in red.", |
28 | 28 | invalid_data_number: "{#field} must be a number", |
29 | 29 | invalid_data_min: "{#field} must be a number greater than {#min}", |
30 | 30 | invalid_data_size: "{#field} must be a number or percentage", |
-
diff --git a/src/wp-admin/import.php b/src/wp-admin/import.php
index b5d09a1c76..8a07802781 100644
a
|
b
|
$parent_file = 'tools.php'; |
61 | 61 | <h1><?php echo esc_html( $title ); ?></h1> |
62 | 62 | <?php if ( ! empty( $_GET['invalid'] ) ) : ?> |
63 | 63 | <div class="error"> |
64 | | <p><strong><?php _e( 'Error:' ); ?></strong> |
| 64 | <p> |
65 | 65 | <?php |
66 | 66 | /* translators: %s: Importer slug. */ |
67 | 67 | printf( __( 'The %s importer is invalid or is not installed.' ), '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>' ); |
-
diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
index 3b551db6c0..a0132816a6 100644
a
|
b
|
function wp_ajax_replyto_comment( $action ) { |
1272 | 1272 | if ( empty( $post->post_status ) ) { |
1273 | 1273 | wp_die( 1 ); |
1274 | 1274 | } elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ), true ) ) { |
1275 | | wp_die( __( 'Error: You are replying to a comment on a draft post.' ) ); |
| 1275 | wp_die( __( 'You can’t reply to a comment on a draft post.' ) ); |
1276 | 1276 | } |
1277 | 1277 | |
1278 | 1278 | $user = wp_get_current_user(); |
… |
… |
function wp_ajax_replyto_comment( $action ) { |
1302 | 1302 | } |
1303 | 1303 | |
1304 | 1304 | if ( '' == $comment_content ) { |
1305 | | wp_die( __( 'Error: Please type a comment.' ) ); |
| 1305 | wp_die( __( 'Please type a comment text.' ) ); |
1306 | 1306 | } |
1307 | 1307 | |
1308 | 1308 | $comment_parent = 0; |
… |
… |
function wp_ajax_edit_comment() { |
1404 | 1404 | } |
1405 | 1405 | |
1406 | 1406 | if ( '' == $_POST['content'] ) { |
1407 | | wp_die( __( 'Error: Please type a comment.' ) ); |
| 1407 | wp_die( __( 'Please type a comment text.' ) ); |
1408 | 1408 | } |
1409 | 1409 | |
1410 | 1410 | if ( isset( $_POST['status'] ) ) { |
-
diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 9933061321..905ba4ed2f 100644
a
|
b
|
function request_filesystem_credentials( $form_post, $type = '', $error = false, |
2094 | 2094 | $connection_type = isset( $credentials['connection_type'] ) ? $credentials['connection_type'] : ''; |
2095 | 2095 | |
2096 | 2096 | if ( $error ) { |
2097 | | $error_string = __( '<strong>Error</strong>: There was an error connecting to the server. Please verify the settings are correct.' ); |
| 2097 | $error_string = __( 'There was an error connecting to the server. Please verify the settings are correct.' ); |
2098 | 2098 | if ( is_wp_error( $error ) ) { |
2099 | 2099 | $error_string = esc_html( $error->get_error_message() ); |
2100 | 2100 | } |
-
diff --git a/src/wp-admin/includes/network.php b/src/wp-admin/includes/network.php
index 481fd94982..5189797fb5 100644
a
|
b
|
function network_step1( $errors = false ) { |
110 | 110 | global $is_apache; |
111 | 111 | |
112 | 112 | if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { |
113 | | echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . sprintf( |
| 113 | echo '<div class="error"><p>' . sprintf( |
114 | 114 | /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ |
115 | 115 | __( 'The constant %s cannot be defined when creating a network.' ), |
116 | 116 | '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>' |
… |
… |
function network_step1( $errors = false ) { |
136 | 136 | $hostname = get_clean_basedomain(); |
137 | 137 | $has_ports = strstr( $hostname, ':' ); |
138 | 138 | if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ), true ) ) ) { |
139 | | echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>'; |
| 139 | echo '<div class="error"><p>' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>'; |
140 | 140 | echo '<p>' . sprintf( |
141 | 141 | /* translators: %s: Port number. */ |
142 | 142 | __( 'You cannot use port numbers such as %s.' ), |
… |
… |
function network_step1( $errors = false ) { |
154 | 154 | |
155 | 155 | $error_codes = array(); |
156 | 156 | if ( is_wp_error( $errors ) ) { |
157 | | echo '<div class="error"><p><strong>' . __( 'Error: The network could not be created.' ) . '</strong></p>'; |
| 157 | echo '<div class="error"><p><strong>' . __( 'The network could not be created.' ) . '</strong></p>'; |
158 | 158 | foreach ( $errors->get_error_messages() as $error ) { |
159 | 159 | echo "<p>$error</p>"; |
160 | 160 | } |
-
diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php
index 9f90f84cb5..187b3350b9 100644
a
|
b
|
function install_plugin_information() { |
801 | 801 | |
802 | 802 | if ( ! $compatible_php ) { |
803 | 803 | echo '<div class="notice notice-error notice-alt"><p>'; |
804 | | _e( '<strong>Error:</strong> This plugin <strong>requires a newer version of PHP</strong>.' ); |
| 804 | _e( 'This plugin <strong>requires a newer version of PHP</strong>.' ); |
805 | 805 | if ( current_user_can( 'update_php' ) ) { |
806 | 806 | printf( |
807 | 807 | /* translators: %s: URL to Update PHP page. */ |
… |
… |
function install_plugin_information() { |
822 | 822 | echo '</p></div>'; |
823 | 823 | } elseif ( ! $compatible_wp ) { |
824 | 824 | echo '<div class="notice notice-error notice-alt"><p>'; |
825 | | _e( '<strong>Error:</strong> This plugin <strong>requires a newer version of WordPress</strong>.' ); |
| 825 | _e( 'This plugin <strong>requires a newer version of WordPress</strong>.' ); |
826 | 826 | if ( current_user_can( 'update_core' ) ) { |
827 | 827 | printf( |
828 | 828 | /* translators: %s: URL to WordPress Updates screen. */ |
-
diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
index 222dcf8f73..44fbf436ae 100644
a
|
b
|
function validate_plugin_requirements( $plugin ) { |
1146 | 1146 | 'plugin_wp_php_incompatible', |
1147 | 1147 | sprintf( |
1148 | 1148 | /* translators: %s: Plugin name. */ |
1149 | | _x( '<strong>Error:</strong> Current WordPress and PHP versions do not meet minimum requirements for %s.', 'plugin' ), |
| 1149 | _x( 'Current WordPress and PHP versions do not meet minimum requirements for %s.', 'plugin' ), |
1150 | 1150 | $plugin_headers['Name'] |
1151 | 1151 | ) |
1152 | 1152 | ); |
… |
… |
function validate_plugin_requirements( $plugin ) { |
1155 | 1155 | 'plugin_php_incompatible', |
1156 | 1156 | sprintf( |
1157 | 1157 | /* translators: %s: Plugin name. */ |
1158 | | _x( '<strong>Error:</strong> Current PHP version does not meet minimum requirements for %s.', 'plugin' ), |
| 1158 | _x( 'Current PHP version does not meet minimum requirements for %s.', 'plugin' ), |
1159 | 1159 | $plugin_headers['Name'] |
1160 | 1160 | ) |
1161 | 1161 | ); |
… |
… |
function validate_plugin_requirements( $plugin ) { |
1164 | 1164 | 'plugin_wp_incompatible', |
1165 | 1165 | sprintf( |
1166 | 1166 | /* translators: %s: Plugin name. */ |
1167 | | _x( '<strong>Error:</strong> Current WordPress version does not meet minimum requirements for %s.', 'plugin' ), |
| 1167 | _x( 'Current WordPress version does not meet minimum requirements for %s.', 'plugin' ), |
1168 | 1168 | $plugin_headers['Name'] |
1169 | 1169 | ) |
1170 | 1170 | ); |
-
diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php
index f99c50d85c..807bc0304a 100644
a
|
b
|
function edit_user( $user_id = 0 ) { |
144 | 144 | |
145 | 145 | /* checking that username has been typed */ |
146 | 146 | if ( '' == $user->user_login ) { |
147 | | $errors->add( 'user_login', __( '<strong>Error</strong>: Please enter a username.' ) ); |
| 147 | $errors->add( 'user_login', __( 'Please enter a username.' ) ); |
148 | 148 | } |
149 | 149 | |
150 | 150 | /* checking that nickname has been typed */ |
151 | 151 | if ( $update && empty( $user->nickname ) ) { |
152 | | $errors->add( 'nickname', __( '<strong>Error</strong>: Please enter a nickname.' ) ); |
| 152 | $errors->add( 'nickname', __( 'Please enter a nickname.' ) ); |
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
… |
… |
function edit_user( $user_id = 0 ) { |
165 | 165 | |
166 | 166 | // Check for blank password when adding a user. |
167 | 167 | if ( ! $update && empty( $pass1 ) ) { |
168 | | $errors->add( 'pass', __( '<strong>Error</strong>: Please enter a password.' ), array( 'form-field' => 'pass1' ) ); |
| 168 | $errors->add( 'pass', __( 'Please enter a password.' ), array( 'form-field' => 'pass1' ) ); |
169 | 169 | } |
170 | 170 | |
171 | 171 | // Check for "\" in password. |
172 | 172 | if ( false !== strpos( wp_unslash( $pass1 ), '\\' ) ) { |
173 | | $errors->add( 'pass', __( '<strong>Error</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) ); |
| 173 | $errors->add( 'pass', __( 'Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) ); |
174 | 174 | } |
175 | 175 | |
176 | 176 | // Checking the password has been typed twice the same. |
177 | 177 | if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) { |
178 | | $errors->add( 'pass', __( '<strong>Error</strong>: Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) ); |
| 178 | $errors->add( 'pass', __( 'Passwords doesn’t match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) ); |
179 | 179 | } |
180 | 180 | |
181 | 181 | if ( ! empty( $pass1 ) ) { |
… |
… |
function edit_user( $user_id = 0 ) { |
183 | 183 | } |
184 | 184 | |
185 | 185 | if ( ! $update && isset( $_POST['user_login'] ) && ! validate_username( $_POST['user_login'] ) ) { |
186 | | $errors->add( 'user_login', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); |
| 186 | $errors->add( 'user_login', __( 'That username is invalid because it uses illegal characters. Please enter a valid username.' ) ); |
187 | 187 | } |
188 | 188 | |
189 | 189 | if ( ! $update && username_exists( $user->user_login ) ) { |
190 | | $errors->add( 'user_login', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ) ); |
| 190 | $errors->add( 'user_login', __( 'That username is already registered. Please choose another one.' ) ); |
191 | 191 | } |
192 | 192 | |
193 | 193 | /** This filter is documented in wp-includes/user.php */ |
194 | 194 | $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() ); |
195 | 195 | |
196 | 196 | if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) { |
197 | | $errors->add( 'invalid_username', __( '<strong>Error</strong>: Sorry, that username is not allowed.' ) ); |
| 197 | $errors->add( 'invalid_username', __( 'Sorry, that username is not allowed.' ) ); |
198 | 198 | } |
199 | 199 | |
200 | 200 | /* checking email address */ |
201 | 201 | if ( empty( $user->user_email ) ) { |
202 | | $errors->add( 'empty_email', __( '<strong>Error</strong>: Please enter an email address.' ), array( 'form-field' => 'email' ) ); |
| 202 | $errors->add( 'empty_email', __( 'Please enter an email address.' ), array( 'form-field' => 'email' ) ); |
203 | 203 | } elseif ( ! is_email( $user->user_email ) ) { |
204 | | $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); |
| 204 | $errors->add( 'invalid_email', __( 'The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); |
205 | 205 | } else { |
206 | 206 | $owner_id = email_exists( $user->user_email ); |
207 | 207 | if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) { |
208 | | $errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) ); |
| 208 | $errors->add( 'email_exists', __( 'That email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) ); |
209 | 209 | } |
210 | 210 | } |
211 | 211 | |
-
diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php
index f5a5fb89a4..e3ab018178 100644
a
|
b
|
if ( 'update' == $action ) { // We are saving settings sent from a settings page |
217 | 217 | wp_die( |
218 | 218 | sprintf( |
219 | 219 | /* translators: %s: The options page name. */ |
220 | | __( '<strong>Error</strong>: Options page %s not found in the options whitelist.' ), |
| 220 | __( 'Options page %s not found in the options whitelist.' ), |
221 | 221 | '<code>' . esc_html( $option_page ) . '</code>' |
222 | 222 | ) |
223 | 223 | ); |
-
diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php
index f88e629f01..b4e4a666c8 100644
a
|
b
|
switch ( $step ) { |
280 | 280 | $tryagain_link = '</p><p class="step"><a href="' . $step_1 . '" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try Again' ) . '</a>'; |
281 | 281 | |
282 | 282 | if ( empty( $prefix ) ) { |
283 | | wp_die( __( '<strong>Error</strong>: "Table Prefix" must not be empty.' ) . $tryagain_link ); |
| 283 | wp_die( __( '"Table Prefix" must not be empty.' ) . $tryagain_link ); |
284 | 284 | } |
285 | 285 | |
286 | 286 | // Validate $prefix: it can only contain letters, numbers and underscores. |
287 | 287 | if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) { |
288 | | wp_die( __( '<strong>Error</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link ); |
| 288 | wp_die( __( '"Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link ); |
289 | 289 | } |
290 | 290 | |
291 | 291 | // Test the DB connection. |
… |
… |
switch ( $step ) { |
318 | 318 | $wpdb->show_errors( $errors ); |
319 | 319 | if ( ! $wpdb->last_error ) { |
320 | 320 | // MySQL was able to parse the prefix as a value, which we don't want. Bail. |
321 | | wp_die( __( '<strong>Error</strong>: "Table Prefix" is invalid.' ) ); |
| 321 | wp_die( __( '"Table Prefix" is invalid.' ) ); |
322 | 322 | } |
323 | 323 | |
324 | 324 | // Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password(). |
-
diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php
index 485c7674c3..fa424dce8d 100644
a
|
b
|
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) { |
233 | 233 | $ct = wp_get_theme(); |
234 | 234 | |
235 | 235 | if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) { |
236 | | echo '<div class="error"><p>' . __( 'Error:' ) . ' ' . $ct->errors()->get_error_message() . '</p></div>'; |
| 236 | echo '<div class="error"><p>' . $ct->errors()->get_error_message() . '</p></div>'; |
237 | 237 | } |
238 | 238 | |
239 | 239 | /* |
-
diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php
index 04164d7179..9259bec4d6 100644
a
|
b
|
switch ( $wp_list_table->current_action() ) { |
274 | 274 | <h1><?php _e( 'Delete Users' ); ?></h1> |
275 | 275 | <?php if ( isset( $_REQUEST['error'] ) ) : ?> |
276 | 276 | <div class="error"> |
277 | | <p><strong><?php _e( 'Error:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p> |
| 277 | <p><?php _e( 'Please select an option.' ); ?></p> |
278 | 278 | </div> |
279 | 279 | <?php endif; ?> |
280 | 280 | |
-
diff --git a/src/wp-includes/class-wp-theme.php b/src/wp-includes/class-wp-theme.php
index 124ee11524..278b2a8d8f 100644
a
|
b
|
final class WP_Theme implements ArrayAccess { |
255 | 255 | ) |
256 | 256 | ); |
257 | 257 | if ( ! file_exists( $this->theme_root ) ) { // Don't cache this one. |
258 | | $this->errors->add( 'theme_root_missing', __( 'Error: The themes directory is either empty or doesn’t exist. Please check your installation.' ) ); |
| 258 | $this->errors->add( 'theme_root_missing', __( 'The themes directory is either empty or doesn’t exist. Please check your installation.' ) ); |
259 | 259 | } |
260 | 260 | return; |
261 | 261 | } elseif ( ! is_readable( $this->theme_root . '/' . $theme_file ) ) { |
-
diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index 8648a89a0f..0acdc75b16 100644
a
|
b
|
function wp_check_comment_data_max_lengths( $comment_data ) { |
1234 | 1234 | $max_lengths = wp_get_comment_fields_max_lengths(); |
1235 | 1235 | |
1236 | 1236 | if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) { |
1237 | | return new WP_Error( 'comment_author_column_length', __( '<strong>Error</strong>: Your name is too long.' ), 200 ); |
| 1237 | return new WP_Error( 'comment_author_column_length', __( 'Your name is too long.' ), 200 ); |
1238 | 1238 | } |
1239 | 1239 | |
1240 | 1240 | if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) { |
1241 | | return new WP_Error( 'comment_author_email_column_length', __( '<strong>Error</strong>: Your email address is too long.' ), 200 ); |
| 1241 | return new WP_Error( 'comment_author_email_column_length', __( 'Your email address is too long.' ), 200 ); |
1242 | 1242 | } |
1243 | 1243 | |
1244 | 1244 | if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) { |
1245 | | return new WP_Error( 'comment_author_url_column_length', __( '<strong>Error</strong>: Your URL is too long.' ), 200 ); |
| 1245 | return new WP_Error( 'comment_author_url_column_length', __( 'Your URL is too long.' ), 200 ); |
1246 | 1246 | } |
1247 | 1247 | |
1248 | 1248 | if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) { |
1249 | | return new WP_Error( 'comment_content_column_length', __( '<strong>Error</strong>: Your comment is too long.' ), 200 ); |
| 1249 | return new WP_Error( 'comment_content_column_length', __( 'Your comment is too long.' ), 200 ); |
1250 | 1250 | } |
1251 | 1251 | |
1252 | 1252 | return true; |
… |
… |
function wp_handle_comment_submission( $comment_data ) { |
3370 | 3370 | |
3371 | 3371 | if ( get_option( 'require_name_email' ) && ! $user->exists() ) { |
3372 | 3372 | if ( '' == $comment_author_email || '' == $comment_author ) { |
3373 | | return new WP_Error( 'require_name_email', __( '<strong>Error</strong>: Please fill the required fields (name, email).' ), 200 ); |
| 3373 | return new WP_Error( 'require_name_email', __( 'Please fill the required fields (name, email).' ), 200 ); |
3374 | 3374 | } elseif ( ! is_email( $comment_author_email ) ) { |
3375 | | return new WP_Error( 'require_valid_email', __( '<strong>Error</strong>: Please enter a valid email address.' ), 200 ); |
| 3375 | return new WP_Error( 'require_valid_email', __( 'Please enter a valid email address.' ), 200 ); |
3376 | 3376 | } |
3377 | 3377 | } |
3378 | 3378 | |
… |
… |
function wp_handle_comment_submission( $comment_data ) { |
3397 | 3397 | */ |
3398 | 3398 | $allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata ); |
3399 | 3399 | if ( '' === $comment_content && ! $allow_empty_comment ) { |
3400 | | return new WP_Error( 'require_valid_comment', __( '<strong>Error</strong>: Please type a comment.' ), 200 ); |
| 3400 | return new WP_Error( 'require_valid_comment', __( 'Please type a comment text.' ), 200 ); |
3401 | 3401 | } |
3402 | 3402 | |
3403 | 3403 | $check_max_lengths = wp_check_comment_data_max_lengths( $commentdata ); |
… |
… |
function wp_handle_comment_submission( $comment_data ) { |
3411 | 3411 | } |
3412 | 3412 | |
3413 | 3413 | if ( ! $comment_id ) { |
3414 | | return new WP_Error( 'comment_save_error', __( '<strong>Error</strong>: The comment could not be saved. Please try again later.' ), 500 ); |
| 3414 | return new WP_Error( 'comment_save_error', __( 'The comment could not be saved. Please try again later.' ), 500 ); |
3415 | 3415 | } |
3416 | 3416 | |
3417 | 3417 | return get_comment( $comment_id ); |
-
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 1d3b2c74bc..eb131f1688 100644
a
|
b
|
function do_feed() { |
1545 | 1545 | } |
1546 | 1546 | |
1547 | 1547 | if ( ! has_action( "do_feed_{$feed}" ) ) { |
1548 | | wp_die( __( 'Error: This is not a valid feed template.' ), '', array( 'response' => 404 ) ); |
| 1548 | wp_die( __( 'This is not a valid feed template.' ), '', array( 'response' => 404 ) ); |
1549 | 1549 | } |
1550 | 1550 | |
1551 | 1551 | /** |
-
diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
index 72d92e58e7..88e0ad1706 100644
a
|
b
|
function wp_set_wpdb_vars() { |
479 | 479 | wp_die( |
480 | 480 | sprintf( |
481 | 481 | /* translators: 1: $table_prefix, 2: wp-config.php */ |
482 | | __( '<strong>Error</strong>: %1$s in %2$s can only contain numbers, letters, and underscores.' ), |
| 482 | __( '%1$s in %2$s can only contain numbers, letters, and underscores.' ), |
483 | 483 | '<code>$table_prefix</code>', |
484 | 484 | '<code>wp-config.php</code>' |
485 | 485 | ) |
-
diff --git a/src/wp-includes/ms-deprecated.php b/src/wp-includes/ms-deprecated.php
index cd30478811..dd7cc3a772 100644
a
|
b
|
function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) { |
401 | 401 | |
402 | 402 | // Check if the domain has been used already. We should return an error message. |
403 | 403 | if ( domain_exists($domain, $path, $site_id) ) |
404 | | return __( '<strong>Error</strong>: Site URL already taken.' ); |
| 404 | return __( 'Site URL you’ve entered is already taken.' ); |
405 | 405 | |
406 | 406 | /* |
407 | 407 | * Need to back up wpdb table names, and create a new wp_blogs entry for new blog. |
… |
… |
function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) { |
410 | 410 | */ |
411 | 411 | |
412 | 412 | if ( ! $blog_id = insert_blog($domain, $path, $site_id) ) |
413 | | return __( '<strong>Error</strong>: Problem creating site entry.' ); |
| 413 | return __( 'There was a problem creating site entry.' ); |
414 | 414 | |
415 | 415 | switch_to_blog($blog_id); |
416 | 416 | install_blog($blog_id); |
-
diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
index e484923a42..0c094ccbe9 100644
a
|
b
|
if ( ! function_exists( 'wp_authenticate' ) ) : |
541 | 541 | if ( null == $user ) { |
542 | 542 | // TODO: What should the error message be? (Or would these even happen?) |
543 | 543 | // Only needed if all authentication handlers fail to return anything. |
544 | | $user = new WP_Error( 'authentication_failed', __( '<strong>Error</strong>: Invalid username, email address or incorrect password.' ) ); |
| 544 | $user = new WP_Error( 'authentication_failed', __( 'Invalid username, email address or incorrect password.' ) ); |
545 | 545 | } |
546 | 546 | |
547 | 547 | $ignore_codes = array( 'empty_username', 'empty_password' ); |
-
diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index 03264225fe..91adfdf147 100644
a
|
b
|
function validate_theme_requirements( $stylesheet ) { |
930 | 930 | 'theme_wp_php_incompatible', |
931 | 931 | sprintf( |
932 | 932 | /* translators: %s: Theme name. */ |
933 | | _x( '<strong>Error:</strong> Current WordPress and PHP versions do not meet minimum requirements for %s.', 'theme' ), |
| 933 | _x( 'Current WordPress and PHP versions do not meet minimum requirements for %s.', 'theme' ), |
934 | 934 | $theme->display( 'Name' ) |
935 | 935 | ) |
936 | 936 | ); |
… |
… |
function validate_theme_requirements( $stylesheet ) { |
939 | 939 | 'theme_php_incompatible', |
940 | 940 | sprintf( |
941 | 941 | /* translators: %s: Theme name. */ |
942 | | _x( '<strong>Error:</strong> Current PHP version does not meet minimum requirements for %s.', 'theme' ), |
| 942 | _x( 'Current PHP version does not meet minimum requirements for %s.', 'theme' ), |
943 | 943 | $theme->display( 'Name' ) |
944 | 944 | ) |
945 | 945 | ); |
… |
… |
function validate_theme_requirements( $stylesheet ) { |
948 | 948 | 'theme_wp_incompatible', |
949 | 949 | sprintf( |
950 | 950 | /* translators: %s: Theme name. */ |
951 | | _x( '<strong>Error:</strong> Current WordPress version does not meet minimum requirements for %s.', 'theme' ), |
| 951 | _x( 'Current WordPress version does not meet minimum requirements for %s.', 'theme' ), |
952 | 952 | $theme->display( 'Name' ) |
953 | 953 | ) |
954 | 954 | ); |
-
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index bf9472d8cf..adcb98d204 100644
a
|
b
|
function wp_authenticate_username_password( $user, $username, $password ) { |
134 | 134 | $error = new WP_Error(); |
135 | 135 | |
136 | 136 | if ( empty( $username ) ) { |
137 | | $error->add( 'empty_username', __( '<strong>Error</strong>: The username field is empty.' ) ); |
| 137 | $error->add( 'empty_username', __( 'The username field is empty.' ) ); |
138 | 138 | } |
139 | 139 | |
140 | 140 | if ( empty( $password ) ) { |
141 | | $error->add( 'empty_password', __( '<strong>Error</strong>: The password field is empty.' ) ); |
| 141 | $error->add( 'empty_password', __( 'The password field is empty.' ) ); |
142 | 142 | } |
143 | 143 | |
144 | 144 | return $error; |
… |
… |
function wp_authenticate_username_password( $user, $username, $password ) { |
172 | 172 | 'incorrect_password', |
173 | 173 | sprintf( |
174 | 174 | /* translators: %s: User name. */ |
175 | | __( '<strong>Error</strong>: The password you entered for the username %s is incorrect.' ), |
| 175 | __( 'The password you entered for the username %s is incorrect.' ), |
176 | 176 | '<strong>' . $username . '</strong>' |
177 | 177 | ) . |
178 | 178 | ' <a href="' . wp_lostpassword_url() . '">' . |
… |
… |
function wp_authenticate_email_password( $user, $email, $password ) { |
209 | 209 | |
210 | 210 | if ( empty( $email ) ) { |
211 | 211 | // Uses 'empty_username' for back-compat with wp_signon(). |
212 | | $error->add( 'empty_username', __( '<strong>Error</strong>: The email field is empty.' ) ); |
| 212 | $error->add( 'empty_username', __( 'The email field is empty.' ) ); |
213 | 213 | } |
214 | 214 | |
215 | 215 | if ( empty( $password ) ) { |
216 | | $error->add( 'empty_password', __( '<strong>Error</strong>: The password field is empty.' ) ); |
| 216 | $error->add( 'empty_password', __( 'The password field is empty.' ) ); |
217 | 217 | } |
218 | 218 | |
219 | 219 | return $error; |
… |
… |
function wp_authenticate_email_password( $user, $email, $password ) { |
244 | 244 | 'incorrect_password', |
245 | 245 | sprintf( |
246 | 246 | /* translators: %s: Email address. */ |
247 | | __( '<strong>Error</strong>: The password you entered for the email address %s is incorrect.' ), |
| 247 | __( 'The password you entered for the email address %s is incorrect.' ), |
248 | 248 | '<strong>' . $email . '</strong>' |
249 | 249 | ) . |
250 | 250 | ' <a href="' . wp_lostpassword_url() . '">' . |
… |
… |
function wp_authenticate_spam_check( $user ) { |
319 | 319 | $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user ); |
320 | 320 | |
321 | 321 | if ( $spammed ) { |
322 | | return new WP_Error( 'spammer_account', __( '<strong>Error</strong>: Your account has been marked as a spammer.' ) ); |
| 322 | return new WP_Error( 'spammer_account', __( 'Your account has been marked as a spammer.' ) ); |
323 | 323 | } |
324 | 324 | } |
325 | 325 | return $user; |
… |
… |
function get_password_reset_key( $user ) { |
2278 | 2278 | global $wp_hasher; |
2279 | 2279 | |
2280 | 2280 | if ( ! ( $user instanceof WP_User ) ) { |
2281 | | return new WP_Error( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) ); |
| 2281 | return new WP_Error( 'invalidcombo', __( 'There is no account with that username or email address.' ) ); |
2282 | 2282 | } |
2283 | 2283 | |
2284 | 2284 | /** |
… |
… |
function register_new_user( $user_login, $user_email ) { |
2507 | 2507 | |
2508 | 2508 | // Check the username. |
2509 | 2509 | if ( '' == $sanitized_user_login ) { |
2510 | | $errors->add( 'empty_username', __( '<strong>Error</strong>: Please enter a username.' ) ); |
| 2510 | $errors->add( 'empty_username', __( 'Please enter a username.' ) ); |
2511 | 2511 | } elseif ( ! validate_username( $user_login ) ) { |
2512 | | $errors->add( 'invalid_username', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); |
| 2512 | $errors->add( 'invalid_username', __( 'This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); |
2513 | 2513 | $sanitized_user_login = ''; |
2514 | 2514 | } elseif ( username_exists( $sanitized_user_login ) ) { |
2515 | | $errors->add( 'username_exists', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ) ); |
| 2515 | $errors->add( 'username_exists', __( 'This username is already registered. Please choose another one.' ) ); |
2516 | 2516 | |
2517 | 2517 | } else { |
2518 | 2518 | /** This filter is documented in wp-includes/user.php */ |
2519 | 2519 | $illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() ); |
2520 | 2520 | if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ), true ) ) { |
2521 | | $errors->add( 'invalid_username', __( '<strong>Error</strong>: Sorry, that username is not allowed.' ) ); |
| 2521 | $errors->add( 'invalid_username', __( 'Sorry, that username is not allowed.' ) ); |
2522 | 2522 | } |
2523 | 2523 | } |
2524 | 2524 | |
2525 | 2525 | // Check the email address. |
2526 | 2526 | if ( '' == $user_email ) { |
2527 | | $errors->add( 'empty_email', __( '<strong>Error</strong>: Please type your email address.' ) ); |
| 2527 | $errors->add( 'empty_email', __( 'Please type your email address.' ) ); |
2528 | 2528 | } elseif ( ! is_email( $user_email ) ) { |
2529 | | $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ) ); |
| 2529 | $errors->add( 'invalid_email', __( 'The email address isn’t correct.' ) ); |
2530 | 2530 | $user_email = ''; |
2531 | 2531 | } elseif ( email_exists( $user_email ) ) { |
2532 | | $errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered, please choose another one.' ) ); |
| 2532 | $errors->add( 'email_exists', __( 'This email is already registered, please choose another one.' ) ); |
2533 | 2533 | } |
2534 | 2534 | |
2535 | 2535 | /** |
… |
… |
function register_new_user( $user_login, $user_email ) { |
2574 | 2574 | 'registerfail', |
2575 | 2575 | sprintf( |
2576 | 2576 | /* translators: %s: Admin email address. */ |
2577 | | __( '<strong>Error</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), |
| 2577 | __( 'Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), |
2578 | 2578 | get_option( 'admin_email' ) |
2579 | 2579 | ) |
2580 | 2580 | ); |
… |
… |
function send_confirmation_on_profile_email() { |
2809 | 2809 | if ( ! is_email( $_POST['email'] ) ) { |
2810 | 2810 | $errors->add( |
2811 | 2811 | 'user_email', |
2812 | | __( '<strong>Error</strong>: The email address isn’t correct.' ), |
| 2812 | __( 'The email address isn’t correct.' ), |
2813 | 2813 | array( |
2814 | 2814 | 'form-field' => 'email', |
2815 | 2815 | ) |
… |
… |
function send_confirmation_on_profile_email() { |
2821 | 2821 | if ( email_exists( $_POST['email'] ) ) { |
2822 | 2822 | $errors->add( |
2823 | 2823 | 'user_email', |
2824 | | __( '<strong>Error</strong>: The email address is already used.' ), |
| 2824 | __( 'The email address is already used.' ), |
2825 | 2825 | array( |
2826 | 2826 | 'form-field' => 'email', |
2827 | 2827 | ) |
-
diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
index 4b71bd7de1..8da9acb7c5 100644
a
|
b
|
class wpdb { |
3499 | 3499 | // Make sure the server has the required MySQL version. |
3500 | 3500 | if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) { |
3501 | 3501 | /* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */ |
3502 | | return new WP_Error( 'database_version', sprintf( __( '<strong>Error</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) ); |
| 3502 | return new WP_Error( 'database_version', sprintf( __( 'WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) ); |
3503 | 3503 | } |
3504 | 3504 | } |
3505 | 3505 | |
-
diff --git a/src/wp-login.php b/src/wp-login.php
index 0b552ef326..7328812ac9 100644
a
|
b
|
function retrieve_password() { |
363 | 363 | $user_data = false; |
364 | 364 | |
365 | 365 | if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) { |
366 | | $errors->add( 'empty_username', __( '<strong>Error</strong>: Enter a username or email address.' ) ); |
| 366 | $errors->add( 'empty_username', __( 'Please enter a username or email address.' ) ); |
367 | 367 | } elseif ( strpos( $_POST['user_login'], '@' ) ) { |
368 | 368 | $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) ); |
369 | 369 | if ( empty( $user_data ) ) { |
370 | | $errors->add( 'invalid_email', __( '<strong>Error</strong>: There is no account with that username or email address.' ) ); |
| 370 | $errors->add( 'invalid_email', __( 'There is no account with that username or email address.' ) ); |
371 | 371 | } |
372 | 372 | } else { |
373 | 373 | $login = trim( wp_unslash( $_POST['user_login'] ) ); |
… |
… |
function retrieve_password() { |
392 | 392 | } |
393 | 393 | |
394 | 394 | if ( ! $user_data ) { |
395 | | $errors->add( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) ); |
| 395 | $errors->add( 'invalidcombo', __( 'There is no account with that username or email address.' ) ); |
396 | 396 | return $errors; |
397 | 397 | } |
398 | 398 | |
… |
… |
function retrieve_password() { |
459 | 459 | 'retrieve_password_email_failure', |
460 | 460 | sprintf( |
461 | 461 | /* translators: %s: Documentation URL. */ |
462 | | __( '<strong>Error</strong>: The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ), |
| 462 | __( 'The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ), |
463 | 463 | esc_url( __( 'https://wordpress.org/support/article/resetting-your-password/' ) ) |
464 | 464 | ) |
465 | 465 | ); |
… |
… |
switch ( $action ) { |
1202 | 1202 | 'test_cookie', |
1203 | 1203 | sprintf( |
1204 | 1204 | /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */ |
1205 | | __( '<strong>Error</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ), |
| 1205 | __( 'Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ), |
1206 | 1206 | __( 'https://wordpress.org/support/article/cookies/' ), |
1207 | 1207 | __( 'https://wordpress.org/support/forums/' ) |
1208 | 1208 | ) |
… |
… |
switch ( $action ) { |
1213 | 1213 | 'test_cookie', |
1214 | 1214 | sprintf( |
1215 | 1215 | /* translators: %s: Browser cookie documentation URL. */ |
1216 | | __( '<strong>Error</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ), |
| 1216 | __( 'Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ), |
1217 | 1217 | __( 'https://wordpress.org/support/article/cookies/#enable-cookies-in-your-browser' ) |
1218 | 1218 | ) |
1219 | 1219 | ); |
-
diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
index dcde8fd2ea..b858944d77 100644
a
|
b
|
if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) { |
30 | 30 | global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer, $wp_theme_directories; |
31 | 31 | |
32 | 32 | if ( ! is_readable( $config_file_path ) ) { |
33 | | echo "Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n"; |
| 33 | echo "wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n"; |
34 | 34 | exit( 1 ); |
35 | 35 | } |
36 | 36 | |
… |
… |
require_once __DIR__ . '/functions.php'; |
39 | 39 | |
40 | 40 | if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) { |
41 | 41 | printf( |
42 | | "Error: Looks like you're using PHPUnit %s. WordPress is currently only compatible with PHPUnit up to 7.x.\n", |
| 42 | "Looks like you're using PHPUnit %s. WordPress is currently only compatible with PHPUnit up to 7.x.\n", |
43 | 43 | tests_get_phpunit_version() |
44 | 44 | ); |
45 | 45 | echo "Please use the latest PHPUnit version from the 7.x branch.\n"; |
… |
… |
if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) { |
47 | 47 | } |
48 | 48 | |
49 | 49 | if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) { |
50 | | echo "Error: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n"; |
| 50 | echo "The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n"; |
51 | 51 | exit( 1 ); |
52 | 52 | } |
53 | 53 | |
-
diff --git a/tests/phpunit/includes/trac.php b/tests/phpunit/includes/trac.php
index 84617fa661..1fb7672865 100644
a
|
b
|
class TracTickets { |
47 | 47 | // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
48 | 48 | public static function usingLocalCache() { |
49 | 49 | echo PHP_EOL . "\x1b[0m\x1b[30;43m\x1b[2K"; |
50 | | echo 'Info: Trac was inaccessible, so a local ticket status cache was used.' . PHP_EOL; |
| 50 | echo 'Trac was inaccessible, so a local ticket status cache was used.' . PHP_EOL; |
51 | 51 | echo "\x1b[0m\x1b[2K"; |
52 | 52 | } |
53 | 53 | |
54 | 54 | // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid |
55 | 55 | public static function forcingKnownBugs() { |
56 | 56 | echo PHP_EOL . "\x1b[0m\x1b[37;41m\x1b[2K"; |
57 | | echo "Error: Trac was inaccessible, so known bugs weren't able to be skipped." . PHP_EOL; |
| 57 | echo "Trac was inaccessible, so known bugs weren't able to be skipped." . PHP_EOL; |
58 | 58 | echo "\x1b[0m\x1b[2K"; |
59 | 59 | } |
60 | 60 | } |
-
diff --git a/tests/phpunit/tests/ajax/ReplytoComment.php b/tests/phpunit/tests/ajax/ReplytoComment.php
index d0cabef41e..935cbe8ea1 100644
a
|
b
|
class Tests_Ajax_ReplytoComment extends WP_Ajax_UnitTestCase { |
187 | 187 | $_POST['comment_post_ID'] = self::$draft_post->ID; |
188 | 188 | |
189 | 189 | // Make the request. |
190 | | $this->setExpectedException( 'WPAjaxDieStopException', 'Error: You are replying to a comment on a draft post.' ); |
| 190 | $this->setExpectedException( 'WPAjaxDieStopException', 'You can’t reply to a comment on a draft post.' ); |
191 | 191 | $this->_handleAjax( 'replyto-comment' ); |
192 | 192 | } |
193 | 193 | |