WordPress.org

Making WordPress.org

Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#5099 closed enhancement (fixed)

Themes API not returning compatibility data

Reported by: afragen Owned by: dd32
Milestone: Priority: high
Component: API Keywords: dev-feedback
Cc:

Description

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.

https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request[slug]=wordpress-beta-tester returns data for requires and requires_php.

https://api.wordpress.org/themes/info/1.2/?action=theme_information&request[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
21 months ago

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

#2 @afragen
21 months ago

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

#3 @Otto42
21 months 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:

https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

#4 @afragen
21 months ago

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

#5 @dd32
21 months 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
21 months ago

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

As a once-off, I've filled the data in for the twentytwenty theme: https://api.wordpress.org/themes/info/1.2/?action=theme_information&request[slug]=twentytwenty

#7 @dd32
21 months ago

In 9589:

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

Per afragen.
See #5099.

#8 @dd32
21 months 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.