Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5099 closed enhancement (fixed)

Themes API not returning compatibility data

Reported by: afragen's profile afragen Owned by: dd32's profile dd32
Milestone: Priority: high
Component: API Keywords: dev-feedback


In order for PHP compatibility testing to function with the themes, the Themes API must be able to return the compatibility headers in the readme.txt file just as the Plugins API does.[slug]=wordpress-beta-tester returns data for requires and requires_php.[slug]=twentytwenty simply returns false for requires and requires_php. These data are set, along with tested in the theme's readme.txt file.

These data are necessary for #49334, testing compatibility of themes to install.

Ping @dd32

Change History (8)

#1 @joyously
4 years ago

I thought these fields got moved to the style.css file.

#2 @afragen
4 years ago

I think you are correct, did but the API isn't picking them up in any event.

#3 @Otto42
4 years ago

The themes uploader is still only parsing the readme.txt files, not looking at the style.css for those two headers.

I don't know if the change has yet been made to core to pull from the style.css yet, but if so, then a similar modification would need to be made to the uploader code:

#4 @afragen
4 years ago

@Otto42 the tickets for checking WP/PHP compatibility for themes are #WP44592, #WP48491, #WP49334, and #WP48507.

#5 @dd32
4 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 9588:

Theme Directory: Import the Requires & Requires at least headers from style.css rather than from the readme.txt file.

Fixes #5099.

#6 @dd32
4 years ago

[9588] should do the job for future uploaded themes.

As a once-off, I've filled the data in for the twentytwenty theme:[slug]=twentytwenty

#7 @dd32
4 years ago

In 9589:

Theme Directory: API: expose the Requires/Requires PHP fields by default for theme listings too.

Per afragen.
See #5099.

#8 @dd32
4 years ago

In 9590:

Theme Directory: API: Fix a variable typo that caused [9589] to contain variable typos.

See #5099.

Note: See TracTickets for help on using tickets.