[wp-hackers] Setting default options for plugin

Dan Coulter dan at dancoulter.com
Fri Aug 31 21:08:43 GMT 2007


On 8/31/07, Stephen Rider <wp-hackers at striderweb.com> wrote:
> Is there an official or "best" method for setting default options for
> a plugin when it is first activated?

You can use the following code to call a function when your plugin is
first activated:

add_action('activate_plugindir/pluginfile.php', 'functionname');

There's more info here: http://codex.wordpress.org/Creating_Tables_with_Plugins

-- 
Dan Coulter
http://www.dancoulter.com/
http://www.phpflickr.com/
It is time - http://e-hobo.com/

Hey, I got nothing to do today but smile
-Simon and Garfunkel


More information about the wp-hackers mailing list