wp/wp-comments-post.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    22 
    22 
    23 nocache_headers();
    23 nocache_headers();
    24 
    24 
    25 $comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
    25 $comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
    26 if ( is_wp_error( $comment ) ) {
    26 if ( is_wp_error( $comment ) ) {
    27 	$data = intval( $comment->get_error_data() );
    27 	$data = (int) $comment->get_error_data();
    28 	if ( ! empty( $data ) ) {
    28 	if ( ! empty( $data ) ) {
    29 		wp_die(
    29 		wp_die(
    30 			'<p>' . $comment->get_error_message() . '</p>',
    30 			'<p>' . $comment->get_error_message() . '</p>',
    31 			__( 'Comment Submission Failure' ),
    31 			__( 'Comment Submission Failure' ),
    32 			array(
    32 			array(