[wp-hackers] Auto Update Plugins

Stephen Rider wp-hackers at striderweb.com
Tue Feb 17 17:53:15 GMT 2009


I've actually brought this up a few times on this list.  Almost this  
exact discussion was had recently on the Spam Karma dev list.

My response there applies here.  I said...

***quote***
This is actually an issue with a couple other plugins of mine.  I was
thinking that it might behoove us to create a standard location for
such files, such as /plugins/plugin data/.  Thus, SK could look for
"third party" [Spam Karma] plugins in /plugins/plugin data/spamkarma/

Other plugins could use that same folder for their files -- e.g.
otherplugin could use /plugins/plugin data/otherplugin/.  Yes it's a
question of getting other plugin authors to use the same standard, but
I think that a good idea spreads if someone just starts doing it --
and SK is a pretty prominent plugin.  :)
***end quote***

I actually like this because we could start doing it *right now*.  It  
requires no WP core changes at all -- just a decision to start  
encouraging plugin authors to start doing it this way.  I think it's a  
good standard to have a folder called "plugin data" that lives inside  
the "plugins" folder.  Any time a plugin can take add-on files, they  
go in there, and the plugin is coded to look there.

(And yes, each plugin should have a subfolder for it's own files --  
don't just mass dump files into the "plugin data" folder!)

Anyway, that's my two bits, and that's probably the way I'm going to  
start doing my plugins until something significantly better comes along.

Stephen


On Feb 16, 2009, at 10:33 PM, Duane Storey wrote:

> The current WordPress implementation of the auto plugin updater does  
> the
> following:
>
> 1) Downloads a zip file of the new plugin
> 2) Unzips it into a new directory
> 3) Deletes the old directoy
> 4) Copies the new directory to the old directory
> 5) Deletes the new directory
>
> A side effect of this is that all user-generated content that's part  
> of the
> plugin gets deleted (for example, you can add custom styles to  
> CFORMS, or
> custom icons to WPtouch).  Anyone know the motivation behind doing  
> it this
> way?  The auto upgrade for WordPress obviously works differently  
> since your
> themes and plugins aren't deleted during an auto upgrade.   I'd be  
> happy to
> submit a patch to simply unzip into the current plugin directory  
> (which
> would maintain user generated content in that plugin folder), but I  
> was just
> curious about the motivation for doing it the current way.



More information about the wp-hackers mailing list