WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/activate (plugin file name)

There was a bug that affected this function until version 2.2.3 or 2.3.

This hook provides no parameters. You use this hook by having your function echo output to the browser, or by having it perform background tasks. Your functions shouldn't return, and shouldn't take any parameters.

This hook was introduced in WordPress 2.0, and will not work in earlier versions.

It is recommended to use the function register_activation_hook() instead of this function.

See also http://wphooks.flatearth.org/hooks/activate_plugin-filename/

This page is marked as incomplete. You can help Codex by expanding it.