Comments (4)
I don't think making the APIs use the same format would be particularly worthwhile.
- The WP.org plugin information API is very sparsely documented. As far as I can tell, stuff like available fields, date/time formats and field size limits are not listed anywhere. It is impossible to build something to spec if there is no spec. At best, you can try to study the API responses and figure out the format empirically (but you'll never know if you did it correctly since there is no standard and no test suite).
- I expect that many plugin authors will add custom fields to the metadata anyway. For example, for commercial plugins you might want to append license information to the update, or add some kind of an authorization token.
- The official API has a few fields that don't really apply to many third-party plugins, like user ratings, download counters and donation links.
- Finally, the API contains some design decisions that I personally disagree with such as naming the download URL
download_link
and combining the author name and homepage in a singleauthor
field.
from wp-update-server.
The WP.org plugin information API is very sparsely documented. As far as I can tell, stuff like available fields, date/time formats and field size limits are not listed anywhere. It is impossible to build something to spec if there is no spec. At best, you can try to study the API responses and figure out the format empirically (but you'll never know if you did it correctly since there is no standard and no test suite).
True enough, however, that is what you try to emulate with the toWpFormat()
methods anyway.
I expect that many plugin authors will add custom fields to the metadata anyway. For example, for commercial plugins you might want to append license information to the update, or add some kind of an authorization token.
Absolutely correct, but leaving non-standard fields in place shouldn't be a problem. It's the standard fields which now provide data in a non-standard way which is.
The official API has a few fields that don't really apply to many third-party plugins, like user ratings, download counters and donation links.
We could either leave them out, leave them empty or possibly use server download stats and the like to fill them.
Finally, the API contains some design decisions that I personally disagree with such as naming the download URL download_link and combining the author name and homepage in a single author field.
Yeah, those are weird, but there's lots more weird stuff in WP in general and we still choose to use it, so we might as well try to comply with it.
from wp-update-server.
True enough, however, that is what you try to emulate with the toWpFormat() methods anyway.
Yes, because that's required to integrate with WP. That doesn't necessarily mean it's a good idea to try to use the same format for the external update API.
Having a well-defined metadata format and a converter that transforms it to the not-as-well-defined format used by WP seems more maintainable than trying to make the two formats identical. If WP decides to change the format or the internal update logic, I only have to fix the converter. On the other hand, if the formats are supposed to be identical and the "official" format changes, every plugin developer using this library has to change their metadata files to match the new format.
Absolutely correct, but leaving non-standard fields in place shouldn't be a problem. It's the standard fields which now provide data in a non-standard way which is.
There are only two or three such fields, anyway.
Yeah, those are weird, but there's lots more weird stuff in WP in general and we still choose to use it, so we might as well try to comply with it.
Well, I guess that's a matter of opinion. I use the weird stuff in WP (by necessity), but I try to make better stuff if I can :)
from wp-update-server.
Fair enough, I won't spend any time on this as a whole then, but will concentrate on the specific things I need in the child implementation.
Well, I guess that's a matter of opinion. I use the weird stuff in WP (by necessity), but I try to make better stuff if I can :)
Me too, like with patches to core and PRs to plugins and the like ;-)
from wp-update-server.
Related Issues (20)
- Issue with the latest wp-update-server version HOT 5
- Critical Error Upon Setup HOT 4
- PHP8 deprecation notices HOT 4
- Sudenly I get: Update failed: You have the latest version of the plugin. HOT 10
- Handling alpha and beta plugin versions HOT 2
- Problem connecting server with checker library HOT 1
- Is it possible to add a list of domains to update? HOT 5
- How about implementing WordPress Code Standards? HOT 4
- Server maintenance questions. HOT 4
- PHP 8.2.7 Deprecated warnings on Server returning metadata (WP_DEBUG true) HOT 3
- Extension for packages list HOT 4
- Need a little help with extends Wpup_UpdateServer HOT 5
- What's going on here? HOT 3
- Can you change it to a remote zip URL? HOT 2
- guidance HOT 1
- Forbidden HOT 13
- Update Packagist HOT 2
- where I have to put example-theme.zip and which class is correct ? HOT 9
- unexpected error HOT 1
- Secure download link error message HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-update-server.