Make WordPress Core

Opened 21 months ago

Closed 18 months ago

Last modified 17 months ago

#58675 closed enhancement (fixed)

Theme: use the_header_image_tag in core themes

Reported by: spacedmonkey's profile spacedmonkey Owned by: spacedmonkey's profile spacedmonkey
Milestone: 6.4 Priority: normal
Severity: normal Version: 4.4
Component: Bundled Theme Keywords: commit needs-dev-note
Focuses: performance Cc:

Description (last modified by spacedmonkey)

There are a number of core themes that do not use the the_header_image_tag function. This function was added in WP 4.4 after some of these theme were introduced. Add a backwards compatibility shim to use this function in core themes.

See the following core themes that need to be updated.

Twenty Eleven
Twenty Fourteen
Twenty sixteen
Twenty Ten
Twenty Twelve

Change History (26)

This ticket was mentioned in PR #4760 on WordPress/wordpress-develop by @spacedmonkey.


21 months ago
#1

  • Keywords has-patch added

#2 @sabernhardt
21 months ago

  • Summary changed from Use the_header_image_tag in 2016 theme to Twenty Sixteen: use the_header_image_tag

#3 @spacedmonkey
21 months ago

  • Description modified (diff)
  • Focuses performance added
  • Milestone changed from Future Release to 6.3
  • Summary changed from Twenty Sixteen: use the_header_image_tag to Theme: use the_header_image_tag

#5 @spacedmonkey
21 months ago

  • Summary changed from Theme: use the_header_image_tag to Theme: use the_header_image_tag in core themes

#6 @swissspidy
21 months ago

This looks more like an enhancement to me

#7 @flixos90
21 months ago

+1 to what @swissspidy says, while this relates to #58680, this is a broader change and goes beyond what I'd consider a critical bug fix - also relates to the fact that this bug was not introduced in trunk but WP 4.4, so not critical.

Given that it touches the core themes with several lines of code changes. I don't feel comfortable committing this so late in the cycle, and furthermore I don't think it's critical enough. I think we should milestone this for 6.4.

cc @desrosj in case you have some guidance when to make such changes

#8 @spacedmonkey
21 months ago

  • Keywords early added
  • Milestone changed from 6.3 to 6.4
  • Type changed from defect (bug) to enhancement

Punting to WordPress 6.4. I agree that that this is an enhancement over a bug. I have pushed @flixos90 to add this ticket to the dev note. Header image not working with this new functionality ( and even older functionality like async decoding ), might be a little confusing. The dev note should include instructions on how to retrofit your theme to support these features and use this ticket / PR as an example.

Marking this as early, myself as the owner and changing to WP 6.4.

Keeping this as part of the performance focus, as adding source sets, decoding async and fetch priority to header images, is a performance win.

#9 @mukesh27
21 months ago

  • Owner set to spacedmonkey
  • Status changed from new to assigned

#10 @hellofromTonya
19 months ago

  • Keywords early removed

I don't think this scope of work must be bound to only the early phase of the 6.4 alpha cycle, meaning if it doesn't get done during this early phase then it gets punted. Work here can happen at anytime during Alpha, i.e up to the Beta 1.

This ticket was mentioned in Slack in #core-performance by spacedmonkey. View the logs.


19 months ago

#12 @spacedmonkey
19 months ago

  • Owner spacedmonkey deleted

This ticket was mentioned in Slack in #core-performance by spacedmonkey. View the logs.


19 months ago

#14 @spacedmonkey
18 months ago

  • Owner set to flixos90
  • Status changed from assigned to reviewing

#15 @spacedmonkey
18 months ago

Assigning to @flixos90 for review.

@spacedmonkey commented on PR #4797:


18 months ago
#16

@felixarntz Go catches. Feedback actioned!

#17 @spacedmonkey
18 months ago

  • Keywords commit added
  • Owner changed from flixos90 to spacedmonkey

#18 @spacedmonkey
18 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 56583:

Bundled Theme: Implement the_header_image_tag function for enhanced compatibility for older core themes.

The the_header_image_tag function was introduced in WordPress 4.4 as part of [35594]. It is used in all themes created post WordPress 4.4 that supported header images. The function get_header_image_tag continues to get updated with new image features, like lazy loading, async decoding and fetch priority. To ensure our core themes maintain compatibility and benefit from these enhancements, a backward compatibility shim has been applied, integrating the the_header_image_tag function into the following core themes:

  • Twenty Ten
  • Twenty Eleven
  • Twenty Twelve
  • Twenty Fourteen
  • Twenty Sixteen

This change ensures future compatibility and modern image features are applied for header images to these older themes.

Props spacedmonkey, flixos90, mukesh27.
Fixes #58675.

#21 @spacedmonkey
18 months ago

  • Keywords needs-dev-note added

#22 @webcommsat
17 months ago

All tickets marked as needs dev note, in the milestone are being rechecked for the documentation tracker to check for inclusion. Thank you for labelling this. If there is a link to a draft, this can be added to the 6.4 documentation tracker. It is helpful to know if a dev note is intended to be a single post, part of a multi post and/or if it needed for mention in the Field Guide.

From the comments above, https://core.trac.wordpress.org/ticket/58675#comment:18 seems to summarize the ticket.

@spacedmonkey , I appreciate you have many dev notes in hand, and it is always a pleasure to read through your dev notes. Thank you in advance.

#23 @spacedmonkey
17 months ago

@webcommsat I have run out time to work on anymore dev notes. So sad, I will not find time to work on this.

I would recommmend, using the commit message. I would add it this dev note.

#24 @webcommsat
17 months ago

  • Keywords has-patch removed

Thank you Jonny. I have added the commit message at comment 18 to the dev note draft. We are waiting for the performance team first review, and will turn around the second review, so we can get this published.

#25 @flixos90
17 months ago

@webcommsat @spacedmonkey I actually think this ticket doesn't need a dev note. Here's why:

So I would suggest to remove needs-dev-note from here.

This ticket was mentioned in Slack in #core-performance by joemcgill. View the logs.


17 months ago

Note: See TracTickets for help on using tickets.