Make WordPress Core

Ticket #57106: wp_comments_post.patch

File wp_comments_post.patch, 878 bytes (added by apermo, 16 months ago)
  • wp-comments-post.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/wp-comments-post.php b/wp-comments-post.php
    a b  
    2424
    2525$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
    2626if ( is_wp_error( $comment ) ) {
     27        /**
     28         * Fires after an comment submission ended in a WP_Error.
     29         *
     30         * Use this for logging purposes, or for forwarding to alternative direction rather than showing a wp_die.
     31         *
     32         * @since TBD
     33         *
     34         * @param WP_Error $comment The error object thrown by wp_handle_comment_submission
     35         */
     36        do_action( 'comment_submission_is_error', $comment );
     37
    2738        $data = (int) $comment->get_error_data();
    2839        if ( ! empty( $data ) ) {
    2940                wp_die(