WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I see from the activation link, wordpress is using the plugin's dir. Also, when many plugins use add_action to hook on activation, they use

add_action('activate_' . plugin_basename(), 'name_activation');

If the plugin dir is word/ , the plugin name is Press, then, this will be:

add_action('activate_word', 'press_activation'');

So, WP identify the plugin as "word" or "press" ? I know that by using 'activate_word', WP gets to know which file to activate. I also tested that the "Press" got activated and running. But, is there any potential trouble to consider?

share|improve this question

Plugins are identified by the path to the file containing the plugin headers. For instance the debug bar plugin would be identified as: debug-bar/debug-bar.php

See activate_plugin

To add an action on activation you need to register the hook using register_activation_hook( $file, $function )

example: register_activation_hook( __FILE__, 'activation_function' );

share|improve this answer
So, beside showing up on the plugins list, the plugin name doesn't make any sense to WP? – Jenny May 15 '12 at 14:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.