Text Changes: Capitalize error messages consistently.
Props Presskopp. Fixes #42945. Built from https://develop.svn.wordpress.org/trunk@47154 git-svn-id: http://core.svn.wordpress.org/trunk@46954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
12a6907123
commit
2fe7c95153
|
@ -1272,7 +1272,7 @@ function wp_ajax_replyto_comment( $action ) {
|
||||||
if ( empty( $post->post_status ) ) {
|
if ( empty( $post->post_status ) ) {
|
||||||
wp_die( 1 );
|
wp_die( 1 );
|
||||||
} elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ) ) ) {
|
} elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ) ) ) {
|
||||||
wp_die( __( 'ERROR: you are replying to a comment on a draft post.' ) );
|
wp_die( __( 'ERROR: You are replying to a comment on a draft post.' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = wp_get_current_user();
|
$user = wp_get_current_user();
|
||||||
|
@ -1302,7 +1302,7 @@ function wp_ajax_replyto_comment( $action ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( '' == $comment_content ) {
|
if ( '' == $comment_content ) {
|
||||||
wp_die( __( 'ERROR: please type a comment.' ) );
|
wp_die( __( 'ERROR: Please type a comment.' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment_parent = 0;
|
$comment_parent = 0;
|
||||||
|
@ -1404,7 +1404,7 @@ function wp_ajax_edit_comment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( '' == $_POST['content'] ) {
|
if ( '' == $_POST['content'] ) {
|
||||||
wp_die( __( 'ERROR: please type a comment.' ) );
|
wp_die( __( 'ERROR: Please type a comment.' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $_POST['status'] ) ) {
|
if ( isset( $_POST['status'] ) ) {
|
||||||
|
|
|
@ -217,7 +217,7 @@ if ( 'update' == $action ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! isset( $whitelist_options[ $option_page ] ) ) {
|
if ( ! isset( $whitelist_options[ $option_page ] ) ) {
|
||||||
wp_die( __( '<strong>ERROR</strong>: options page not found.' ) );
|
wp_die( __( '<strong>ERROR</strong>: Options page not found.' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'options' == $option_page ) {
|
if ( 'options' == $option_page ) {
|
||||||
|
|
|
@ -1224,19 +1224,19 @@ function wp_check_comment_data_max_lengths( $comment_data ) {
|
||||||
$max_lengths = wp_get_comment_fields_max_lengths();
|
$max_lengths = wp_get_comment_fields_max_lengths();
|
||||||
|
|
||||||
if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) {
|
if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) {
|
||||||
return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: your name is too long.' ), 200 );
|
return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: Your name is too long.' ), 200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) {
|
if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) {
|
||||||
return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: your email address is too long.' ), 200 );
|
return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: Your email address is too long.' ), 200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) {
|
if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) {
|
||||||
return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: your url is too long.' ), 200 );
|
return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: Your url is too long.' ), 200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) {
|
if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) {
|
||||||
return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: your comment is too long.' ), 200 );
|
return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: Your comment is too long.' ), 200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -3352,9 +3352,9 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||||
|
|
||||||
if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
|
if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
|
||||||
if ( '' == $comment_author_email || '' == $comment_author ) {
|
if ( '' == $comment_author_email || '' == $comment_author ) {
|
||||||
return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
|
return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: Please fill the required fields (name, email).' ), 200 );
|
||||||
} elseif ( ! is_email( $comment_author_email ) ) {
|
} elseif ( ! is_email( $comment_author_email ) ) {
|
||||||
return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: please enter a valid email address.' ), 200 );
|
return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: Please enter a valid email address.' ), 200 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3379,7 +3379,7 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||||
*/
|
*/
|
||||||
$allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata );
|
$allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata );
|
||||||
if ( '' === $comment_content && ! $allow_empty_comment ) {
|
if ( '' === $comment_content && ! $allow_empty_comment ) {
|
||||||
return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: please type a comment.' ), 200 );
|
return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: Please type a comment.' ), 200 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$check_max_lengths = wp_check_comment_data_max_lengths( $commentdata );
|
$check_max_lengths = wp_check_comment_data_max_lengths( $commentdata );
|
||||||
|
|
|
@ -410,7 +410,7 @@ function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
|
if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
|
||||||
return __( '<strong>ERROR</strong>: problem creating site entry.' );
|
return __( '<strong>ERROR</strong>: Problem creating site entry.' );
|
||||||
|
|
||||||
switch_to_blog($blog_id);
|
switch_to_blog($blog_id);
|
||||||
install_blog($blog_id);
|
install_blog($blog_id);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4-alpha-47153';
|
$wp_version = '5.4-alpha-47154';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue