[resolved] grant "author" role access to a plugin (2 posts)

  1. alesub
    Posted 5 years ago #


    I'm writing a plugin that needs to be accessible by authors.

    To create its settings page I got:

    add_menu_page('My Plugin', 'My Plugin', 'administrator', __FILE__, 'lic_settings_page');

    According to the documentation, I should be able to give authors access by inputting 'author' instead of 'administrator', but I just keep receive a "You do not have sufficient permissions to access this page." message after editing that parameter.

    Any help would be greatly appreciated.


  2. alesub
    Posted 5 years ago #

    Apparently using "author" or "editor" doesn't work, to do this I needed to use the user level:

    add_menu_page('My Plugin', 'My Plugin', 2, __FILE__, 'lic_settings_page');

    Maybe using the roles will work on WP3 :)

Topic Closed

This topic has been closed to new replies.

About this Topic