WordPress.org

Make WordPress Core

Changeset 47286


Ignore:
Timestamp:
02/13/2020 05:48:50 PM (2 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Update @return tag for wp_allow_comment() with trash as a possible return value.

Props oakesjosh, jeremyfelt.
Fixes #49206.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r47233 r47286  
    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 */
     
    818818     *
    819819     * @since 2.1.0
    820      * @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and
    821      *              allow skipping further processing.
    822      *
    823      * @param int|string|WP_Error $approved    The approval status. Accepts 1, 0, 'spam' or WP_Error.
     820     * @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion
     821     *              and allow skipping further processing.
     822     *
     823     * @param int|string|WP_Error $approved    The approval status. Accepts 1, 0, 'spam', 'trash',
     824     *                                         or WP_Error.
    824825     * @param array               $commentdata Comment data.
    825826     */
    826     $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );
    827     return $approved;
     827    return apply_filters( 'pre_comment_approved', $approved, $commentdata );
    828828}
    829829
Note: See TracChangeset for help on using the changeset viewer.