WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 6 months ago

#49206 closed defect (bug) (fixed)

Update `wp_allow_comment()` and `pre_comment_approved` docs with possible `trash` return value

Reported by: jeremyfelt Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Comments Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

In wp_allow_comment(), if wp_blacklist_check() is true and EMPTY_TRASH_DAYS is defined and truthy, then trash is returned for the value of $approved.

The docs for wp_allow_comment() and the pre_comment_approved filter should be updated to reflect this.

Attachments (1)

49206.diff (1.4 KB) - added by oakesjosh 7 months ago.

Download all attachments as: .zip

Change History (3)

@oakesjosh
7 months ago

#1 @SergeyBiryukov
7 months ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @SergeyBiryukov
6 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47286:

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

Props oakesjosh, jeremyfelt.
Fixes #49206.

Note: See TracTickets for help on using tickets.