WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#25440 closed defect (bug) (fixed)

Wrong doc block for translate_smiley()

Reported by: toscho Owned by: SergeyBiryukov
Milestone: 3.7 Priority: normal
Severity: minor Version: 2.8
Component: Inline Docs Keywords: has-patch
Focuses: Cc:

Description

Currently, the doc block says the function translate_smiley() expects a string as parameter. This is confusing, because it is a callback handler for preg_replace_callback(), so it must be an array.

Attachments (2)

translate_smiley_doc.patch (709 bytes) - added by toscho 6 years ago.
Fix doc block
25440.patch (1.5 KB) - added by SergeyBiryukov 6 years ago.

Download all attachments as: .zip

Change History (5)

@toscho
6 years ago

Fix doc block

#1 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 3.7

25440.patch also renames the parameter for clarity and consistency with wp_rel_nofollow_callback() and _make_*_clickable_cb().

#2 @SergeyBiryukov
6 years ago

  • Component changed from Formatting to Inline Docs

#3 @SergeyBiryukov
6 years ago

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

In 25646:

Correct phpdoc for translate_smiley(). props toscho. fixes #25440.

Note: See TracTickets for help on using tickets.