Make WordPress Core

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.

Change History (2)

#1 @strarsis
9 years ago

How can I speed up/improve the process?

#2 @obenland
9 years ago

  • Milestone Awaiting Review
  • Resolutioninvalid
  • Status newclosed

Version 6 of WP Display Header should fix this issue.

Note: See TracTickets for help on using tickets.