Make WordPress Core

Ticket #33903: 33903.1.diff

File 33903.1.diff, 1.1 KB (added by cfinke, 10 years ago)

Document the possible 'string' value of $comment_approved.

  • wp-includes/comment-functions.php

     
    16331633         *
    16341634         * @since 1.2.0
    16351635         *
    1636          * @param int $comment_ID       The comment ID.
    1637          * @param int $comment_approved 1 (true) if the comment is approved, 0 (false) if not.
     1636         * @param int        $comment_ID       The comment ID.
     1637         * @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam.
    16381638         */
    16391639        do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'] );
    16401640
     
    16461646 *
    16471647 * @since 4.4.0
    16481648 *
    1649  * @param int $comment_ID       ID of the comment.
    1650  * @param int $comment_approved Whether the comment is approved.
     1649 * @param int        $comment_ID       ID of the comment.
     1650 * @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam.
    16511651 */
    16521652function wp_new_comment_notify_moderator( $comment_ID, $comment_approved ) {
    16531653        if ( '0' == $comment_approved ) {