WordPress.org

Make WordPress Core

Ticket #49206: 49206.diff

File 49206.diff, 1.4 KB (added by oakesjosh, 2 years ago)
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index fca5ab9db4..5bc3402243 100644
    a b function sanitize_comment_cookies() { 
    651651 * @param bool  $avoid_die   When true, a disallowed comment will result in the function
    652652 *                           returning a WP_Error object, rather than executing wp_die().
    653653 *                           Default false.
    654  * @return int|string|WP_Error Allowed comments return the approval status (0|1|'spam').
     654 * @return int|string|WP_Error Allowed comments return the approval status (0|1|'spam'|'trash').
    655655 *                             If `$avoid_die` is true, disallowed comments return a WP_Error.
    656656 */
    657657function wp_allow_comment( $commentdata, $avoid_die = false ) {
    function wp_allow_comment( $commentdata, $avoid_die = false ) { 
    820820         * @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and
    821821         *              allow skipping further processing.
    822822         *
    823          * @param int|string|WP_Error $approved    The approval status. Accepts 1, 0, 'spam' or WP_Error.
     823         * @param int|string|WP_Error $approved    The approval status. Accepts 1, 0, 'spam', 'trash' or WP_Error.
    824824         * @param array               $commentdata Comment data.
    825825         */
    826826        $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );