[wp-hackers] Plugin Manager
Matt Read
lists at mattread.com
Sat Feb 11 03:55:39 GMT 2006
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):
http://mattread.com/dropbox/installer-dev.zip
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):
http://mattread.com/dropbox/blank.zip
--
Matthew Read
http://www.mattread.com/
More information about the wp-hackers
mailing list