0

i want to make an wordpress plugin, and to put it public, but i want that only the users that have a certain unique code to be able to activate it.

is there possible using the wordpress api to ask for a unique code at plugin activation (and to condition the plugin activation by this code)? I searched wordpress codex, but nothing found.

thanks a lot!

dana
  • 5,168
  • 20
  • 75
  • 116
  • very interesting idea. but I think it is not clear about the unique code. how do you implement that? – bingjie2680 Jan 11 '12 at 09:52
  • so, i need that every user must have a token to acces an api. and i wouldn;t like the user to be able to install/activate the plugin without the token – dana Jan 11 '12 at 09:55

1 Answers1

1

This sounds like the old akismet plugin which required users to register for an API token. You can as part of your plugin require users to enter settings and at this point prompt them to register for an API key.

See the WordPress codex for adding an options page. Also see this example for a good example of hooking into the plugin activation:

Community
  • 1
  • 1
Paul Bain
  • 4,364
  • 1
  • 16
  • 30