[wp-trac] [WordPress Trac] #20287: Load header and footer template files using hooks

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 23 09:15:09 UTC 2012


#20287: Load header and footer template files using hooks
-------------------------+-----------------------------
 Reporter:  johnbillion  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Template     |    Version:
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 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:

  1. 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.
  2. 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20287>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list