-
Notifications
You must be signed in to change notification settings - Fork 239
Online repository for plugin definitions #1243
Description
After local discovery of plugin definitions in WP_PLUGIN_DIR/<plugin>/.versionpress since #1036 and WP_CONTENT_DIR/.versionpress/<plugin> since #1176, the final step is to have an online repository of the definitions. It will be open to anyone to contribute (not just plugin authors) and used by VersionPress transparently.
It would work like this:
First, a user goes to the Add Plugins screen and sees whether the plugin has definitions or not:
If the plugin is compatible, the user can install it. VersionPress will download the definition to WP_CONTENT_DIR/.versionpress/<plugin> (what #1176 implements) and use it.
When the plugin is uninstalled, it is no different from how local-only definitions behave.
The online repository of definitions will probably take a form of:
- GitHub repo for community contribution, sort of like DefinitelyTyped. Probably
versionpress/definitions.- DefinitelyTyped is hitting a bit of a scaling issue, e.g., cloning the repo is slow. An alternative would be to have a GitHub organization for definitions and then repositories in it like
versionpress-definitions/akismet,versionpress-definitions/hello-dollyetc. But we don't need to complicate it right now.
- DefinitelyTyped is hitting a bit of a scaling issue, e.g., cloning the repo is slow. An alternative would be to have a GitHub organization for definitions and then repositories in it like
- Small web service hosted by us e.g. to avoid GitHub API rate limits (60 requests per hour are allowed for unauthenticated requests and that can be consumed easily by sites with multiple plugins). This web service could also provide things like definition search etc. but the prime reason is technical.
Some things that will need thinking through are:
- Repository structure.
- How to deal with plugin versions (we probably won't in v1 of this).
