wordpress restrict pulgin installation to those who have a unique code

101 views Asked by At

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!

1

There are 1 answers

0
Paul Bain On BEST ANSWER

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: