WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 6 weeks ago

#48517 closed task (blessed) (fixed)

Fix default theme headers to add `Requires at least` and `Requires PHP` headers

Reported by: afragen Owned by: Otto42
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

Per the discussion in #48515 this ticket is to have the headers for all the default themes have their respective Requires at least and Requires PHP headers in the style.css files.

Also, please do not include the WordPress in the version number for the Requires at least header.

The need is for consistency in showing other themes that these data are important and going to be import for theme compatibility testing in core.

Attachments (2)

48517.diff (16.3 KB) - added by Otto42 4 months ago.
Move all the relevant headers to the correct locations, standardize the format to be version numbers only, suitable for reading by code.
48517.2.diff (17.9 KB) - added by desrosj 4 months ago.

Download all attachments as: .zip

Change History (16)

This ticket was mentioned in Slack in #core-themes by afragen. View the logs.


4 months ago

#2 @SergeyBiryukov
4 months ago

  • Component changed from Themes to Bundled Theme
  • Milestone changed from Awaiting Review to 5.4

#3 @Otto42
4 months ago

  • Milestone changed from 5.4 to 5.3
  • Owner set to Otto42
  • Status changed from new to accepted
  • Type changed from defect (bug) to task (blessed)

#4 @Otto42
4 months ago

Patch coming tomorrow. We can get this into 5.3 since it's a non code change, and all the default themes are changing anyway. Save ourselves some future effort.

@Otto42
4 months ago

Move all the relevant headers to the correct locations, standardize the format to be version numbers only, suitable for reading by code.

#5 @Otto42
4 months ago

  • Keywords has-patch commit added; needs-patch removed

Patch added which moves all the Requires headers to the style.css files, and removes the "WordPress" from preceding the version numbers. The "Tested up to" headers remains in the readme files, since core does not read this header.

@desrosj
4 months ago

#6 @desrosj
4 months ago

Thanks @Otto42! 48517.2.diff just runs the related RTL build tasks in Twenty Nineteen and Twenty Twenty to ensure the headers are fixed in the -rtl stylesheets. They are not read, but the files are direct copies with RTL transformations, so good to keep them in sync.

For Twenty Twenty, I also opened a PR to make the changes up stream. While development there will soon die down, I think it's good to sync that over just in case a few changes are copied back over to SVN before official release.

#7 @desrosj
4 months ago

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

In 46676:

Bundled Themes: Standardize the Required PHP and Tested Up To headers.

This change makes several changes to ensure consistency and accuracy for default theme headers:

  • Removes WordPress from Requires at least headers.
  • Ensures the Requires at least and Requires PHP headers are present in every default theme’s style.css file.
  • Ensures Tested up to is present in every readme.txt file.
  • Removes any headers not processed in both the style.css and readme.txt files for each theme.

Props Otto42, afragen.
Fixes #48517.

#8 @desrosj
4 months ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport to 5.3.

This ticket was mentioned in Slack in #core by desrosj. View the logs.


4 months ago

#10 @whyisjake
4 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Let's get this in 5.3.

#11 @SergeyBiryukov
4 months ago

[46676] looks good to backport, though it does feel weird to me that Requires at least and Tested up to are now defined in different files. As noted in comment:30:ticket:48515, I think it would make more sense to define them in a single place, for consistency. Even though core only reads Tested up to from the API response and not from headers at the moment, that would open such a possibility in the future. But I'll leave that for #meta4621.

#12 @SergeyBiryukov
4 months ago

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

In 46699:

Bundled Themes: Standardize the Required PHP and Tested Up To headers.

This change makes several changes to ensure consistency and accuracy for default theme headers:

  • Removes WordPress from Requires at least headers.
  • Ensures the Requires at least and Requires PHP headers are present in every default theme’s style.css file.
  • Ensures Tested up to is present in every readme.txt file.
  • Removes any headers not processed in both the style.css and readme.txt files for each theme.

Props Otto42, afragen.
Merges [46676] to the 5.3 branch.
Fixes #48517.

#13 @SergeyBiryukov
6 weeks ago

In 47136:

Twenty Nineteen: Standardize the Required PHP and Tested Up To headers.

  • Remove WordPress from Requires at least headers.
  • Ensure the Requires at least and Requires PHP headers are present in the style.css file.

Follow-up to [46676], which updated style-rtl.css, but not style.scss or style.css.

See #48517.

#14 @SergeyBiryukov
6 weeks ago

In 47137:

Twenty Nineteen: Standardize the Required PHP and Tested Up To headers.

  • Remove WordPress from Requires at least headers.
  • Ensure the Requires at least and Requires PHP headers are present in the style.css file.

Follow-up to [46676], which updated style-rtl.css, but not style.scss or style.css.

Merges [47136] to the 5.3 branch.
See #48517.

Note: See TracTickets for help on using tickets.