Load header and footer template files using hooks
|Reported by:||johnbillion||Owned by:|
The theme header and footer files are loaded from inside the get_header() and get_footer() functions.
If these files were instead loaded from helper functions that were hooked into actions inside get_header and get_footer then we'd get two nice benefits:
- Theme frameworks that call a function or fire an action immediately after the header would be able to use the hooks instead of placing the calls directly in each file. For example, Thematic calls thematic_abovecontainer() in each template file immediately after get_header(). It could instead add this via a hook.
- Fancy schmancy themes or plugins that add partial-page AJAX loading (using a system such as PJAX) could unhook the header and footer when they're unneeded in AJAX requests.
Patch coming up.