Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#40892 closed enhancement (fixed)

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

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

Description

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 9 years ago.

Download all attachments as: .zip

Change History (4)

#1 @desrosj
9 years ago

  • Severity normal → minor
  • Type defect (bug) → enhancement

#2 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review → 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
9 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → 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.