Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#35908 closed defect (bug) (fixed)

Documentation of `pre_comment_content` declares wrong variable type information

Reported by: meitar's profile meitar Owned by: boonebgorges's profile boonebgorges
Milestone: 4.5 Priority: normal
Severity: minor Version: 3.8
Component: Comments Keywords: has-patch
Focuses: docs Cc:

Description

Super simple, but I just noticed that the documentation for the pre_comment_content filter says the filter returns an int when in fact it returns a string.

Trivial patch attached.

Attachments (2)

35908.diff (469 bytes) - added by meitar 8 years ago.
Correct type information for filter hook return value.
35908.2.diff (1.2 KB) - added by meitar 8 years ago.
Correct variable type information for additional two neighboring filters.

Download all attachments as: .zip

Change History (6)

@meitar
8 years ago

Correct type information for filter hook return value.

#1 follow-up: @netweb
8 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to 4.5

@meitar Thanks for the patch, could you update it to include the two filters above and below pre_comment_content

That is in that same wp_filter_comment() function both the filters pre_comment_user_agent and pre_comment_user_ip below should also both be string

@meitar
8 years ago

Correct variable type information for additional two neighboring filters.

#2 in reply to: ↑ 1 @meitar
8 years ago

  • Keywords has-patch added; needs-patch removed

:) LOL, tunnel vision. I didn't event notice those because tunnel vision on this project, I don't need those fields. But yes, I added a new patch. Thanks for catching those.

#3 @boonebgorges
8 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 36626:

Docs: Correct param types on some filters in wp_filter_comment().

Introduced in [26491].

Props meitar, netweb.
Fixes #35908.

#4 @johnbillion
8 years ago

  • Version changed from trunk to 3.8
Note: See TracTickets for help on using tickets.