[wp-trac] [WordPress Trac] #64585: Incorrect PHPDoc type for WP_Theme::markup_header parameter

WordPress Trac noreply at wordpress.org
Mon Feb 2 04:43:56 UTC 2026


#64585: Incorrect PHPDoc type for WP_Theme::markup_header parameter
--------------------------+-----------------------------
 Reporter:  marian1       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Themes        |    Version:
 Severity:  minor         |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 `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`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64585>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list