Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#64585 closed defect (bug) (fixed)

Incorrect PHPDoc type for WP_Theme::markup_header parameter

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

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.


9 months ago
#1

  • Keywords has-patch added

#2 @mukesh27
9 months ago

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

Thanks for the ticket and PR!

This was introduce in #20103/[20029]

#3 @westonruter
9 months ago

  • Resolution → fixed
  • Status assigned → 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.