[resolved] Plugins visible to editors/authors? (6 posts)

  1. glasnhost
    Posted 5 years ago #

    I want editors to use a plugin!
    I installed a plugin for zip uploading (easy uploader), but the plugins is installed under "Tools" and is only accessible for Administrators.

    Another plugin I have, (wp-filemanager) is installed in its own menu and is also not visible for editors. However, the URL is accessible for the editors.

    There is a general way to solve this problem?

  2. glasnhost
    Posted 5 years ago #

    Oh, I've found the hack myself for the File manager plugin:
    each plugin must add a menu page and set the role attached to it through an add_menu_page functions.
    So I just replaced the original line in the plugin code:

    add_menu_page('FileManager', 'FileManager', 8, '../wp-admin/fm.php');


    add_menu_page('FileManager', 'FileManager', 'editor', '../wp-admin/fm.php');

    I guess that for the easy uploader plugin will be the same, but I dind't find it yet

  3. glasnhost
    Posted 5 years ago #

    well, if I give the "editor" capability to the plugin, the administrator cannot see it now...that's not funny

  4. glasnhost
    Posted 5 years ago #

    Ah ok, instead of replacing, I just add the line. So now I add_menu_page twice, once with editor and the other with admin capability...

  5. glasnhost
    Posted 5 years ago #

    Well no, I was wrong actually 'editor' doesn't exist, it should be a capability, so if I need just a line:
    add_menu_page('FileManager', 'FileManager', 7, '../wp-admin/fm.php');

    that is, a lower the capability level, now editor&admin can see it

  6. glasnhost
    Posted 5 years ago #

    The easy uploader plugin was a little bit trickier, because the menu is added to the management options, ONLY if the user is allowed to manage them. So I had to remove first
    if (current_user_can('manage_options'))
    and then add the menu as a separate menu, with add_menu_page

Topic Closed

This topic has been closed to new replies.

About this Topic