mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Comments: Mark comment text field as required.
Add required asterisk to the comment text field. Historically, the name and email fields are marked as required, but the comment text field is not, though it is actually a required field. Props infected, solarissmoke, rianrietveld, afercia, sabernhardt, strider72, mai21, audrasjb. Fixes #16206. git-svn-id: https://develop.svn.wordpress.org/trunk@52029 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3549,7 +3549,7 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||
|
||||
if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
|
||||
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.' ), 200 );
|
||||
} elseif ( ! is_email( $comment_author_email ) ) {
|
||||
return new WP_Error( 'require_valid_email', __( '<strong>Error</strong>: Please enter a valid email address.' ), 200 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user