[wp-trac] [WordPress Trac] #46134: Allow filtering of `$header` object in `get_header_image_tag()` function (for custom header image override)

WordPress Trac noreply at wordpress.org
Tue Apr 16 03:49:51 UTC 2019


#46134: Allow filtering of `$header` object in `get_header_image_tag()` function
(for custom header image override)
-----------------------------------+-----------------------------
 Reporter:  webmandesign           |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Media                  |     Version:  5.0.3
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------------
Changes (by joemcgill):

 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the report, and patch @webmandesign.

 It does seem strange that the $header object would be directly overridden
 in `get_header_image_tag()` to supply the URL from `get_header_image()`.
 It's be worth looking at the change history to see what's happening here.
 Generally, I would prefer to see a filter in `get_custom_header()` in
 order to override any properties of the header object, but that would
 require figuring out if we could drop the call to `get_header_image()`
 from inside `get_header_image_tag()`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46134#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list