Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#64585 closed defect (bug) (fixed)

Incorrect PHPDoc type for WP_Theme::markup_header parameter

Reported by: marian1's profile marian1 Owned by: westonruter's profile westonruter
Milestone: 7.0 Priority: normal
Severity: minor Version: 3.4
Component: Themes Keywords: has-patch commit
Focuses: docs Cc:

Description

WP_Theme::markup_header() documents its $translate parameter as string, but the value is used as a boolean throughout the call chain:

  • WP_Theme::display() defines its third parameter $translate as bool and passes it directly into markup_header().
  • Inside markup_header(), $translate is then passed as the third argument to WP_Theme::display(), where it is again expected to be boolean.

In other words: markup_header()'s $translate parameter is documented as string, but it is supplied and consumed as bool.

Change History (3)

This ticket was mentioned in PR #10840 on WordPress/wordpress-develop by @marian1.


4 months ago
#1

  • Keywords has-patch added

#2 @mukesh27
4 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 7.0
  • Owner set to westonruter
  • Status changed from new to assigned
  • Version set to 3.4

Thanks for the ticket and PR!

This was introduce in #20103/[20029]

#3 @westonruter
4 months ago

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

In 61575:

Docs: Correct $translate param type for WP_Theme::markup_header().

Follow-up to [61574], [20029].

Props marian1, mukesh27.
See #20103.
Fixes #64585.

Note: See TracTickets for help on using tickets.