Changeset 49303 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/24/2020 10:44:38 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r49271 r49303 3877 3877 } 3878 3878 3879 if ( empty( $content_struct['content'] ) ) {3880 return new IXR_Error( 403, __( 'Comment is required.' ) );3881 }3882 3883 3879 $comment = array( 3884 3880 'comment_post_ID' => $post_id, 3885 'comment_content' => $content_struct['content'],3881 'comment_content' => trim( $content_struct['content'] ), 3886 3882 ); 3887 3883 … … 3923 3919 3924 3920 $comment['comment_parent'] = isset( $content_struct['comment_parent'] ) ? absint( $content_struct['comment_parent'] ) : 0; 3921 3922 /** This filter is documented in wp-includes/comment.php */ 3923 $allow_empty = apply_filters( 'allow_empty_comment', false, $comment ); 3924 3925 if ( ! $allow_empty && '' === $comment['comment_content'] ) { 3926 return new IXR_Error( 403, __( 'Comment is required.' ) ); 3927 } 3925 3928 3926 3929 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
Note: See TracChangeset
for help on using the changeset viewer.