Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#61288 closed enhancement (fixed)

Docstrings don't reflect function return type change.

Reported by: marherumr's profile marherumr Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.6 Priority: normal
Severity: trivial Version: 6.5.3
Component: Shortcodes Keywords: dev-feedback
Focuses: Cc:


The git commit 10b9642 changed the return type of shortcode_parse_atts from array|string to array.

The docstring for the pre_do_shortcode_tag filter in line 423 and the do_shortcode_tag filter in line 442 state that attr (the return value of shortcode_parse_atts) could be array or string.

Changing the docstring for those two filters would make it clearer to developers that no type checking for array oder string is neccessary.

Change History (2)

#1 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 6.6

#2 @SergeyBiryukov
2 months ago

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

In 58197:

Docs: Update pre_do_shortcode_tag and do_shortcode_tag filter DocBlocks.

This reflects the return type change of shortcode_parse_atts() from array|string to array in WordPress 6.5.

Follow-up to [38506], [38713], [39665], [55711], [57597], [58168].

Props marherumr.
Fixes #61288.

Note: See TracTickets for help on using tickets.