[wp-hackers] WordPress Plugin GUID
peter.westwood at ftwr.co.uk
Sun Jun 7 18:46:18 GMT 2009
On 7 Jun 2009, at 01:01, Stephen Rider wrote:
> On Jun 6, 2009, at 2:48 AM, Eric Marden wrote:
>>> The packager adds the GUID automatically.
>>> Of course, we *would* need some sort of "transition" system ,
>>> since plugins already installed would not get the GUID until the
>>> next time they're updated.
>>> Or is that what you meant? ;-)
>> Unless the packager is zipping them on the fly, wouldn't the mere
>> change of the readme.txt in svn be enough to trigger the update
>> (especially if a .1 is added to the version number, if it depends
>> on that too)?
> if I already have Plugin X installed on my blog when this system is
> instituted, I would not get the GUID until the next update to that
> plugin. Thus some sort of transitory system would have to be in
> place so that that first update still happens. Two possibilities
> come to mind:
> 1) Brute force method: up the version every single plugin in Extend
> with a .1 on the end, adding the GUID. I do **not** think this one
> is a good idea....
> 2) The system remembers the extant version for each plugin at the
> time the system is instituted, and basically upgrades a plugin if
> it's at version #x or below, OR it has the GUID. This way could
> work. :)
The following works I think (except for svn users):
1) Packager checks readme for GUID before building zip file if it
doesn't exist it adds it to the zip file, if it exists but doesn't
match the correct value then the readme is invalid.
2) WordPress starts sending the GUID as well as the other info (I
think this is possibly automatic depending on how the request is built)
3) Serverside check for existance of upgrade can know if the version
of the plugin installed has or has not always been available with GUID
and can behave in the right way when checking for updates.
As part of this transition GUID should become a required field going
forward for updates but we don't want plugin authors all pushing out
an update just to add a GUID to the readme that is pointless and
provides a lot of burden for no real benifit.
As for plugin users who install straight from svn, I don't see them as
a target for the plugin updater and if it stops working for them for
plugins which don't have a GUID (which based on the above rules
probably won't happen anyway) then I don't see this as a big issue.
I would expect them to be pinned to a revision or a tag anyway so not
wanting the update to happen till they had tested in.
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
More information about the wp-hackers