[wp-hackers] Plugin Manager
ryan at ryanduff.net
Sat Feb 11 11:24:07 GMT 2006
Matt Read wrote:
> I've playing around with my installer plugin and I've managed to get a
> framework in place to check for updates via the included IXR libraries. I've
> made the following assumptions.
> user clicks on "check for updates" which goes through all plugins looking for
> the "Update Server:" plugin header. it then pings that server with
> "plugins.checkUpdates" query, sending the current plugin version, current wp
> version and plugin name (filename for now). The server then calculates which
> version of the plugin is appropriate for that ver of wp, sending back the
> following params:
> bool update
> string url (where to grab the file)
> string pluginVersion
> string pluginName
> it then displays a message to user telling about updates. From there the user
> can click on "update" button to update each plugin; installer base then goes
> and grabs the file (url) and installs it.
> - There should also be a bulk upgrade button to upgrade all.
> (working on this)
> I've also added support for the follwoign plugin headers:
> Max WP Version:
> Min WP Version:
> License: (cause it's neat :) )
> Min and max WP version could be used by the upgrade script, as well as the
> plugin manager to deactivate plugins upon upgrade and/or display a message to
> user that this plug is not tested for this wp ver. (working on this)
> the Update client/server interaction prolly needs more thought as to how it's
> all going to work (I haven't thought about error handling yet), but that's
> what I got so far.
> I've also come across the problem of having unique "package names" for
> plugins, i'm using the base plugin file name for now which works fairly well.
> Maybe we should add a Package Name header to the plugin files that would be a
> "sanitized" name as per wp-svn. or just use the current unsanitized names...
> It would also be nice if there was a centralized server, so we'd be able to
> ping the "Central Update Server" telling it I want to install plugin xyz, and
> it will give me the appropriate plug ver for my wp ver.
> here's my current ver (I'll email mat to create me a svn folder):
> and here's a blank plugin with Update Server in it so you can see how it works
> (the server is "static" and returns values for this plug only and will say
> there's an update every time):
Max and Min version is something that would be nice to have in the
plugin header. Min version being required, Max being optional, because
we see what happens in Firefox when somebody sets the max version at 1.5
and 18.104.22.168 comes out and half of your extensions you just got to work
with 1.5 are disabled again. Doh!
More information about the wp-hackers