[wp-hackers] Setting default options for plugin

Peter Westwood peter.westwood at ftwr.co.uk
Mon Sep 3 16:54:56 GMT 2007

On 3 Sep 2007, at 17:50, uberdose wrote:

> I wouldn't use register_activation_hook() because it won't get
> triggered on updates, and if people install in different directories
> it's useless too.

If you use __FILE__ in your call to register_activation_hook then it  
will not matter what the folder name is.

But yes it won't be called for updates.

Maybe we need a register_update_hook which could be called when  
WordPress detects a version change in a plugin.
This would need WordPress to store the version info for all active  
plugins though.
Maybe a feature for 2.4.

Peter Westwood <peter.westwood at ftwr.co.uk>
Blog: http://blog.ftwr.co.uk/
WordPress Plugins: http://blog.ftwr.co.uk/wordpress/

More information about the wp-hackers mailing list