IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 508 | 508 | |
| 509 | 509 | // Honor the discussion setting that requires a name and email address of the comment author. |
| 510 | 510 | if ( get_option( 'require_name_email' ) ) { |
| 511 | | if ( ! isset( $prepared_comment['comment_author'] ) && ! isset( $prepared_comment['comment_author_email'] ) ) { |
| | 511 | if ( empty( $prepared_comment['comment_author'] ) && empty( $prepared_comment['comment_author_email'] ) ) { |
| 512 | 512 | return new WP_Error( 'rest_comment_author_data_required', __( 'Creating a comment requires valid author name and email values.' ), array( 'status' => 400 ) ); |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | | if ( ! isset( $prepared_comment['comment_author'] ) ) { |
| | 515 | if ( empty( $prepared_comment['comment_author'] ) ) { |
| 516 | 516 | return new WP_Error( 'rest_comment_author_required', __( 'Creating a comment requires a valid author name.' ), array( 'status' => 400 ) ); |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | | if ( ! isset( $prepared_comment['comment_author_email'] ) ) { |
| | 519 | if ( empty( $prepared_comment['comment_author_email'] ) ) { |
| 520 | 520 | return new WP_Error( 'rest_comment_author_email_required', __( 'Creating a comment requires a valid author email.' ), array( 'status' => 400 ) ); |
| 521 | 521 | } |
| 522 | 522 | } |