[wp-trac] [WordPress Trac] #49496: filters missing for get_header and get_footer
WordPress Trac
noreply at wordpress.org
Sun Feb 23 13:58:15 UTC 2020
#49496: filters missing for get_header and get_footer
--------------------------+------------------------------
Reporter: kevdotbadger | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
--------------------------+------------------------------
Changes (by kevdotbadger):
* keywords: => has-patch
Comment:
I've just added a patch which adds the functionality, but could do with
looking over.
The get_header() and get_footer() functions seems to work as arrays, and
uses the first item in the array as the actual file to load. I guess the
others are fallbacks? So, using the filter will require you to add your
additional template as the first item (using array_unshift).
Could possibly rewrite this, and do that inside the actual get_header (or
get_header)?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49496#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list