Open bobbingwide opened 2 years ago
The WordPress API to list themes documented at https://codex.wordpress.org/WordPress.org_API is different to the documentation.
action=query_themes
doesn't support the fields
query parameter.query_themes
does not include downloads
.fields
the action needs to be theme_information
.Consequently, I determined that it's not as easy to obtain the same figures for themes are for plugins.
It's possible to get a complete list of the 9061 themes, using browse=updated
.
But in order to get the downloads
each theme needs to be queried individually.
Additionally, the REST API doesn't appear to work for themes.
As there are only 31 of them at present
List all the FSE themes using tag=full-site-editing
Then get the details for each theme using action=theme_information
Store each result in the cache_t2
folder as wporg_saved.themes.slug.json
eg wporg_saved.themes.aino.json
For the fse
command, load the indvidual files in order to get the required information
For the Twenty something themes access them individually from a hardcoded list.
Forget about the other themes for now.
A Fatal error occurs when a themes json file gets created due to a theme not found error.
This was the case with wporg_saved.themes.x3po-reflections.json
{"errors":{"themes_api_failed":["Theme not found"]},"error_data":[]}
which was created on 21 Feb and not updated on the last run.
Well, this has been implemented for a while. What's missing is a listing of the most recent themes. It would be nice to be able to get a list of the themes added since the previous report. It's OK to require a little editing of the generated block.
What's missing is a listing of the most recent themes.
Ditto for plugins.
What's missing is a listing of the most recent themes. It would be nice to be able to get a list of the themes added since the previous report. It's OK to require a little editing of the generated block.
Another approach would be to generate a query block that lists the n most recent themes.
This would work in wp-a2z.org once the themes
routine has been run.
The query block would be dependent on the theme's creation date being set to match that on wordpress.org
It's been on my wish list for some time. Today at the WordPress Cambridge Meetup the topic is "My Favourite Theme". I've already written a poem entitled "My Favourite Theme". So I thought I'd talk about the new default theme for WordPress Twenty Twenty Two. Could this be my favourite theme for performance reasons? Yes and No! So then I started thinking about how people choose their themes, if they do, from wordpress.org.
9,000 themes to choose from and you want me to pick one?
And to work that out I felt it's time to extract the theme summary and produce reports.
Requirements
Proposed solution
themes
fse