Opened 9 years ago
Closed 9 years ago
#40282 closed defect (bug) (invalid)
header_image hook doesn't update get_theme_mods()
| Reported by: | strarsis | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 4.7.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Related: [WordPress WP Display Header plugin](https://wordpress.org/plugins/wp-display-header/)
The current header image is modified using the theme_mod_header_image hook.
However, in get_header_image_tag(...) the function get_custom_header() returns the default header data (including the non-updated URLs) while get_header_image() correctly returns the new header image URL.
Using wp_calculate_image_srcset(...) with the correctly returned new URL as $image_src argument but with the non-updated $image_meta from get_custom_header() no sizes/srcset attributes are rendered at all - just the img element with src to the full resolution image file URL.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
How can I speed up/improve the process?