WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 4 weeks ago

#48005 closed enhancement (fixed)

PHPDoc correction for WP_Theme::get

Reported by: david.binda Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version: 3.4
Component: Themes Keywords: has-patch commit
Focuses: docs Cc:
PR Number:

Description

The PHPDoc for the WP_Theme::get function says it returns string|false (added in r32547 ), but it actually may return an array for "Tags" header (via WP_Theme::sanitize_header).

mixed, as used in WP_Theme::sanitize_header may better document the actual state.

Related code:

Attachments (1)

48005.diff (611 bytes) - added by david.binda 3 months ago.

Download all attachments as: .zip

Change History (5)

@david.binda
3 months ago

#1 @SergeyBiryukov
3 months ago

  • Component changed from General to Themes
  • Focuses docs added
  • Milestone changed from Awaiting Review to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @mukesh27
3 months ago

  • Keywords has-patch added

#3 @davidbaumwald
3 months ago

  • Keywords commit added
  • Milestone changed from 5.3 to 5.4

Although doc changes can be made between beta 1 and RC, there are 200 bug tickets still to triage. With 5.3 Beta 1 landing in a couple of hours, this is being moved for consideration in 5.4 If a committer feels this change should be made before RC, they can move it back and commit.

#4 @SergeyBiryukov
4 weeks ago

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

In 46751:

Docs: Clarify that WP_Theme::get(), ::display(), and several related methods treat the Tags theme header as an array.

Props david.binda.
Fixes #48005.

Note: See TracTickets for help on using tickets.