Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#40892 closed enhancement (fixed)

Documentation for `get_header` and `get_footer` actions are not accurate.

Reported by: desrosj's profile desrosj Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.9 Priority: low
Severity: minor Version:
Component: Themes Keywords: has-patch
Focuses: Cc:


The get_header and get_footer action hook Docblocks both say "The hook allows a specific footer/header template file to be used in place of the default footer template file."

This is not entirely accurate. While the hooks allow you to do something before the behavior of get_header() or get_footer(), it does not allow you to prevent the default output of these functions as the description suggests.

Attachments (1)

40892.diff (1.3 KB) - added by desrosj 6 years ago.

Download all attachments as: .zip

Change History (4)

6 years ago

#1 @desrosj
6 years ago

  • Severity changed from normal to minor
  • Type changed from defect (bug) to enhancement

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 4.9

I think we can just remove these inaccurate parts. We generally don't provide this kind of extended explanations for other filters, like get_template_part_{$slug} or pre_get_search_form.

get_sidebar() is also affected.

#3 @SergeyBiryukov
6 years ago

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

In 40955:

Docs: Remove inaccurate parts of get_header, get_footer, and get_sidebar hooks documentation.

These sentences suggested that the hooks allow a specific template file to be used in place of the default file, which is not the case.

Props desrosj.
Fixes #40892.

Note: See TracTickets for help on using tickets.