2
votes

I have created a plugin using Wordpress and I would like to create a user account that ONLY has access to this plugin.

In other words when the user logs in to the wordpress admin panel this plugin is the only thing they see.

1
Do you need the user to have access only to the functionality provided by your plugin? If so, what is this functionality and how will the user access it? - AJJ

1 Answers

7
votes

You can make the menu of the plugin available to the user level's capability. As you can see in WordPress codex,

add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');

'manage_options' is a capability of an administrator. A subscriber's capability is 'read', so replace 'manage_options' with 'read' and you'll give access to the subscriber.

This not only works with add_option_page, but also with add_menu_page, add_plugins_page, etc.

Here's a complete list of capabilities.